Skip to main content

CPANEL-40292 - testing installation and uninstallation of Nginx sometimes leave Nginx in a error wont start

Comments

6 comments

  • cPRex Jurassic Moderator
    Hey there! I did the following: -built an Edge server on Ubuntu -installed Nginx through the EA4 interface At this point it restarted normally -removed Nginx through EA4 I confirmed I still see POP3 and IMAP in service manager -reinstalled Nginx through EA4 I confirmed I still see POP3 and IMAP in service manager - no odd restart issues either At this point, I can't reproduce, but you're welcome to create a ticket with our team if you'd like us to check out that specific machine.
    0
  • Spirogg
    Hey there! I did the following: -built an Edge server on Ubuntu -installed Nginx through the EA4 interface At this point it restarted normally -removed Nginx through EA4 I confirmed I still see POP3 and IMAP in service manager -reinstalled Nginx through EA4 I confirmed I still see POP3 and IMAP in service manager - no odd restart issues either At this point, I can't reproduce, but you're welcome to create a ticket with our team if you'd like us to check out that specific machine.

    - uninstall and - soft reboot server and then install Nginx again is what I did, I don't think it happens all the time. possibly Not waiting till the process finished before soft reboot ? not sure. will try it again later and see if I can nail down the replication and if it happens I will open ticket with the team Thanks
    0
  • Spirogg
    Hey there! I did the following: -built an Edge server on Ubuntu -installed Nginx through the EA4 interface At this point it restarted normally -removed Nginx through EA4 I confirmed I still see POP3 and IMAP in service manager -reinstalled Nginx through EA4 I confirmed I still see POP3 and IMAP in service manager - no odd restart issues either At this point, I can't reproduce, but you're welcome to create a ticket with our team if you'd like us to check out that specific machine.

    ok It happened again I have Proxmox Server and this is a VM Ubuntu and cPanel 102.08 everything was running fine with serer for a few days and today i updated the Proxmox server some apt updates and installed them and had to reboot server. then I got email that Nginx is down. went to Home/Software/Nginx Manager click reboot Nignx and got the error again, So I just put in a ticket for them to look at why this is happening only in Ubuntu. the Other 2 VM's are using AlmaLinux and cPanel 102.08 and they are up and running. ? here is the Ticket #94427991 if you want to Follow along Thanks Spiro
    0
  • cPRex Jurassic Moderator
    Thanks so much - following now!
    0
  • Spirogg
    Thanks so much - following now!

    @cPRex Once again David H. has replicated this issue on a test server and found the issue It appears that on Ubuntu servers, the "nginx-debug" service is set to be enabled when the ea-nginx package is installed. You can see this here: [18:32:12 server2 root@94427991 ~]cPs# systemctl status nginx-debug ? nginx-debug.service - nginx - high performance web server Loaded: loaded (/lib/systemd/system/nginx-debug.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2022-03-22 01:37:20 CDT; 17h ago Docs: nginx documentation Process: 1001 ExecStart=/usr/sbin/nginx-debug -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS) Main PID: 1289 (nginx-debug)
    On CentOS servers, this service is disabled as expected: # systemctl status nginx-debug ? nginx-debug.service - nginx - high performance web server Loaded: loaded (/usr/lib/systemd/system/nginx-debug.service; disabled; vendor preset: disabled)
    This "nginx-debug" process starts before "nginx", and binds to ports 80 and 443 as per usual. When "nginx" attempts to start, it fails as the ports are already bound to "nginx-debug". You can see this here in the server's log as well: Mar 22 01:37:12 server2 systemd[1]: Starting nginx - high performance web server... Mar 22 01:37:12 server2 systemd[1]: Starting nginx - high performance web server... Mar 22 01:37:15 server2 nginx[1002]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Mar 22 01:37:15 server2 nginx[1002]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) Mar 22 01:37:15 server2 nginx[1002]: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
    I have also performed the workaround on your server at this time to start the standard EA-NGINX process: [18:41:26 server2 root@94427991 ~]cPs# systemctl stop nginx-debug [19:14:33 server2 root@94427991 ~]cPs# systemctl disable nginx-debug Removed /etc/systemd/system/multi-user.target.wants/nginx-debug.service. [19:14:39 server2 root@94427991 ~]cPs# /scripts/restartsrv_nginx Waiting for "nginx" to start ""waiting for "nginx" to initialize "finished. Service Status nginx (nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf) is running as root with PID 55124 (systemd+/proc check method). Startup Log Mar 22 19:14:46 server2. e .com systemd[1]: Starting nginx - high performance web server... Mar 22 19:14:46 server2.e .com systemd[1]: Started nginx - high performance web server. nginx started successfully.
    I have filed a case with our developers regarding this with case ID CPANEL-40292. I also have created the following article for additional information on this:
    0
  • cPRex Jurassic Moderator
    Thanks for posting!
    0

Please sign in to leave a comment.