LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-02-2017, 09:12 AM   #1
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
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?

Thx!
 
Old 10-02-2017, 12:40 PM   #2
bimboleum
Member
 
Registered: Oct 2009
Posts: 111

Rep: Reputation: 23
Hi,
Try "reboot -fn" ... this is a brute-force reboot so it may work when other efforts don't

I can't give you any advice on systemd .. I only use Centos as a reference for other projects at the job

cheers
pete

pete hilton

saruman@ruvolo-hilton.org

Last edited by bimboleum; 10-02-2017 at 12:41 PM.
 
Old 10-02-2017, 01:00 PM   #3
bimboleum
Member
 
Registered: Oct 2009
Posts: 111

Rep: Reputation: 23
Hi,
Further reading indicates that reboot is a symlink to /bin/systemctl and the following

/bin/systemctl --force --force reboot

will brute-force a reboot without trying to kill any processes/services. With a bit of luck, this will obviate the need to pull the power plug

As always YMMV.

cheers
pete

pete hilton
saruman@ruvolo-hilton.org
 
Old 10-02-2017, 04:55 PM   #4
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,794

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
Any frequent error messages?
Code:
journalctl -f
 
Old 10-02-2017, 06:59 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
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.
 
Old 10-03-2017, 02:34 AM   #6
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Original Poster
Rep: Reputation: 103Reputation: 103
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.

As an aside, I'm already doing

Code:
/usr/bin/systemctl daemon-reexec
every ten minutes from a crontab.

Thx alot for the responses!

Stefan
 
Old 10-03-2017, 02:45 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
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.
 
Old 10-04-2017, 06:29 AM   #8
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,794

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
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
 
Old 10-06-2017, 01:41 AM   #9
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Original Poster
Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by MadeInGermany View Post
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...

Regards

Stefan
 
Old 10-06-2017, 01:42 AM   #10
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Original Poster
Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by syg00 View Post
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....

Regards

Stefan
 
Old 10-06-2017, 03:25 AM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
systemctl vs init.d on Centos 7 Ryanms3030 Linux - Newbie 8 11-04-2014 07:55 PM
Commands to keep system updated and clean rng Debian 41 02-17-2013 02:17 AM
"bad_pool_error" & "Your system is not fully acpi compliant get your Bios updated" errors in WinXP Aquarius_Girl General 10 07-30-2010 11:27 AM
help -- updated kernel -- lost commands nomb Fedora 3 08-12-2006 09:15 PM
System fully updated, but it isn't arthur1968 Fedora 2 12-17-2003 04:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration