• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Plesk 12.5 Nginx starting failure in OpenVZ VM

nethubonline

Regular Pleskian
Under OpenVZ VM, Nginx starts getting failure because cannot bind to IP port 80, the reason is that the network is not yet fully started so that no IP configured during Nginx starting.

Apr 6 15:45:43 c9 systemd: Starting Startup script for nginx service...
Apr 6 15:45:43 c9 nginx: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Apr 6 15:45:43 c9 nginx: nginx: [emerg] bind() to 1.2.3.4:80 failed (99: Cannot assign requested address)
Apr 6 15:45:43 c9 nginx: nginx: configuration file /etc/nginx/nginx.conf test failed
Apr 6 15:45:43 c9 systemd: nginx.service: control process exited, code=exited status=1
Apr 6 15:45:43 c9 systemd: Failed to start Startup script for nginx service.
Apr 6 15:45:43 c9 systemd: Unit nginx.service entered failed state.
Apr 6 15:45:43 c9 systemd: nginx.service failed.


After system fully start up, systemctl restart nginx can start the nginx without problem because at this time IP exists already.
Tested that modify /usr/lib/systemd/system/nginx.service which fix the problem, but I am not sure whether this is good to start after network-online.target :

[old]
After=network.target remote-fs.target nss-lookup.target
[new]
After=network-online.target remote-fs.target nss-lookup.target

Confirmed that no this problem in non OpenVZ VM, because NetworkManager starts eariler than Nginx
 
Back
Top