Every time I restart a service (e.g. service exim restart, run as root), I get the following error message:

Error getting authority: Error initializing authority: Could not connect: Resource temporarily unavailable (g-io-error-quark, 27)

The dbus-daemon also has a 100% CPU usage.

The output of journalctl -r -p err -b shows an extreme amount - 6979 entries - of the following error:

pam_systemd(crond:session): Failed to connect to system bus: Resource temporarily unavailable

There are also 5033 session files. Theses are when a session is made via ssh, these are supposed to be deleted automatically, but I'm hesitant to delete them myself

ls -1 /var/run/systemd/sessions/ | wc -l

What is the cause and how can I prevent this?

  • CentOS Linux release 7.2.1511 (Core)

this is a bug of systemd-logind && dbus-daemon,relate to https://github.com/systemd/systemd/issues/1961

because crond always call pam_systemd, and pam_systemd always call systemd-logind to create a session scope use dbus-daemon , but sometimes dbus-daemon alway do not work , so we should better make crond do not call systemd-logind

stop systemd-logind also will not influence ssh , just can not use session cgroup

sudo sed -i -e '/^[^#]*pam_systemd.so/ s/^/#&/g' /etc/pam.d/*
sudo systemctl mask systemd-logind
sudo systemctl stop systemd-logind

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.