Cron daemon reports error on bin ciacco via email

Hi everyone, I wanted to report that twice I received errors via email from cron. I believe this is attributable to the latest nexcloud updates . However the server is working properly, but it seems to me a duty to report it to the community,

Cron root@neth7 /usr/bin/ciacco
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before “(end of string)”) at /usr/share/dante/miners/nextcloudsize-list line 40.

2 Likes

I think it could be related (or fixed) by this:

1 Like

At the moment thanks for the directions

Probably the script has been executed during package upgrade.
You can try to execute the script now: /usr/share/dante/miners/nextcloudsize-list.
It should generate a valid JSON.

1 Like

Hello,

Just to let you know I’ve been getting an email notification the two nights.

Subject: Cron root@servername /usr/bin/ciacco

malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before “(end of string)”) at /usr/share/dante/miners/nextcloudsize-list line 40.

Server appears to be ok

Regards
Z

1 Like

Tried running the script as root:
Result =

/usr/share/dante/miners/nextcloudsize-list: line 27: use: command not found
/usr/share/dante/miners/nextcloudsize-list: line 28: use: command not found
/usr/share/dante/miners/nextcloudsize-list: line 29: use: command not found
/usr/share/dante/miners/nextcloudsize-list: line 30: syntax error near unexpected token (' /usr/share/dante/miners/nextcloudsize-list: line 30: use POSIX qw(strftime);’

1 Like

Errors appear to be related too:

27 use strict;
28 use warnings;
29 use JSON;
30 use POSIX qw(strftime);

Thanks Giacomo, I immediately tried and I attach a small extract of the command:
“name”: “wproxmox (w10proxmox)”}, {“count”: 13084, “name”: “Nextcloud_Admin”}], “type”: “list”, “minerId”: “nextcloudsize-list”}

Thanks Andy for your feedback. My server, like yours, continues to function regularly.

I have seen the error also on other servers but I still can’t reproduce it.

You executed the script with the wrong interpreter, I guess you did something like
bash /usr/share/dante/miners/nextcloudsize-list, but the script is in perl. You must execute with /usr/share/dante/miners/nextcloudsize-list.

Sorry but I need the full output.

I’ve finally found a machine where the problem can be replicated.

Thanks to your reporting, I’ve filled a new issue: https://github.com/nethesis/dev/issues/5847
You can find there also a couple of workaround.

If you want to test the fix:

yum --enablerepo=nethserver-testing update dante
ciacco

No error should be generated :wink:

4 Likes

Thanks Giacomo, I did what you wrote and no errors in the shell. I assume that everything went smoothly …

1 Like

Fix released!

3 Likes

today I got an error notice:

Cron root@ns-srv01 /usr/bin/ciacco

malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before “Nextcloud or one of …”) at /usr/share/dante/miners/nextcloudsize-list line 40.

comes the zombie back?

1 Like

I did a yum reinstall dante now. Hope it helps…