I’ve just upgraded to Ubuntu 18.04. Reboot often takes 10 minutes or more. During this, apache2 often times out and I had to change restart from “on-abort” to “always” in order not to loose the server whenever the system reboots.
I can immediately ping the system and get to the login via ssh, but it takes multiple minutes until the password is accepted. There are no error messages when booting from the digitalocean console, none in journalctl, and no problems reported in systemd-analyze. Using “systemd-analyze blame” I can see that it sometimes takes multiple minutes until the multi-user runlevel is started.
What could be potential culprits for such behavior? Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @nikolaus,
Often when something takes this long it’s because it’s trying to connect/open something it doesn’t have access to and it’s waiting for it’s timeout to expire.
Regarding Apache, when you reboot the server, are you sure there is nothing else actually listening on the ports Apache will try to listen (80, 443)? One other thing, when you try and restart Apache manually does it take a long time to do so?
Lastly, I’ll recommend checking all the services which are configured to start automatically on reboot, most probably the issues lies there in one of them. To check this, you can run
sudo systemctl list-unit-files --type=service
If you want to show only the Enabled services, then run
sudo systemctl list-unit-files --type=service | grep enabled
Regards, KDSys
Thank you. I would not know which service times out, as there are no error messages on the boot screen or in the journal.
Restarting apache2 while the machine is running is very fast.
Thank you for pointing out services. I’ve set the default target to be “multi-user.target” instead of “graphical.target” and disabled “wpa_supplicant.service” to speed things up. I will further monitor this and post a solution here.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.