You are not logged in.

#1 2020-02-12 19:44:22

jonnybarnes
Member
From: Manchester, UK
Registered: 2011-05-11
Posts: 129
Website

Long reboot time via SSH

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

#2 2020-02-12 19:50:55

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Long reboot time via SSH

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?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2020-02-12 20:02:39

jonnybarnes
Member
From: Manchester, UK
Registered: 2011-05-11
Posts: 129
Website

Re: Long reboot time via SSH

graysky wrote:

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

#4 2020-02-12 20:17:47

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Long reboot time via SSH

graysky wrote:

Checked your entropy on boot?

Running haveged or rngd?

Last edited by graysky (2020-02-12 20:18:13)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2020-02-12 20:24:02

jonnybarnes
Member
From: Manchester, UK
Registered: 2011-05-11
Posts: 129
Website

Re: Long reboot time via SSH

Running haveged

Offline

#6 2020-02-12 20:25:15

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Long reboot time via SSH

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)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2020-02-12 20:57:36

jonnybarnes
Member
From: Manchester, UK
Registered: 2011-05-11
Posts: 129
Website

Re: Long reboot time via SSH

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 @834ms

Offline

#8 2020-02-12 21:30:41

jonnybarnes
Member
From: Manchester, UK
Registered: 2011-05-11
Posts: 129
Website

Re: Long reboot time via SSH

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

#9 2020-02-12 22:38:00

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Long reboot time via SSH

15 sec wait for network...?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2020-02-13 17:46:07

jonnybarnes
Member
From: Manchester, UK
Registered: 2011-05-11
Posts: 129
Website

Re: Long reboot time via SSH

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

Board footer

Powered by FluxBB