After a reboot, nginx does not start
-
I have these messages after a reboot attempt
root@emendesfr-vt-prod-cloudron:/home/client_176_2# systemctl restart nginx Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. root@emendesfr-vt-prod-cloudron:/home/client_176_2# systemctl status nginx.service ● nginx.service - nginx - high performance web server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Drop-In: /etc/systemd/system/nginx.service.d └─cloudron.conf Active: failed (Result: exit-code) since Tue 2022-02-15 23:23:07 UTC; 5s ago Docs: http://nginx.org/en/docs/ Process: 27606 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE) févr. 15 23:23:07 emendesfr-vt-prod-cloudron systemd[1]: nginx.service: Service hold-off time over, scheduling restart. févr. 15 23:23:07 emendesfr-vt-prod-cloudron systemd[1]: nginx.service: Scheduled restart job, restart counter is at 5. févr. 15 23:23:07 emendesfr-vt-prod-cloudron systemd[1]: Stopped nginx - high performance web server. févr. 15 23:23:07 emendesfr-vt-prod-cloudron systemd[1]: nginx.service: Start request repeated too quickly. févr. 15 23:23:07 emendesfr-vt-prod-cloudron systemd[1]: nginx.service: Failed with result 'exit-code'. févr. 15 23:23:07 emendesfr-vt-prod-cloudron systemd[1]: Failed to start nginx - high performance web server. root@emendesfr-vt-prod-cloudron:/home/client_176_2#
-
the
journalctl -xe
resultroot@emendesfr-vt-prod-cloudron:/home/client_176_2# journalctl -xe -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- L'unité (unit) nginx.service a échoué, avec le résultat RESULT. févr. 15 23:29:20 emendesfr-vt-prod-cloudron systemd[1]: nginx.service: Service hold-off time over, scheduling restart. févr. 15 23:29:20 emendesfr-vt-prod-cloudron systemd[1]: nginx.service: Scheduled restart job, restart counter is at 5. -- Subject: Le redémarrage automatique d'une unité (unit) a été planifié -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- Le redémarrage automatique de l'unité (unit) nginx.service a été planifié, en -- raison de sa configuration avec le paramètre Restart=. févr. 15 23:29:20 emendesfr-vt-prod-cloudron systemd[1]: Stopped nginx - high performance web server. -- Subject: L'unité (unit) nginx.service a terminé son arrêt -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- L'unité (unit) nginx.service a terminé son arrêt. févr. 15 23:29:20 emendesfr-vt-prod-cloudron systemd[1]: nginx.service: Start request repeated too quickly. févr. 15 23:29:20 emendesfr-vt-prod-cloudron systemd[1]: nginx.service: Failed with result 'exit-code'. févr. 15 23:29:20 emendesfr-vt-prod-cloudron systemd[1]: Failed to start nginx - high performance web server. -- Subject: L'unité (unit) nginx.service a échoué -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- L'unité (unit) nginx.service a échoué, avec le résultat RESULT. févr. 15 23:29:23 emendesfr-vt-prod-cloudron sshd[31508]: Invalid user test02 from XX.XX.XX.XX port 42620 févr. 15 23:29:23 emendesfr-vt-prod-cloudron sshd[31508]: pam_unix(sshd:auth): check pass; user unknown févr. 15 23:29:23 emendesfr-vt-prod-cloudron sshd[31508]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=92.255.8 févr. 15 23:29:24 emendesfr-vt-prod-cloudron sshd[31508]: Failed password for invalid user test02 from XX.XX.XX.XX port 42620 ssh2 févr. 15 23:29:24 emendesfr-vt-prod-cloudron sshd[31508]: Received disconnect from XX.XX.XX.XX port 42620:11: Bye Bye [preauth] févr. 15 23:29:24 emendesfr-vt-prod-cloudron sshd[31508]: Disconnected from invalid user test02 XX.XX.XX.XX port 42620 [preauth] lines 1530-1561/1561 (END)
-
@jeau Do you have any stopped apps ? If so, I think the issue is that you have to delete their nginx configs under
/home/yellowtent/platformdata/nginx/
(they will have the app id in the filename). After you delete those configs,systemctl restart nginx
will bring it back up. -
To give more context: in a previous release of Cloudron, we started deleting "old certs" ( > 6 months) . The certs of stopped apps is not renewed. This means that the nginx configs of stopped apps start referencing missing cert files and this causes nginx to not start. The fix is simply to remove those nginx configs. You can see which config is causing the issue from
journalctl -u nginx -fa
. -
@girish great thanks, it's works. I have to clean up my old stuffs
However, I have a problem that I noticed before this event.
I have an application that works but displays this error:
Error : Nginx Error - Error reloading nginx: reload exited with code 1 signal null
-
-
Hi @girish
I have a similar problem (missing certificate so nginx does not start)
root@my:~# journalctl -u nginx -fa -- Logs begin at Wed 2022-08-03 20:41:55 UTC. -- Aug 03 23:45:02 my nginx[17769]: nginx: [emerg] cannot load certificate key "/home/yellowtent/platformdata/nginx/cert/_.domainnamexxxx.info.key": PEM_read_bio_PrivateKey() failed (SSL: error:0906D06C:PEM routines:PEM_read_bio:no start line:Expecting: ANY PRIVATE KEY)
I find app config files in /home/yellowtent/platformdata/nginx/applications
But the nginx-log messages does not tell what app exactly is creating the problem.
May I delete all config files, or do I have to go "trial and error" with each file to figure it out?
Where do I find the nginx config files for the app relating to the missing certificate?
-
Problem solved. I deleted ALL config files and restarted the server.
-
-
Just wanted to say I've also hit just this issue. Cleaning up the nginx app config files did the trick but I wonder if this can be avoided in the future? Or may be it has already be addressed and I'm only hitting it because of some legacy stuff from previous Cloudron version? (this instance is currently running 7.5.0 but hasn't had a fresh install in a long while).
-
-
-