nginx no longer works

Mand

New member
Joined
May 28, 2024
Messages
4
Hi all,
I have a problem after installing an SSL certificate with Certbot, I restarted my nginx server and got this error message:
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.

Here is the result of the "systemctl status nginx.service" command:
mand@debian:~$ systemctl status nginx.service
× nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Tue 2024-05-28 12:14:32 CEST; 2min 25s ago
Duration: 46min 19.493s
Docs: man:nginx(8)
Process: 51053 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 51054 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
CPU: 30ms
Here the result of the "journalctl -xeu nginx.service" command :
Hint: You are currently not seeing messages from other users and the system.
Users in groups 'adm', 'systemd-journal' can see all messages.
Pass -q to turn off this notice.
~
I specify that I host my static site and that I use Azuracast.
So far everything was working fine until certbot. Is this related? What is the problem ?
 
Why do you use Certbot? DA have SSL integrations.

You need to run that command with sudo
 

@Kurogane

Let me explain: I was never able to have an SSL connection with the Azuracast audio player on my remote web page (I had a security alert with the browser). So I told myself that having azuracast in the same place as my website would be a solution to no longer have the browser alert, that's how I installed nginx then my website on it, even if I knew that azuracast had Nginx integrated.
Still, it worked well. I could listen to my audio stream. It was from the moment I installed my SSL certificate via certbot that nginx had a problem with Azuracast. And for good reason: there is a port conflict between the two. Look :

sudo systemctl status nginx.service
× nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enable>
Active: failed (Result: exit-code) since Tue 2024-05-28 14:54:23 CEST; 3mi>
Docs: man:nginx(8)
Process: 758 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_proces>
Process: 767 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (co>
CPU: 55ms

mai 28 14:54:19 debian systemd[1]: Starting nginx.service - A high performance >
mai 28 14:54:21 debian nginx[767]: nginx: [emerg] bind() to 0.0.0.0:443 failed >
mai 28 14:54:21 debian nginx[767]: nginx: [emerg] bind() to 0.0.0.0:443 failed >
mai 28 14:54:22 debian nginx[767]: nginx: [emerg] bind() to 0.0.0.0:443 failed >
mai 28 14:54:22 debian nginx[767]: nginx: [emerg] bind() to 0.0.0.0:443 failed >
mai 28 14:54:23 debian nginx[767]: nginx: [emerg] bind() to 0.0.0.0:443 failed >
mai 28 14:54:23 debian nginx[767]: nginx: [emerg] still could not bind()
mai 28 14:54:23 debian systemd[1]: nginx.service: Control process exited, code=>
mai 28 14:54:23 debian systemd[1]: nginx.service: Failed with result 'exit-code>
mai 28 14:54:23 debian systemd[1]: Failed to start nginx.service - A high perfo>
mand@debian:~$ sudo journalctl -xeu nginx.service
mai 28 14:54:22 debian nginx[767]: nginx: [emerg] bind() to 0.0.0.0:443 failed >
mai 28 14:54:23 debian nginx[767]: nginx: [emerg] bind() to 0.0.0.0:443 failed >
mai 28 14:54:23 debian nginx[767]: nginx: [emerg] still could not bind()
mai 28 14:54:23 debian systemd[1]: nginx.service: Control process exited, code=>
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ An ExecStart= process belonging to unit nginx.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
mai 28 14:54:23 debian systemd[1]: nginx.service: Failed with result 'exit-code>
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit nginx.service has entered the 'failed' state with result 'exit-code>
mai 28 14:54:23 debian systemd[1]: Failed to start nginx.service - A high perfo>
░░ Subject: L'unité (unit) nginx.service a échoué
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ L'unité (unit) nginx.service a échoué, avec le résultat failed.

sudo netstat -pant | grep -i listen | grep -Ei ':80|:443'
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 9244/docker-proxy

tcp 0 0 0.0.0.0:8096 0.0.0.0:* LISTEN 8575/docker-proxy

tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 8673/docker-proxy
tcp 0 0 0.0.0.0:8095 0.0.0.0:* LISTEN 8606/docker-proxy
tcp 0 0 0.0.0.0:8090 0.0.0.0:* LISTEN 8648/docker-proxy
tcp 0 0 0.0.0.0:8070 0.0.0.0:* LISTEN 8747/docker-proxy
tcp 0 0 0.0.0.0:8066 0.0.0.0:* LISTEN 8767/docker-proxy
tcp 0 0 0.0.0.0:8065 0.0.0.0:* LISTEN 8788/docker-proxy
tcp 0 0 0.0.0.0:8076 0.0.0.0:* LISTEN 8698/docker-proxy
tcp 0 0 0.0.0.0:8075 0.0.0.0:* LISTEN 8723/docker-proxy
tcp 0 0 0.0.0.0:8055 0.0.0.0:* LISTEN 8851/docker-proxy
tcp 0 0 0.0.0.0:8050 0.0.0.0:* LISTEN 8875/docker-proxy
tcp 0 0 0.0.0.0:8060 0.0.0.0:* LISTEN 8807/docker-proxy
tcp 0 0 0.0.0.0:8056 0.0.0.0:* LISTEN 8826/docker-proxy
tcp 0 0 0.0.0.0:8036 0.0.0.0:* LISTEN 8965/docker-proxy
tcp 0 0 0.0.0.0:8035 0.0.0.0:* LISTEN 8984/docker-proxy
tcp 0 0 0.0.0.0:8046 0.0.0.0:* LISTEN 8901/docker-proxy
tcp 0 0 0.0.0.0:8045 0.0.0.0:* LISTEN 8923/docker-proxy
tcp 0 0 0.0.0.0:8040 0.0.0.0:* LISTEN 8945/docker-proxy
tcp 0 0 0.0.0.0:8020 0.0.0.0:* LISTEN 9069/docker-proxy
tcp 0 0 0.0.0.0:8016 0.0.0.0:* LISTEN 9091/docker-proxy
tcp 0 0 0.0.0.0:8030 0.0.0.0:* LISTEN 9007/docker-proxy
tcp 0 0 0.0.0.0:8026 0.0.0.0:* LISTEN 9028/docker-proxy
tcp 0 0 0.0.0.0:8025 0.0.0.0:* LISTEN 9046/docker-proxy
tcp 0 0 0.0.0.0:8006 0.0.0.0:* LISTEN 9156/docker-proxy
tcp 0 0 0.0.0.0:8005 0.0.0.0:* LISTEN 9178/docker-proxy
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 9201/docker-proxy
tcp 0 0 0.0.0.0:8015 0.0.0.0:* LISTEN 9113/docker-proxy
tcp 0 0 0.0.0.0:8010 0.0.0.0:* LISTEN 9135/docker-proxy
tcp6 0 0 :::443 :::* LISTEN 9252/docker-proxy
tcp6 0 0 :::8096 :::* LISTEN 8583/docker-proxy
tcp6 0 0 :::8080 :::* LISTEN 8681/docker-proxy
tcp6 0 0 :::8095 :::* LISTEN 8615/docker-proxy
tcp6 0 0 :::8090 :::* LISTEN 8655/docker-proxy
tcp6 0 0 :::8070 :::* LISTEN 8753/docker-proxy
tcp6 0 0 :::8066 :::* LISTEN 8775/docker-proxy
tcp6 0 0 :::8065 :::* LISTEN 8794/docker-proxy
tcp6 0 0 :::8076 :::* LISTEN 8706/docker-proxy
tcp6 0 0 :::8075 :::* LISTEN 8730/docker-proxy
tcp6 0 0 :::8055 :::* LISTEN 8859/docker-proxy
tcp6 0 0 :::8050 :::* LISTEN 8881/docker-proxy
tcp6 0 0 :::8060 :::* LISTEN 8814/docker-proxy
tcp6 0 0 :::8056 :::* LISTEN 8833/docker-proxy
tcp6 0 0 :::8036 :::* LISTEN 8971/docker-proxy
tcp6 0 0 :::8035 :::* LISTEN 8992/docker-proxy
tcp6 0 0 :::8046 :::* LISTEN 8908/docker-proxy
tcp6 0 0 :::8045 :::* LISTEN 8929/docker-proxy
tcp6 0 0 :::8040 :::* LISTEN 8951/docker-proxy
tcp6 0 0 :::8020 :::* LISTEN 9075/docker-proxy
tcp6 0 0 :::8016 :::* LISTEN 9098/docker-proxy
tcp6 0 0 :::8030 :::* LISTEN 9014/docker-proxy
tcp6 0 0 :::8026 :::* LISTEN 9034/docker-proxy
tcp6 0 0 :::8025 :::* LISTEN 9053/docker-proxy
tcp6 0 0 :::8006 :::* LISTEN 9164/docker-proxy
tcp6 0 0 :::8005 :::* LISTEN 9186/docker-proxy
tcp6 0 0 :::8000 :::* LISTEN 9208/docker-proxy
tcp6 0 0 :::8015 :::* LISTEN 9121/docker-proxy
tcp6 0 0 :::8010 :::* LISTEN 9142/docker-proxy

Since this morning I've been trying to find a solution and frankly, I can't take it anymore.
 
Last edited:
Never used Azuracast and don't have a server with Azuracast for testing. Should you need any assistance from me, I would need an access to the server for checking it there.

Probably there are other guys with Azuracast on the forums, and they can share their experience. Can not say for sure though.
 
but the server is not operational, it is not working.
next, what is your hourly cost?
 

@Kurogane

Let me explain: I was never able to have an SSL connection with the Azuracast audio player on my remote web page (I had a security alert with the browser). So I told myself that having azuracast in the same place as my website would be a solution to no longer have the browser alert, that's how I installed nginx then my website on it, even if I knew that azuracast had Nginx integrated.
Still, it worked well. I could listen to my audio stream. It was from the moment I installed my SSL certificate via certbot that nginx had a problem with Azuracast. And for good reason: there is a port conflict between the two. Look :







Since this morning I've been trying to find a solution and frankly, I can't take it anymore.

I have DA and azuracast running on two servers.

1. On one server I didn't want to change the radio url so i'm forced to shutdown httpd/nginx on DA, and fireup azuracast docker then visit azuracast web interface and create an ssl cert with letsencrypt once done. I shutdown azuracast docker and change azuracast default ports.
Then when azuracast started back again, I have a valid ssl connection e.g https://tld.com:8443 and then I restart httpd/nginx on DA.

2. I've added the domain to DA, created an ssl cert and then I create a custom azurcast docker-compose-override file which links to the DA domain ssl cert on the server.

Path - var/azuracast/docker-compose-override.yaml (or wherever you installed azuracast)

Code:
services:
  web:
    volumes:
      - /usr/local/directadmin/data/users/panel-admin-here/domains/domain-name-here.cert.combined:/var/azuracast/acme/ssl.crt:ro
      - /usr/local/directadmin/data/users/panel-admin-here/domains/domain-name-here.key:/var/azuracast/acme/ssl.key:ro

Ensure to customize azuracast to run on custom ports, that are not :80 or :443,

Given you have issues logining via ssh, I would suggest that you login via your server terminal panel provided by your web host. and shutdown docker and make changes as needed.
 
Back
Top