It is unable to edit a
WordPress website: new browser window is opened with "Can’t connect to the server" error. The reason of such issue:
nginx service is not getting started after the server reboot:
# systemctl --failed UNIT LOAD ACTIVE SUB DESCRIPTION ● nginx.service loaded failed failed Startup script for nginx service
/var/log/nginx/error.log the following messages can be found:
2015/12/28 11:58:57 [emerg] 1140#0: bind() to [xxx.xxx.xxx.xxx]:80 failed (99: Cannot assign requested address)
journalctl the following records can be found:
# journalctl -u network.service -u network.target -u nginx.service -b Feb 04 20:42:57 server.plesk.test nginx: nginx: [emerg] bind() to xxx.xxx.xxx.xxx:80 failed (99: Cannot assign requested address) ... Feb 04 20:42:57 server.plesk.test systemd: Failed to start Startup script for nginx service. Feb 04 20:42:57 server.plesk.test systemd: Unit nginx.service entered failed state. ... Feb 04 20:42:57 server.plesk.test network: Bringing up interface eth0: Feb 04 20:42:57 server.plesk.test dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid=0x4b684081) Feb 04 20:42:57 server.plesk.test dhclient: DHCPACK from xxx.xxx.xxx.xxx (xid=0x4b684081) ... Feb 04 20:42:59 server.plesk.test network: [ OK ]
nginx gets started manually without any issues:
# systemctl start nginx.service
Delay in assigning of IP address to interface. For example because of delayed response from DHCP server.
After=network.target remote-fs.target nss-lookup.target
After=network-online.target remote-fs.target nss-lookup.target
This will ensure that
nginxstartup script will be executed after network is set up and all IP addresses are assigned.
- Reboot server.