Nginx fail after reboot server

Discussion in 'ISPConfig 3 Priority Support' started by ktownmods, Oct 26, 2018.

  1. ktownmods

    ktownmods Member HowtoForge Supporter

    Hey my Nginx not start after a server reboot.
    Restart manually with service nginx restart works only after a reboot not
    change my real ip to 0.0.0.0
    followed this tutorial https://www.howtoforge.com/tutorial/perfect-server-ubuntu-18-04-nginx-bind-dovecot-and-ispconfig-3/


    Code:
    Oct 26 21:17:39 mail systemd[1]: Starting A high performance web server and a reverse proxy server...
    Oct 26 21:17:39 mail nginx[751]: nginx: [emerg] bind() to 0.0.0.0:443 failed (99: Cannot assign requested address)
    Oct 26 21:17:39 mail nginx[751]: nginx: configuration file /etc/nginx/nginx.conf test failed
    Oct 26 21:17:39 mail systemd[1]: nginx.service: Control process exited, code=exited status=1
    Oct 26 21:17:39 mail systemd[1]: nginx.service: Failed with result 'exit-code'.
    Oct 26 21:17:39 mail systemd[1]: Failed to start A high performance web server and a reverse proxy server.
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    If this is a server you just installed, go through that installation guide and compare the packages that are installed and the settings.
     
  3. ktownmods

    ktownmods Member HowtoForge Supporter

    I have already done that but either I am blind or I have no plan xD
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  5. ktownmods

    ktownmods Member HowtoForge Supporter

    Only After complete Server reboot
    If i run Service nginx restart it work
    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.1.13
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 7.2.10-0ubuntu***.***.***.***
    
    ##### PORT CHECK #####
    
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
            Unknown process (nginx:) (PID 10369)
    [INFO] I found the following mail server(s):
            Postfix (PID 1376)
    [INFO] I found the following pop3 server(s):
            Dovecot (PID 1186)
    [INFO] I found the following imap server(s):
            Dovecot (PID 1186)
    [INFO] I found the following ftp server(s):
            PureFTP (PID 1286)
    
    ##### LISTENING PORTS #####
    (only           ()
    Local           (Address)
    [anywhere]:110          (1186/dovecot)
    [anywhere]:143          (1186/dovecot)
    [anywhere]:80           (10369/nginx:)
    [anywhere]:8080         (10369/nginx:)
    [anywhere]:8081         (10369/nginx:)
    [anywhere]:465          (1376/master)
    [localhost]:8082                (754/pushxx)
    [localhost]:8083                (754/pushxx)
    [anywhere]:21           (1286/pure-ftpd)
    ***.***.***.***:53              (735/named)
    [localhost]:53          (735/named)
    --More--
     
    Last edited: Oct 27, 2018
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You have this in your log:
    Code:
    nginx: configuration file /etc/nginx/nginx.conf test failed
    Put that in Internet search engines.
     
  7. ktownmods

    ktownmods Member HowtoForge Supporter

    I installed the by the Tutorial from howtoforge
    I pay for priority Support
    So i ask here for my problem

    My conf seems to be ok
    Code:
    sudo nginx -t
    nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
    nginx: configuration file /etc/nginx/nginx.conf test is successful
     
    Last edited: Oct 27, 2018
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You are not paying me.
    Anyway, using Internet searh engines, I found this:
    I use Apache so I do not know nginx, but that looks promising.
     
  9. ktownmods

    ktownmods Member HowtoForge Supporter

    You See my post above?
    My conf seemsto be ok
    I Not say i pay you or?
     
  10. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What is using port 443?
     
  11. ktownmods

    ktownmods Member HowtoForge Supporter

    Nginx https?
     
  12. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    The log in #1:
    Looks like after reboot something else is using it, maybe?
    Also from Internet Search Engines: https://blog.serverdensity.com/troubleshoot-nginx/
     
  13. ktownmods

    ktownmods Member HowtoForge Supporter

    Then the Message is address already in use
    In my case
    Cannot assign requested address

    I think i wait for anyone with nginx knowledge
    But thanks you anyways for your help
     
    Taleman likes this.
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    The address must be in use already (e.g. by another web server like apache) or it is somehow configured twice in nginx so that ngix tries to bind to it a second time.

    Please post the output of:

    netstat -ntap | grep 443
     
  15. ktownmods

    ktownmods Member HowtoForge Supporter

    Output after reboot server is nothing (nginx not start)
    after service nginx restart
    ip nulled

    Code:
    tcp        0      0 0.0.0.0:443          0.0.0.0:*               LISTEN      2707/nginx: master
    
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so nginx starts when you start it manually? At least the netstat output shows that it's started and listening on the SSL port.
     
  17. ktownmods

    ktownmods Member HowtoForge Supporter

    Yes
    Only on reboot nginx fails with the above error
    Restart manually works
     
  18. ktownmods

    ktownmods Member HowtoForge Supporter

    Hey, i cant solve this problem, anyone can help me?

    It is annoying to restart nginx every reboot
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Every time when you reboot nginx, you get this message in the log file?

    mail nginx[751]: nginx: configuration file /etc/nginx/nginx.conf test failed

    and when you test the nginx.conf, it does not contain errors?
     
  20. ktownmods

    ktownmods Member HowtoForge Supporter

    The only thing in the log, after a reboot is

    Code:
    2019/07/26 22:50:50 [emerg] 805#805: bind() to xxx.xxx.xxx.xxx:443 failed (99: Cannot assign requested address)
     

Share This Page