collectd is unable to start
-
I have issues with starting collectd in order to get my Cloudron server online again.
Im starting a new support thread since I was unable to find another reliable support thread to use.
Here is the Journalctl output
root@my:/home/yellowtent/platformdata/nginx# journalctl -u collectd -- Logs begin at Wed 2022-06-15 05:35:14 UTC, end at Wed 2022-06-15 19:17:32 UTC. -- Jun 15 05:35:14 URL collectd[71032]: ERROR: dlopen("/usr/lib/collectd/python.so") failed: /usr/lib/collectd/python.so: undefined symbol: PyFloat_Type. The > Jun 15 05:35:14 URL collectd[71032]: Error: Parsing the config file failed! Jun 15 05:35:14 URL systemd[1]: collectd.service: Main process exited, code=exited, status=1/FAILURE Jun 15 05:35:14 URL systemd[1]: collectd.service: Failed with result 'exit-code'. Jun 15 05:35:14 URL systemd[1]: Failed to start Statistics collection and monitoring daemon.
-
@girish It works after inserting the LD_PRELOAD
root@my:~# /home/yellowtent/box/setup/start.sh 2022-06-16T14:58:38 ==> start: Cloudron Start media:x:500: 2022-06-16T14:58:38 ==> start: Configuring docker Synchronizing state of apparmor.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable apparmor 2022-06-16T14:58:40 ==> start: Ensuring directories 2022-06-16T14:58:40 ==> start: Configuring journald 2022-06-16T14:58:41 ==> start: Setting up unbound 2022-06-16T14:58:41 ==> start: Adding systemd services Synchronizing state of unbound.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable unbound Synchronizing state of cron.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable cron 2022-06-16T14:58:48 ==> start: Configuring sudoers 2022-06-16T14:58:48 ==> start: Configuring collectd Job for collectd.service failed because the control process exited with error code. See "systemctl status collectd.service" and "journalctl -xe" for details. root@my:~# systemctl restart collectd Job for collectd.service failed because the control process exited with error code. See "systemctl status collectd.service" and "journalctl -xe" for details. root@my:~#
The content of /etc/default/collectd
GNU nano 4.8 /etc/default/collectd # /etc/default/collectd # 0: start collectd on boot, 1: do not start collectd on boot # default: 0 DISABLE=0 # 0: start collectd in stand-alone mode, 1: monitor collectd using collectdmon # default: 1 USE_COLLECTDMON=1 # number of seconds to wait for collectd to shut down # default: 30 MAXWAIT=30 # 0: do not enable core-files, 1: enable core-files ... if collectd crashes # default: 0 ENABLE_COREFILES=0
After inserting the line
# /etc/default/collectd # 0: start collectd on boot, 1: do not start collectd on boot # default: 0 DISABLE=0 # 0: start collectd in stand-alone mode, 1: monitor collectd using collectdmon # default: 1 USE_COLLECTDMON=1 # number of seconds to wait for collectd to shut down # default: 30 MAXWAIT=30 # 0: do not enable core-files, 1: enable core-files ... if collectd crashes # default: 0 ENABLE_COREFILES=0 LD_PRELOAD=/usr/lib/python3.8/config-3.8-x86_64-linux-gnu/libpython3.8.so
root@my:~# nano /etc/default/collectd root@my:~# systemctl restart collectd root@my:~#
-
-
@AniTexs I think maybe the collectd config got overwritten during the upgrade. If you run
/home/yellowtent/box/setup/start.sh
, this will put the expected collectd config.Also, check the content of
/etc/default/collectd
. It should contain:LD_PRELOAD=/usr/lib/python3.8/config-3.8-x86_64-linux-gnu/libpython3.8.so
After that,
systemctl restart collectd
. -
@girish It works after inserting the LD_PRELOAD
root@my:~# /home/yellowtent/box/setup/start.sh 2022-06-16T14:58:38 ==> start: Cloudron Start media:x:500: 2022-06-16T14:58:38 ==> start: Configuring docker Synchronizing state of apparmor.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable apparmor 2022-06-16T14:58:40 ==> start: Ensuring directories 2022-06-16T14:58:40 ==> start: Configuring journald 2022-06-16T14:58:41 ==> start: Setting up unbound 2022-06-16T14:58:41 ==> start: Adding systemd services Synchronizing state of unbound.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable unbound Synchronizing state of cron.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable cron 2022-06-16T14:58:48 ==> start: Configuring sudoers 2022-06-16T14:58:48 ==> start: Configuring collectd Job for collectd.service failed because the control process exited with error code. See "systemctl status collectd.service" and "journalctl -xe" for details. root@my:~# systemctl restart collectd Job for collectd.service failed because the control process exited with error code. See "systemctl status collectd.service" and "journalctl -xe" for details. root@my:~#
The content of /etc/default/collectd
GNU nano 4.8 /etc/default/collectd # /etc/default/collectd # 0: start collectd on boot, 1: do not start collectd on boot # default: 0 DISABLE=0 # 0: start collectd in stand-alone mode, 1: monitor collectd using collectdmon # default: 1 USE_COLLECTDMON=1 # number of seconds to wait for collectd to shut down # default: 30 MAXWAIT=30 # 0: do not enable core-files, 1: enable core-files ... if collectd crashes # default: 0 ENABLE_COREFILES=0
After inserting the line
# /etc/default/collectd # 0: start collectd on boot, 1: do not start collectd on boot # default: 0 DISABLE=0 # 0: start collectd in stand-alone mode, 1: monitor collectd using collectdmon # default: 1 USE_COLLECTDMON=1 # number of seconds to wait for collectd to shut down # default: 30 MAXWAIT=30 # 0: do not enable core-files, 1: enable core-files ... if collectd crashes # default: 0 ENABLE_COREFILES=0 LD_PRELOAD=/usr/lib/python3.8/config-3.8-x86_64-linux-gnu/libpython3.8.so
root@my:~# nano /etc/default/collectd root@my:~# systemctl restart collectd root@my:~#
-
-
-
-
@girish said in collectd is unable to start:
@AniTexs I think maybe the collectd config got overwritten during the upgrade. If you run
/home/yellowtent/box/setup/start.sh
, this will put the expected collectd config.Also, check the content of
/etc/default/collectd
. It should contain:LD_PRELOAD=/usr/lib/python3.8/config-3.8-x86_64-linux-gnu/libpython3.8.so
After that,
systemctl restart collectd
.Similar issue after upgrading from Ubuntu 20.04 to 22.04 - but despite the reference to
libpython3.8.so
being present in/etc/default/collectd
, it seems that this file is no longer present...However, what is present is
/usr/lib/python3.10/config-3.10-x86_64-linux-gnu/libpython3.10.so
- after referencing this file in/etc/default/collectd
(i.e. addingLD_PRELOAD=/usr/lib/python3.10/config-3.10-x86_64-linux-gnu/libpython3.10.so
), and restarting thecollectd
service, it starts running again.... but will this change persist?
-
@necrevistonnezr said in collectd is unable to start:
... but will this change persist?
yes, that's the correct fix. I had this line in the ubuntu 20 upgrade guide, but it's missing in the ubuntu 22 guide. I have added it now.
-
I have the same issue, and i tried to add the
LD_PRELOAD
think, but i got a parsing error in the file.
Does anyone have already saw that ?May 10 15:14:23 sanchezm systemd[1]: Starting Statistics collection and monitoring daemon... May 10 15:14:23 sanchezm collectd[6484]: [2023-05-10 15:14:23] plugin_load: plugin "logfile" successfully loaded. May 10 15:14:23 sanchezm collectd[6484]: Error: Parsing the config file failed! May 10 15:14:23 sanchezm systemd[1]: collectd.service: Main process exited, code=exited, status=1/FAILURE May 10 15:14:23 sanchezm systemd[1]: collectd.service: Failed with result 'exit-code'. May 10 15:14:23 sanchezm systemd[1]: Failed to start Statistics collection and monitoring daemon. May 10 15:14:25 sanchezm systemd[1]: Stopped Statistics collection and monitoring daemon.
After some research, i found that the issue come from the
Import "du"
in thecollectd.conf
file.
Does anyone know how to fix that ?<Plugin python> # https://blog.dbrgn.ch/2017/3/10/write-a-collectd-python-plugin/ ModulePath "/home/yellowtent/box/setup/start/collectd/" LogTraces false # enable this to get traces in /var/log/collectd.log Interactive false Import "df" # Import "du" <Module du> <Path> Instance maildata Dir "/home/yellowtent/boxdata/mail" </Path> <Path> Instance boxdata Dir "/home/yellowtent/boxdata" Exclude "mail" </Path> <Path> Instance platformdata Dir "/home/yellowtent/platformdata" </Path> </Module> </Plugin>
-
@mathieuepitech Interesting. du is a custom plugin we wrote. Can you tell which ubuntu version you are on? Also, the python version (3.8 or 3.10?).
-
@mathieuepitech Ah, I didn't realize you were on a older Cloudron version. Indeed, du.py is now gone.