Sample Header Ad - 728x90

Systemd hangs at reboot/shutdown. No logs available

2 votes
0 answers
288 views
How can I figure out what service is stalling systemd during shutdown if I can't get a log? I've been struggling for days trying to figure out what is causing systemd to hang whenever I try to reboot or shutdown. It gets part way through the shutdown process, but never completes. This system is on a machine with only a serial console for access. There are no ethernet ports. The only writable disk is a RAM drive, so looking at journalctl after reboot is useless. The architecture is ubuntu 18.04 on an Arm64, and all I know is the following:
[  OK          Stopping Session 3 of user root.
[  OK  ] Stopped target Timers.
[  OK  ] Stopped Daily apt upgrade and clean activities.
[  OK  ] Stopped Daily apt download activities.
[  OK  ] Stopped Daily Cleanup of Temporary Directories.
         Stopping Authorization Manager...
[  OK  ] Stopped Discard unused blocks once a week.
         Stopping Availability of block devices...
[  OK  ] Stopped target Graphical Interface.
         Stopping Disk Manager...
[  OK  ] Stopped target Multi-User System.
         Stopping strongSwan IPsec IKEv1/IKEv2 daemon using ipsec.conf...
         Stopping System Logging Service...
[  OK  ] Stopped target Login Prompts.
         Stopping Getty on tty1...
         Stopping Serial Getty on ttyS0...
         Stopping Unattended Upgrades Shutdown...
         Stopping Dispatcher daemon for systemd-networkd...
         Stopping D-Bus System Message Bus...
         Stopping Chassis Fan Service...
         Stopping Regular background program processing daemon...
         Stopping OpenBSD Secure Shell server...
[  OK  ] Stopped Resets System Activity Data Collector.
         Stopping vsftpd FTP server...
         Stopping Nexcopy Graphical Interface...
[  OK  ] Stopped Nexcopy Gadget Service.
         Stopping LSB: Load kernel image with kexec...
         Stopping LSB: HPA's tftp server...
         Stopping User Manager for UID 0...
[  OK  ] Stopped target Host and Network Name Lookups.
         Stopping Getty on ttyGS0...
[  OK  ] Stopped Message of the Day.
         Stopping Network Name Resolution...
[  OK  ] Stopped Network Name Resolution.
[  OK  ] Stopped System Logging Service.
[  OK  ] Stopped Dispatcher daemon for systemd-networkd.
[  OK  ] Stopped Disk Manager.
[  OK  ] Stopped strongSwan IPsec IKEv1/IKEv2 daemon using ipsec.conf.
[  OK  ] Stopped Regular background program processing daemon.
[  OK  ] Stopped vsftpd FTP server.
[  OK  ] Stopped Unattended Upgrades Shutdown.
[  OK  ] Stopped Serial Getty on ttyS0.
[  OK  ] Stopped Nexcopy Graphical Interface.
[  OK  ] Stopped Getty on tty1.
Whatever is causing the hang is likely the next service being attempted. How can I determine what that is? reboot -f works fine, so I know this isn't a hardware issue. Is there anyway to get systemd to output more verbose information about the service it is trying to stop? I tried: systemctl reboot --dry-run Hoping it might tell me what it was trying to do, but apparently --dry-run is ignored, because it initiated a real shutdown procedure anyway. Is there any way to get systemd to output it's task list so I can see what is next in the queue? With just a single serial console for access I'm not sure what else I can try. Does anyone have a suggestion? Edit: One question I have after looking at this agan. ttyS0 in this system is the console and the port I am logged in on. I notice shortly before the messages quit, the getty is stopped on this port, and so presumably I am logged out. Could the getty being stopped be preventing further data from being reported? And if so, is there a way around this?
Asked by AbelianMemes (23 rep)
Apr 20, 2024, 12:46 PM
Last activity: Apr 21, 2024, 05:33 AM