Centos 7 fully updated - all systemctl commands timeout
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Centos 7 fully updated - all systemctl commands timeout
Hi All
On my fully updated Centos 7 box (usually after being up for about three weeks) systemd will go to 100% CPU and not respond to any commands.
E. g. doing
Code:
systemctl status mysqld
(for example)
will timeout after about two minutes with "cannot connect to systemd: timeout" in the BASH command line.
Also trying
Code:
systemctl reboot
or
Code:
shutdown -r now
will also give the timeout error message.
There is no recourse other than to physically power-off the machine in an uncontrolled shutdown which is obviously dangerous for MySQL etc.
The machine exhibits behaviour where certain network services will die in this condition, notably SSH sessions are very slow to log in and sometimes timeout completely (which is why it HAS to be restarted.)
Anybody else experience this with Centos 7's systemd going 100% CPU and you are then incapable of shutting down or rebooting the system save physically pulling the power plug out of the wall socket?
I would be looking just prior to the problem for messages - CentOS should have persistent journals, so they can be checked at any time. Especially check for stack traces indicating a recovery loop.
Thx guys for the pointers I'll see what I can find.
journalctl -f
doesn't show any frequent errors (at the moment, I hard powered off the system yesterday as mentioned) - this always occurs after three or four weeks' worth of uptime.
After a hard poweroff, from a terminal run "journalctl -b -1" - that's the journal for the previous boot. <Shift>-g will get you to the end of it (it's just less as a viewer). Start paging up and see what happened.
Do you clean /tmp or /var/tmp?
Be careful, systemd stores files in them!
The systemd-tmpfiles-clean service is safe: it has the appropriate excludes in /usr/lib/tmpfiles.d/tmp.conf
Do you clean /tmp or /var/tmp?
Be careful, systemd stores files in them!
The systemd-tmpfiles-clean service is safe: it has the appropriate excludes in /usr/lib/tmpfiles.d/tmp.conf
Hi
Thanks for the reply.
No, I'm not cleaning /tmp or /var/tmp, nor have I written my own scripts that touch them...
After a hard poweroff, from a terminal run "journalctl -b -1" - that's the journal for the previous boot. <Shift>-g will get you to the end of it (it's just less as a viewer). Start paging up and see what happened.
Hi Syg00
Thanks for the reply!
I ran the above but got
Code:
# journalctl -b -1
Specifying boot ID has no effect, no persistent journal was found
#
Guess I'll have to figure out how to make the journal persistent first....
That can only mean the logs are copied over to /var/log to be consistent with how it was done historically. Check there.
I don't have a CentOS to check at present.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.