After restarting the server, nginx does not start

Hello!
After restarting the server (in the console or due to a power outage), HestiaCP starts, but the nginx server does not.
Restarting from the console or via the panel’s web interface helps to solve the problem.
In the file /var/log/nginx/error.log:
2024/10/12 15:40:23 [emerg] 1720#1720: bind() to 192.168.88.3:80 failed (99: Cannot assign requested address)
2024/10/12 17:42:26 [warn] 1754#1754: “ssl_stapling” ignored, host not found in OCSP responder “r10.o.lencr.org” in the certificate "/home/library/conf/web/./ssl/..p
2024/10/12 17:42:26 [emerg] 1754#1754: bind() to 192.168.88.3:80 failed (99: Cannot assign requested address)

Thank you for your help in solving the problem!

Hi @Konstantinus,

That means that ip 192.168.88.3 has not been configured when Nginx tries to start or that the port for that ip is already in use.

Nginx service usually starts after network is online:

$ systemctl cat nginx | grep -E '^After|^Wants'
After=network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target

So maybe your system is assigning the ip address a bit late… you could add another service that restarts nginx on boot but it would be better to know the root cause and fix it instead of use that workaround.

4 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.