Plesk

nginx on Plesk for Linux server does not start automatically after reboot: 99: Cannot assign requested address

Symptoms

Cause

Delay in assigning of IP address to a network interface. For example, because of delayed response from DHCP server.

Resolution

  1. Connect to the server using SSH.

  2. Make sure that network interfaces are enabled on system boot:

    • for RHEL, CentOS, CloudLinux:

      # grep -r "ONBOOT" /etc/sysconfig/network-scripts/ifcfg-*
      /etc/sysconfig/network-scripts/ifcfg-lo:ONBOOT=yes
      /etc/sysconfig/network-scripts/ifcfg-venet0:ONBOOT=yes
      /etc/sysconfig/network-scripts/ifcfg-venet0:0:ONBOOT=yes

    • for Debian and Ubuntu:

      # grep auto /etc/network/interfaces
      # This configuration file is auto-generated.
      auto lo
      auto venet0
      auto venet0:0

  3. Back up the nginx startup script /etc/systemd/system/multi-user.target.wants/nginx.service:

    # cp /etc/systemd/system/multi-user.target.wants/nginx.service{,.bk}

  4. Make sure that the package systemd-networkd is installed on the server. Install it if it is not installed:

  5. If Plesk 17.5 or older is used, proceed as follows to create the file /etc/systemd/system/nginx.service.d/override.conf with an nginx startup parameter to be executed only after the network is up and all IP addresses are assigned:

    • Run the following command. It will open the default text editor on the server:

      # systemctl edit nginx.service

      Add the following line, save and exit the file:

      After=network-online.target remote-fs.target nss-lookup.target

  6. Reboot the server:

    # reboot

If it does not help, additional action is required:

 

Exit mobile version