Nginx fails to start: 99: Cannot assign requested address

Follow

Comments

20 comments

  • Avatar
    Mark Verbeeck

    I had the same problem . After few days of troubleshooting :

    Problem :

    Could  been a problems with vhosting and nginx construction in certain Linix virtual environnements.

    Solution :

    Switch NGINX service off and remove NGINX from Plesk .

     - Go to  'Tools & Settings' , ' Instal and Update Plesk' , 'Add and Remove Product Components',

     - Go to 'Web hosting' , (push on ¨'+')  , 

    -  'Nginx web server and reverse proxy server' , and select 'REMOVE'

    Fixed :

    nginx settings are removed from Plesk and no other errors seen .

    Vhosting problem also fixed  (causesd by uncompleted nginx rules )

     

    ( work now under Apache HTTPD service and works 100% )

    Problem not with Plesk but with the Virtual Machine Environnement he is working in .

    You can later 'install' 'Nginx web server and reverse proxy server' in Plesk back if needed .

    Version :

    Plesk Version 17.0.17 Update #52 ( upgrades and updates same problems ) 

     

     

     

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Mark,

    Thank you for the feedback.

    In your case by removing Nginx you have regenerated Apache configuration.

    The same may be achieved by just disabling Nginx using the command:

    /usr/local/psa/admin/bin/nginxmng -d

    After that to enable Nginx again (the configuration of Nginx will be regenerated) use the command:

    /usr/local/psa/admin/bin/nginxmng -e

    0
    Comment actions Permalink
  • Avatar
    Andreas Loefke

    The only way I can run my Apache is without Nginx. There is no way, that I can get it running Plesk always says, that it can't be enabled because two IP addresses. One, the secondary IPV4 I have removed for the moment, but the IPV6 I can't remove as I always get the error message, that it is the last IP address for the interface. What is wrong as IPV4 and IPV6 are both configured on the same interface.

    I have tried to reinstall Nginx several times, to no use at all. The error message is always the same and it messes up Apache totally as websites (not using Nginx) vanish and only a message page comes up saying that the debian server is newly configured and the website haven't set up by now.

    Deinstalling Ngionx at least brings back everything as it was before, but that way I'm not able to install HTML/2.

    I made a full update before I tried to Nginx again to enable HTML/2. I'm using Plesk for several years now, but Nginx never worked. If I was able to start it (in older versions) it crashes websites often, overloaded the server or killed Apache. Now I decided to give it a try again and it seems to be still the same rubbish program as before.

    0
    Comment actions Permalink
  • Avatar
    Pavel Mikhaylov

    Hello Andreas,

    I recommend contacting our technical support for a proper investigation and assistance: https://support.plesk.com/

    0
    Comment actions Permalink
  • Avatar
    Andreas Loefke

    I tried that before, but they turned me down, because my license isn't directly by Plesk. It's via the provider of my dedicated server. They say I need to contact their support.
    So I'm forced to find a solution by my own somehow. I have absolutely no clue or idea as the error message is absolutely idiotic, as I removed the IP V6 from everything. I just can't uninstall it and I'm not willing to fully reinstall my server just to get rid of the IP V6 address, activate NGinx and then get in trouble again, when I activate it again or the secondary V4 address, as the provider of the server know shit about Plesk.

    But thanks anyway.

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Andreas, 

    According to the agreement between Plesk and our partners in such cases support should be provided by partners. They are well-trained and should provide support on their own.

    It is also possible to receive support even with such type of license, use this instruction.

    0
    Comment actions Permalink
  • Avatar
    Ion Iacob

    We found the IP Address Banning service included the server IP and banned it. We Move to Trusted IPs and the problem its done.

    0
    Comment actions Permalink
  • Avatar
    Nikita Nikushkin

    Hello @Ion Iacob,

    Thank you for bringing our attention to this!

    I am sure other users will find this information helpful

    0
    Comment actions Permalink
  • Avatar
    Andy B

    Still I have these logs:

    systemd[1]: Starting Startup script for nginx service...
    nginx[1156]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
    nginx[1156]: nginx: [emerg] bind() to 10.40.42.1:443 failed (99: Cannot assign requested address)
    nginx[1156]: nginx: configuration file /etc/nginx/nginx.conf test failed
    systemd[1]: nginx.service: Control process exited, code=exited status=1
    systemd[1]: Failed to start Startup script for nginx service.
    systemd[1]: nginx.service: Unit entered failed state.

    The IP is a TUN interface 10.40.42.1 use by OpenVPN. I think plesk adds this by default in the nginx.conf listen interfaces.

     

    Can this be solved somehow?

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Andy B,

    This behavior is caused by a known Plesk bug with ID PPPM-7965.

    You may find the workaround in this article.

    Also, click "follow" to be notified when the issue will be fixed.

    0
    Comment actions Permalink
  • Avatar
    Andy B

    Ok, that seems like a better solution that I have applied. Thanks for the feedback!

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    @Andy B,

    You're welcome=)

    0
    Comment actions Permalink
  • Avatar
    Ingo

    Assuming I have done all the above steps and the problem persists? All websites are down, I have to log in re-read the IPs, repair them and then it works for some time. What's the issue here?

    0
    Comment actions Permalink
  • Avatar
    Anton Maslov

    @Ingo

    Plesk does not manage networking, so it is unlikely caused by a product. Recently there was similar problem report caused by the fact one of the IP addresses was issued by DHCP and was not properly renewed. If it is your case - you may want to get in touch with hosting provider and adjust that. If not I'd recommend to create a ticket to check the issue.

    0
    Comment actions Permalink
  • Avatar
    Andy B

    This problem is caused on every plesk installation that has also OpenVpn Access Server(https://openvpn.net/vpn-server/) Installed. 
    I tried to solve it with this article(https://support.plesk.com/hc/en-us/articles/360000811873) but it doesn't work. After the restart the network interface is not available anymore for the openvpnas server, so it fails to run. 

    The only solution that works so far is to retry or delay the nginxs start-up script, but this is also not a bullet-proof solution. 

    Anyway, due to updates on pleks and linux, this is an unsolved re-occuring problem.
    Any ideas are welcomed. 

    0
    Comment actions Permalink
  • Avatar
    Anton Maslov

    Andy, please try to ban IP address from VPN using panel.ini file:

    https://support.plesk.com/hc/en-us/articles/360001505554-How-to-hide-IP-addresses-in-Plesk-

    This should block IP being added to Plesk, and as a result to Nginx configuration files.After you blocked, make sure IP is not under Tools & settings > IP addresses.

    0
    Comment actions Permalink
  • Avatar
    Andy B

    If I do this, yes the IP gets blacklisted, but the openvpnas service doesn't start well anymore.

    The OpenVpnAs service is started but network interface is not present for some reason. I will create another request for this, as it seems to be a related but different topic. 

    0
    Comment actions Permalink
  • Avatar
    Andy B

    If one installs OpenVpnAs(https://openvpn.net/vpn-server/) on a Plesk installation there is a problem on server reboot.

    Openvpn creates a network interface and that IP is read by Plesk in the ip list. All vhosts are configured also with this IP(which is not a good thing). Normally, the web-server should not listen on this interface.

    On a server reboot the network interface is not ready yet and nginx fails to start. This leads to this issue: https://support.plesk.com/hc/en-us/articles/213933865?page=1#comment_360000795999

    If one blacklists the IP address in panel.ini settings, nginx starts, but then (for some reason I don't know) openvpnas doesn't create the network interface and openvpn doesn't work.

    As a solution:
    - blacklist all openvpn ips
    - start openvpnas service after psa.service

    This causes a mess with every new installation. Any other/better ideas are welcomed.

    0
    Comment actions Permalink
  • Avatar
    Walter Jansen (Edited )

    I am also running into these problems. I'm quite new to plesk and everything. But I was wondering... do I really need the OpenVpn? Because I don't know if I am using it. I dont think so actually. It looks like it was installed by default or something. Could it work for me if I simply remove OpenVpn? Any thoughts on this

    0
    Comment actions Permalink
  • Avatar
    Julian Bonpland Mignaquy

    Walter Jansen If you are logging into Plesk without this extensions then you can remove it in Plesk > Extensions.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request