Big problem with nginx / gros problème avec nginx qui ne veut plus s’executer

Bonjour à tous, à toutes,

Bon j’ai un gros problème nginx sur mon serveur.

Quand j’essaye de le lancer via une commande voici le message :

Job for nginx.service failed because the control process exited with error code.
See “systemctl status nginx.service” and “journalctl -xe” for details.

Voilà ce que me renvoie la commande system ctl status :
systemctl status nginx.service

  • nginx.service - A high performance web server and a reverse proxy server
    Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Mon 2024-08-19 15:33:25 UTC; 11s ago
    Docs: man:nginx(8)
    Process: 2972 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
    CPU: 97ms

Aug 19 15:33:25 dusensible systemd[1]: Starting A high performance web server and a reverse proxy server…
Aug 19 15:33:25 dusensible nginx[2972]: nginx: [warn] duplicate extension “js”, content type: “text/javascript”, previous content type: “application/javascript” in /etc/nginx/c>
Aug 19 15:33:25 dusensible nginx[2972]: nginx: [emerg] BIO_new_file(“/usr/share/yunohost/ffdhe2048.pem”) failed (SSL: error:02001002:system library:fopen:No such file or direct>
Aug 19 15:33:25 dusensible nginx[2972]: nginx: configuration file /etc/nginx/nginx.conf test failed
Aug 19 15:33:25 dusensible systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Aug 19 15:33:25 dusensible systemd[1]: nginx.service: Failed with result ‘exit-code’.
Aug 19 15:33:25 dusensible systemd[1]: Failed to start A high performance web server and a reverse proxy server.

Qu’est-ce je peux faire ?

PS : j’avais mis à jour la dernière version de yunohost avant ce problème. Je n’ai évidemment accès à plus rien dans mon serveur.

Un grand merci !!

————————————————-

Hello everyone,

I have a big nginx problem on my server.

When I try to launch it with a command, I get this message :

Job for nginx.service failed because the control process exited with error code.
See “systemctl status nginx.service” and “journalctl -xe” for details.

This is what the system ctl status command returns:
systemctl status nginx.service

  • nginx.service - A high performance web server and a reverse proxy server
    Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Mon 2024-08-19 15:33:25 UTC; 11s ago
    Docs: man:nginx(8)
    Process: 2972 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
    CPU: 97ms

Aug 19 15:33:25 dusensible systemd[1]: Starting A high performance web server and a reverse proxy server…
Aug 19 15:33:25 dusensible nginx[2972]: nginx: [warn] duplicate extension “js”, content type: “text/javascript”, previous content type: “application/javascript” in /etc/nginx/c>
Aug 19 15:33:25 dusensible nginx[2972]: nginx: [emerg] BIO_new_file(“/usr/share/yunohost/ffdhe2048.pem”) failed (SSL: error:02001002:system library:fopen:No such file or direct>
Aug 19 15:33:25 dusensible nginx[2972]: nginx: configuration file /etc/nginx/nginx.conf test failed
Aug 19 15:33:25 dusensible systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Aug 19 15:33:25 dusensible systemd[1]: nginx.service: Failed with result ‘exit-code’.
Aug 19 15:33:25 dusensible systemd[1]: Failed to start A high performance web server and a reverse proxy server.

What can I do?

PS: I had updated to the latest version of yunohost before this problem. I obviously don’t have access to anything on my server anymore.

Many thanks!

Do you mean Yunohost 12 (bookworm)?

Just something to try:

Still pending configs?

sudo yunohost tools regen-conf --with-diff --force --dry-run

From your error messages, the error seems related to yunohosts security settings not being available:
grep ffdhe2048.pem -r /etc/nginx

If needed, the contents of the missing file (/usr/share/yunohost/ffdhe2048.pem) are at yunohost/share/ffdhe2048.pem at dev · YunoHost/yunohost · GitHub

Then restart the NGINX service and share the logs of the last update. This should not happen.

Doesn’t work : command not found

Ça ressemble à un truc où tu as réussi a désinstaller YunoHost alors que apt est censé t’afficher un énorme warning si tu t’appretes à faire ça et tu ne peux pas le faire sans taper littéralement “Yes, do as I say !” … ça ne te dit rien ?

Alors mea culpa, j’ai effectivement pris l’initiative surement cavalière de faire une reinstall de ssh, après que le ssh du yunohost était en rade et était impossible à relancer. Mais ça a marché !

Mais evidemment ça a mis le bazar dans nginx et l’ api de yunohost n’était plus accessible , avec message d’erreur de yunohost. J’ai donc pris l’initiative de faire une reinstall api yunohost.

Et tout refonctionne !!!

C’est donc résolu.

Un grand merci !!