You are not logged in.
When logged in as my normal user, if I run `sudo systemctl reboot`, the command appears not to have worked. It just “finishes” and I’m bask at my shell prompt, which still works.
Until eventually the system kicks me out an does actually reboot. I’d say its taking about 20 seconds to actually reboot.
What wierd to me is this is a fresh server, in terms of system level stuff that might affect this, polkit is the only thing I’ve installed so far. But reading the wiki page again I might not need that package, as it might be for directly logged in users (no ssh) to reboot without needing sudo.
Offline
Have you verified these times sitting in front of the physical machine? Anything displayed on screen when you notice a delay? Checked your entropy on boot?
Offline
Have you verified these times sitting in front of the physical machine? Anything displayed on screen when you notice a delay? Checked your entropy on boot?
Its a server in a data-center, I don’t have physical access.
Offline
Checked your entropy on boot?
Running haveged or rngd?
Last edited by graysky (2020-02-12 20:18:13)
Offline
Running haveged
Offline
Without something in journalctl or physically seeing the thing boot up I don't know how to help you without guessing... what is the output of `systemd-analyze critical-chain`
Last edited by graysky (2020-02-12 20:25:56)
Offline
Ran without sudo I get the following output:
graphical.target @20.756s
└─multi-user.target @20.756s
└─nginx.service @20.568s +186ms
└─network-online.target @20.565s
└─systemd-networkd-wait-online.service @5.288s +15.276s
└─systemd-networkd.service @5.029s +242ms
└─network-pre.target @5.019s
└─nftables.service @4.604s +404ms
└─basic.target @4.562s
└─sockets.target @4.554s
└─dbus.socket @4.547s
└─sysinit.target @4.493s
└─systemd-timesyncd.service @4.261s +220ms
└─systemd-tmpfiles-setup.service @4.172s +63ms
└─systemd-journal-flush.service @1.577s +2.578s
└─systemd-journald.service @1.352s +215ms
└─haveged.service @1.344s
└─systemd-tmpfiles-setup-dev.service @1.174s +154ms
└─kmod-static-nodes.service @1.043s +86ms
└─systemd-journald.socket @998ms
└─-.mount @834ms
└─system.slice @834ms
└─-.slice @834msOffline
Sigh, its now rebooting much quicker, like in 2 seconds:
Feb 12 22:28:03 jmb-hetzner sudo[886]: jonny : TTY=pts/0 ; PWD=/home/jonny ; USER=root ; COMMAND=/usr/bin/systemctl reboot
...
Feb 12 22:28:04 jmb-hetzner systemd[1]: Reached target Reboot.Guess I can mark as solved for now?
Last edited by jonnybarnes (2020-02-12 21:31:10)
Offline
Offline
Firstly, think I’ve fixed this, narrowed it down to `nginx` taking a long time to stop, have updated my `nginx.service` file.
Secondly, I think the 15 seconds is IPv6 taking its time to become routable. I think. People have been having issues with wait-online, and what its looking for: https://github.com/systemd/systemd/issues/8686
Offline