Applications qui se désinstallent parce que la mise à jour bloque + nginx qui ne démarre plus

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.0.14
How are you able to access your server: The webadmin
SSH
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: Mise à jour habituelle

Description du problème :

Je souhaitais mettre à jour les applications. J’ai commencé par Element. L’application n’a pas été mise à jour et a même été désinstallée. Au lieu de m’arrêter là et de chercher à comprendre le problème, j’ai lancé la mise à jour de nextcloud. Comme Element, nextcloud n’a pas été mis à jour et l’application a été désinstallée.

J’ai voulu redémarrer le serveur et nginx n’a plus voulu démarrer. Je cherche à comprendre ce qu’il se passe.

En investiguant plus tard, j’ai également vu que Gitea n’était plus installé.

Logs et/ou erreurs :

Nginx:

# systemctl status nginx
× 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: timeout) since Fri 2025-04-11 18:41:31 UTC; 24h ago
       Docs: man:nginx(8)
    Process: 2434 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=killed, signal=TERM)
        CPU: 459ms

Apr 11 18:40:01 artanux.be systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
Apr 11 18:41:31 artanux.be systemd[1]: nginx.service: start-pre operation timed out. Terminating.
Apr 11 18:41:31 artanux.be systemd[1]: nginx.service: Control process exited, code=killed, status=15/TERM
Apr 11 18:41:31 artanux.be systemd[1]: nginx.service: Failed with result 'timeout'.
Apr 11 18:41:31 artanux.be systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.

J’ai essayé de restaurer Element, le log complet est disponible . Voici un extrait :

2025-04-12 19:24:51,137: DEBUG - + systemctl reload-or-restart nginx
2025-04-12 19:27:48,522: WARNING - Job for nginx.service failed because a timeout was exceeded.
2025-04-12 19:27:48,523: WARNING - See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.

Nginx semble être en cause. J’ai essayé de vérifier la syntaxe :

# nginx -t
2025/04/12 19:37:25 [info] 53101#53101: Using 116KiB of shared memory for nchan in /etc/nginx/nginx.conf:61
2025/04/12 19:37:25 [info] 53101#53101: Using 131072KiB of shared memory for nchan in /etc/nginx/nginx.conf:61
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Ça semble bon au niveau de la syntaxe. Pourtant nginx ne veut pas se relancer.

# systemctl start nginx
Job for nginx.service failed because a timeout was exceeded.
See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.

J’ai regardé avec la commande journalctl -xeu nginx.service mais ça ne m’apprend pas grand chose. J’essaye de fouiller dans les logs de nginx.

Dans /var/log/error.log.1, j’ai quelques lignes comme ça :

2025/04/11 10:58:46 [crit] 2308115#2308115: *635105 SSL_do_handshake() failed (SSL: error:0A00006C:SSL routines::bad key share) while SSL handshaking, client: 2602:80d:1000::66, server: [::]:443
2025/04/11 13:07:00 [crit] 2308116#2308116: *635456 SSL_do_handshake() failed (SSL: error:0A00006C:SSL routines::bad key share) while SSL handshaking, client: 164.52.0.92, server: 0.0.0.0:443
2025/04/11 13:33:11 [crit] 2308115#2308115: *635548 SSL_do_handshake() failed (SSL: error:0A00006C:SSL routines::bad key share) while SSL handshaking, client: 159.89.18.239, server: 0.0.0.0:443

Dans /var/log/access.log.1, j’ai plein de tentatives d’accès à des trucs qui existent pas avec des user agents bizarres…

196.251.70.87 - - [11/Apr/2025:14:26:41 +0000] "GET /.git/objects/pack/ HTTP/1.1" 302 138 "-" "Googlebot-Video/1.0"    
154.81.156.54 - - [11/Apr/2025:16:45:12 +0000] "GET / HTTP/1.1" 302 138 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36
 Edg/90.0.818.46"                                                                                                                                                                              
45.148.10.35 - - [11/Apr/2025:16:56:07 +0000] "\x16\x03\x01\x00\xEE\x01\x00\x00\xEA\x03\x03?\x9DL\x5C\xE2s~\xCB\xDB\xD7m\x03\x9A\xD5<\x0C\xD4\x1B**\xDE\xD3\xE1\xD8\x12\x06_\x1F=)\x00\x88 \x09
\x9Ehyw\x95\xE6\xE5\xF4>}\xAF,\xBFwn\xFB\xB5O&\xB0\xFE0d0\xE2\xF7\xAC\xBE,\xD7\x89\x00&\xC0+\xC0/\xC0,\xC00\xCC\xA9\xCC\xA8\xC0\x09\xC0\x13\xC0" 400 150 "-" "-"                               
45.148.10.35 - - [11/Apr/2025:16:56:08 +0000] "GET / HTTP/1.1" 400 150 "-" "-"                                                                                        
45.148.10.35 - - [11/Apr/2025:16:56:11 +0000] "GET /src/main/resources/application.yml HTTP/1.1" 302 138 "-" "l9explore/1.2.2"                                                                 
45.148.10.35 - - [11/Apr/2025:16:56:11 +0000] "GET /test/settings.yaml HTTP/1.1" 302 138 "-" "l9explore/1.2.2"                                                                                 
45.148.10.35 - - [11/Apr/2025:16:56:11 +0000] "GET /config/base.json HTTP/1.1" 302 138 "-" "l9explore/1.2.2"                                                                                   
45.148.10.35 - - [11/Apr/2025:16:56:11 +0000] "GET /config/aws.json HTTP/1.1" 302 138 "-" "l9explore/1.2.2" 

Ça me fait fort penser à ce que décrivent Lord et Dryusdan… Mais j’ai l’impression que les volumes sont très faibles. Je vois mal pourquoi ça empêcherait nginx de rédémarrer ?

Dans les logs, je vois que 19explore/1.2.2 , c’est un tool de scan de vulnérabilités : 19Explore sur Github. Donc il y a du scan de bots mais aussi des scripts kiddies qui jouent ? Encore une fois, rien qui semble vraiment inhabituel.

J’ai trouvé un autre post qui semble similaire : Nginx cannot start after update - #7 by bbateausurleau

Est-ce que tu as aussi une forge installée ?

Oui, j’ai un gitea installé. Avec vraiment peu de choses dessus. Mais quand je regarde les logs, ça me semble pas dingue. Quelques centaines de requêtes par jour en moyenne. Rien qui devrait mettre le serveur à terre.

Et rien qui devrait empêcher nginx de redémarrer (il me semble!).

Je te demande cela suite à ton analyse de robots scammeurs…

Je vais lire ça. Mais est-ce que ça pourrait expliquer que nginx ne démarre plus ? J’ai l’impression qu’il devrait démarrer.. recevoir plein de requêtes, saturer le cpu, crasher, … Mais là c’est pas ce qu’il se passe.

Est-ce qu’il y a un process ? ps -A | nginx

Je commencerai par vérifier ce que dit le diagnostic ainsi que yunohost tools regen-conf --dry-run --with-diff

Des IP connues pour être abusives

https://www.abuseipdb.com/check/164.52.0.92
https://www.abuseipdb.com/check/159.89.18.239

known/listed hacker/scanner IP

Tu pourrais les bannir… Quoi que j’en ai bien plus dans mes logs, sûrement une fausse piste…

je pense c’est du DDOS mais relie avec le CDN cloudflare, mais est-ce que ta mis en place un fail2ban

utilise outil yunost pour regénéré ton nginx
est-ce que ta utiliser outil yunohost pour update element et nextcloud

@rodinux : Non, pas de process.

# ps -aux | grep nginx
root       80161  0.0  0.0   6336  2104 pts/4    S+   06:26   0:00 grep nginx

@jarod5001 : Voici le diagnostic :

# yunohost diagnosis show                                                                                                                                              
reports:                                                                                                                                                                                       
  0:                                                                                                                                                                                           
    description: Base system                                                                                                                                                                   
    id: basesystem                                                                                                                                                                             
    items:                                                                                                                                                                                     
      0:                                                                                                                                                                                       
        details: Server model is                                                                                                                                                               
        status: INFO                                                                                                                                                                           
        summary: Server hardware architecture is bare-metal amd64                                                                                                                              
      1:                                                                                                                                                                                       
        status: INFO                                                                                                                                                                           
        summary: Server is running Linux kernel 4.19.62-mod-std-ipv6-64-rescue                                                                                                                 
      2:                                                                                                                                                                                       
        status: INFO                                                                                                                                                                           
        summary: Server is running Debian 12.10                                                                                                                                                
      3:                                                                                                                                                                                       
        details:                                                                                                                                                                               
          - yunohost version: 12.0.14 (stable)                                                                                                                                                 
          - yunohost-admin version: 12.0.7.1 (stable)                                                                                                                                          
          - yunohost-portal version: 12.0.10 (stable)                                                                                                                                          
          - moulinette version: 12.0.4 (stable)                                                                                                                                                
          - ssowat version: 12.0.3 (stable)                                                                                                                                                    
        status: INFO                                                                                                                                                                           
        summary: Server is running YunoHost 12.0.14 (stable)                                                                                                                                   
  1:                                                                                                                                                                                           
    description: Internet connectivity                                                                                                                                                         
    id: ip                                                                                                                                                                                     
    items:                                                                                                                                                                                     
      0:                                                                                                                                                                                       
        details:                                                                                                                                                                               
          - Global IP: xx.yy.zz.ww                                                                                                                                                            
          - Local IP: xx.yy.zz.ww                                                                                                                                                                                                         
        status: SUCCESS                                                                                                                                                                        
        summary: The server is connected to the Internet through IPv4!                                                                                                                         
      1:                                                                                                                                                                                       
        details:                                                                                                                                                                               
          - Global IP: ww:xx:yy:zz:aa:bb
          - Local IP: ww:xx:yy:zz:aa:bb
        status: SUCCESS                                                                                                                                                                        
        summary: The server is connected to the Internet through IPv6!
  2:
    description: DNS records  #Tout est en "SUCCESS"
    (...)
  3: 
    description: Ports exposure
    id: ports
    items: 
      0: 
        details: 
          - Exposing this port is needed for web features (service nginx)
          - To fix this issue, you most probably need to configure port forwarding on your internet router as described in https://yunohost.org/isp_box_config
        status: ERROR
        summary: Port 80 is not reachable from the outside.
      1: 
        details: 
          - Exposing this port is needed for web features (service nginx)
          - To fix this issue, you most probably need to configure port forwarding on your internet router as described in https://yunohost.org/isp_box_config
        status: ERROR
        summary: Port 443 is not reachable from the outside.
        # Sans nginx, normal que les ports 80 et 443 ne soient pas accessibles...
        # Le reste est OK
  4:                                                                                                                                                                                           
    description: Web                                                                                                                                                                           
    id: web                                                                                                                                                                                    
    items:                                                                                                                                                                                     
      0:                                                                                                                                                                                       
        details: Connection error: could not connect to the requested domain, it s very likely unreachable.                                                                                    
        status: ERROR 
        # Sans nginx, normal encore une fois que les domaines ne soient pas accessibles
  5: 
    description: Email
    #Tout est en SUCCESS
  6: 
    description: Services status check
    id: services
    items: 
      5: 
        details: You can try to restart the service, and if it doesn't work, have a look at the service logs in the webadmin (from the command line, you can do this with 'yunohost service res
tart nginx' and 'yunohost service log nginx').'
        status: ERROR
        summary: Service nginx is failed :(
      11:                                                                                                                                                                                      
        details: You can try to restart the service, and if it doesn't work, have a look at the service logs in the webadmin (from the command line, you can do this with 'yunohost service res
tart postgresql' and 'yunohost service log postgresql').'                                                                                                                                       
        status: ERROR                                                                                                                                                                          
        summary: Service postgresql is dead :(   
        #Postgres est en erreur depuis que j'ai upgradé la version, voir https://forum.yunohost.org/t/synapse-redemarre-en-boucle-a-cause-de-postgresql-v2/35824/2 , ça empêchait pas les services de fonctionner.
       # Le reste fonctionne
  7: 
    description: System resources
    id: systemresources
    items: 
      0: 
        status: SUCCESS
        summary: The system still has 2.5 GiB (67%) RAM available out of 3.8 GiB.
      1: 
        details: Please be careful and aware that if the server is hosting swap on an SD card or SSD storage, it may drastically reduce the life expectancy of the device.
        status: SUCCESS
        summary: The system has 511 MiB of swap!
      2: 
        status: SUCCESS
        summary: Storage / (on device /dev/sda2) still has 1.0 TiB (60%) space left (out of 1.7 TiB)!
      3: 
        status: SUCCESS
        summary: Storage /boot (on device /dev/sda1) still has 413 MiB (90.3%) space left (out of 457 MiB)!
  8: 
    description: System configurations
    id: regenconf
    items: 
  9: 
    description: Applications
    id: apps
    items:

Rien d’inquiétant dans le diagnostic à mon sens hormis nginx qui déconne (et qui entraîne les autres erreurs).

Voici ce que donne yunohost tools regen-conf --dry-run --with-diff :

# yunohost tools regen-conf --dry-run --with-diff
Warning: The configuration file '/etc/systemd/system/ntp.service.d/ynh-override.conf' has been manually modified and will not be updated                                                       
Warning: The configuration file '/etc/apt/sources.list.d/extra_php_version.list' has been manually modified and will not be updated                                                            
Success! The configuration would have been updated for category 'dnsmasq'                                                                                                                      
apt:                                                                                                                                                                                           
  applied:                                                                                                                                                                                     
  pending:                                                                                                                                                                                     
    /etc/apt/sources.list.d/extra_php_version.list:                                                                                                                                            
      diff: @@ -1 +1 @@                                                                                                                                                                        
-deb https://packages.sury.org/php/ bookworm main                                                                                                                                              
+deb [signed-by=/etc/apt/trusted.gpg.d/extra_php_version.gpg] https://packages.sury.org/php/ bookworm main                                                                                     
      status: modified                                                                                                                                                                         
dnsmasq:                                                                                                                                                                                       
  applied:                                                                                                                                                                                     
    /etc/resolv.dnsmasq.conf:                                                                                                                                                                  
      diff: @@ -1,22 +1,22 @@                                                                                                                                                                  
+nameserver 2a0c:e300::100
+nameserver 2001:67c:28a4::
+nameserver 194.0.5.3
+nameserver 185.233.100.100
+nameserver 2a00:5881:8100:1000::3
+nameserver 2001:678:8::3
+nameserver 45.67.81.23
+nameserver 91.239.100.100
+nameserver 2a0c:e300::101
+nameserver 194.150.168.168
+nameserver 89.233.43.71
+nameserver 2a01:3a0:53:53::
+nameserver 2a07:e340::2
+nameserver 185.233.100.101
+nameserver 84.200.70.40
+nameserver 2001:1608:10:25::9249:d69b
+nameserver 2001:1608:10:25::1c04:b12f
 nameserver 2a0c:e300::1337
-nameserver 194.0.5.3
+nameserver 194.242.2.2
 nameserver 89.234.141.66
-nameserver 45.67.81.23
-nameserver 185.233.100.101
-nameserver 185.233.100.100
-nameserver 2001:678:8::3
-nameserver 2a07:e340::2
-nameserver 2001:67c:28a4::
-nameserver 91.239.100.100
-nameserver 89.233.43.71
 nameserver 84.200.69.80
-nameserver 2a01:3a0:53:53::
-nameserver 194.150.168.168
-nameserver 2a0c:e300::101
-nameserver 2001:1608:10:25::1c04:b12f
-nameserver 84.200.70.40
-nameserver 194.242.2.2
-nameserver 2001:1608:10:25::9249:d69b
-nameserver 2a00:5881:8100:1000::3
 nameserver 195.160.173.53
-nameserver 2a0c:e300::100
      status: updated
  pending: 
yunohost: 
  applied: 
  pending: 
    /etc/systemd/system/ntp.service.d/ynh-override.conf: 
      diff: @@ -1,3 +0,0 @@
-[Unit]
-ConditionCapability=CAP_SYS_TIME
-ConditionVirtualization=!container
      status: modified

Je ne vois rien qui pourrait expliquer le problème avec nginx.

Je ne pense pas que ça soit du DDOS. Il y aurait beaucoup plus de requêtes. Ça empêcherait pas nginx de démarrer. (Mais le processeur serait saturé et il finirait par crasher…).

Je crois que comme dis @rodinux , je peux bannir les IP abusives mais c’est sûrement une fausse piste. (Ça n’empêche pas de le faire mais je crois pas que ça soit la cause principale qui explique que nginx ne démarre plus.)

Je n’ai pas envie de mettre un CDN. Et Fail2ban est bien configuré mais si nginx ne tourne plus, plus de logs et fail2ban ne fait rien.

Sinon que donne lsof -i :80 ? Et 443

Salut @jarod5001 ,

Les commandes ne renvoient rien.

# lsof -i :80
# lsof -i :443

J’ai vérifié toute la liste (avec lsof -i) et il n’y a aucune trace d’un programme qui utilise le port 80 ou le port 443. J’ai lu que parfois nginx refusait de démarrer parce qu’Apache (ou un autre serveur web) tournait sur le serveur mais ce n’est pas le cas ici.

pour commencer comme @rodinux j’ai vus les adresse ip il y a des tentative de hacking sur ton server alors le fail2ban te servira

2025/04/11 10:58:46 [crit] 2308115#2308115: *635105 SSL_do_handshake() failed (SSL: error:0A00006C:SSL routines::bad key share) while SSL handshaking, client: 2602:80d:1000::66, server: [::]:443
2025/04/11 13:07:00 [crit] 2308116#2308116: *635456 SSL_do_handshake() failed (SSL: error:0A00006C:SSL routines::bad key share) while SSL handshaking, client: 164.52.0.92, server: 0.0.0.0:443
2025/04/11 13:33:11 [crit] 2308115#2308115: *635548 SSL_do_handshake() failed (SSL: error:0A00006C:SSL routines::bad key share) while SSL handshaking, client: 159.89.18.239, server: 0.0.0.0:443

Si non ta créer un backup? ba vérifie les fichier nginx 1 par 1 sous-domain ou nom de domaine manuellement, si outil yunohost en SH ne fonctionne pas

@webjetclouds : Fail2ban utilise les logs pour fonctionner. Si nginx ne démarre pas, il n’y a pas de logs à utiliser et donc fail2ban ne peut rien faire. (Ce qui ne veut pas dire qu’il ne faut pas renforcer fail2ban pour éviter des problèmes futurs mais ce n’est pas le problème actuel.)

J’ai bien évidemment des backups. Je sauvegarde toutes les données avec Borg et tout est envoyé sur un deuxième serveur.

J’essaye de fouiller les logs un peu partout pour comprendre ce qui peut coincer.

# journalctl -u nginx | grep "Apr 12"
Apr 12 19:24:51 artanux.be systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
Apr 12 19:26:18 artanux.be nginx[52542]: 2025/04/12 19:24:51 [info] 52542#52542: Using 116KiB of shared memory for nchan in /etc/nginx/nginx.conf:61
Apr 12 19:26:18 artanux.be nginx[52542]: 2025/04/12 19:24:51 [info] 52542#52542: Using 131072KiB of shared memory for nchan in /etc/nginx/nginx.conf:61
Apr 12 19:27:48 artanux.be systemd[1]: nginx.service: start operation timed out. Terminating.
Apr 12 19:27:48 artanux.be systemd[1]: nginx.service: Failed with result 'timeout'.
Apr 12 19:27:48 artanux.be systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.
Apr 12 19:27:48 artanux.be systemd[1]: nginx.service: Consumed 1.442s CPU time.
Apr 12 19:27:52 artanux.be systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
Apr 12 19:29:22 artanux.be systemd[1]: nginx.service: start-pre operation timed out. Terminating.
Apr 12 19:29:22 artanux.be systemd[1]: nginx.service: Control process exited, code=killed, status=15/TERM
Apr 12 19:29:22 artanux.be systemd[1]: nginx.service: Failed with result 'timeout'.
Apr 12 19:29:22 artanux.be systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.
Apr 12 19:45:36 artanux.be systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
Apr 12 19:46:58 artanux.be nginx[53495]: 2025/04/12 19:45:36 [info] 53495#53495: Using 116KiB of shared memory for nchan in /etc/nginx/nginx.conf:61
Apr 12 19:46:58 artanux.be nginx[53495]: 2025/04/12 19:45:36 [info] 53495#53495: Using 131072KiB of shared memory for nchan in /etc/nginx/nginx.conf:61
Apr 12 19:48:29 artanux.be systemd[1]: nginx.service: start operation timed out. Terminating.
Apr 12 19:48:29 artanux.be systemd[1]: nginx.service: Failed with result 'timeout'.
Apr 12 19:48:29 artanux.be systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.
Apr 12 19:48:29 artanux.be systemd[1]: nginx.service: Consumed 1.478s CPU time.
Apr 12 20:18:44 artanux.be systemd[1]: nginx.service: Unit cannot be reloaded because it is inactive.
Apr 12 20:18:49 artanux.be systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
Apr 12 20:20:19 artanux.be systemd[1]: nginx.service: start-pre operation timed out. Terminating.
Apr 12 20:20:19 artanux.be systemd[1]: nginx.service: Control process exited, code=killed, status=15/TERM
Apr 12 20:20:19 artanux.be systemd[1]: nginx.service: Failed with result 'timeout'.
Apr 12 20:20:19 artanux.be systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.

Vu que le problème a l’air d’être un timeout, j’ai regardé ce qui est configuré pour le service :

# systemctl show nginx | grep ^Timeout
TimeoutStartUSec=1min 30s
TimeoutStopUSec=5s
TimeoutAbortUSec=5s
TimeoutStartFailureMode=terminate
TimeoutStopFailureMode=terminate
TimeoutCleanUSec=infinity

Je ne crois pas que ça soit la cause (nginx devrait pas mettre plus de 90 secondes à démarrer…) mais je vais tenter d’augmenter.

# EDITOR=/bin/vim systemctl edit --full nginx
# systemctl show nginx | grep ^Timeout
TimeoutStartUSec=5min
TimeoutStopUSec=20s
TimeoutAbortUSec=20s
TimeoutStartFailureMode=terminate
TimeoutStopFailureMode=terminate
TimeoutCleanUSec=infinity

Après ça, j’ai tenté un démarrage du service :

# systemctl start nginx
# systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/etc/systemd/system/nginx.service; enabled; preset: enabled)
     Active: active (running) since Sun 2025-04-13 09:30:43 UTC; 28s ago
       Docs: man:nginx(8)
    Process: 87387 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 87408 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
   Main PID: 87463 (nginx)
     Memory: 23.5M
        CPU: 2.183s
     CGroup: /system.slice/nginx.service
             ├─87463 "nginx: master process /usr/sbin/nginx -g daemon on; master_process on;"
             ├─87464 "nginx: worker process"
             ├─87466 "nginx: worker process"
             ├─87467 "nginx: worker process"
             └─87468 "nginx: worker process"

Apr 13 09:27:53 artanux.be systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
Apr 13 09:29:12 artanux.be nginx[87387]: 2025/04/13 09:27:53 [info] 87387#87387: Using 116KiB of shared memory for nchan in /etc/nginx/nginx.conf:61
Apr 13 09:29:12 artanux.be nginx[87387]: 2025/04/13 09:27:53 [info] 87387#87387: Using 131072KiB of shared memory for nchan in /etc/nginx/nginx.conf:61
Apr 13 09:30:43 artanux.be systemd[1]: Started nginx.service - A high performance web server and a reverse proxy server.

Nginx a démarré!

J’ai tenté de restaurer Element :

# yunohost backup restore element-pre-upgrade1
Info: Preparing archive for restoration…
Info: Restoring element…
Info: Provisioning sources...
Info: Provisioning system_user...
Info: Provisioning install_dir...
Info: Provisioning permissions...
Info: [++++++..............] > Restoring the app main directory...
Info: [######+++++++.......] > Restoring system configurations related to element...
Info: [####################] > Restoration completed for element
Success! Restoration completed
apps: 
  element: Success
system: 

Ça semble fonctionner. Je suis en train de restaurer aussi nextcloud.

# yunohost app remove nextcloud
(...)
Success! nextcloud uninstalled

# yunohost backup restore nextcloud-pre-upgrade1
Info: Preparing archive for restoration…
Info: Restoring nextcloud…
Info: Provisioning sources...
Info: Provisioning system_user...
Info: Provisioning install_dir...
Info: Provisioning data_dir...
Info: Provisioning permissions...
Info: Provisioning apt...
Warning: insserv: script noderige: service noderig already provided!
Info: Provisioning database...
Info: [++..................] > Restoring the app main directory...
Info: [##+++...............] > Restoring data directory...
Info: Skipping /home/yunohost.app/nextcloud which doesn't exists in the archive, probably because restoring from a safety-backup-before-upgrade
Info: [#####++.............] > Restoring the MySQL database...

Info: [#######+++..........] > Restoring system configurations related to nextcloud...
Info: Skipping /var/log/nextcloud which doesn't exists in the archive, probably because restoring from a safety-backup-before-upgrade


Info: [##########++........] > Adding multimedia directories...
Info: [############+++.....] > Restoring the Fail2Ban configuration...
Info: [###############++...] > Reloading NGINX web server...
Info: [####################] > Restoration completed for nextcloud
Success! Restoration completed
apps: 
  nextcloud: Success
system: 

Ça me semble anormal qu’il faille plusieurs minutes pour que nginx démarre. J’ai l’impression d’avoir mis un plâtre sur une jambe de bois… Qu’est-ce que ça cache ? :roll_eyes:

Il doit y avoir une autre application qui prend beaucoup de ressources pour démarrer nginx… laquelle ?

Ou bien c’est le module nchan qui a des des conflits avec d’autres modules ??

D’ailleurs pourquoi le module nchan est présent ??

que renvoi

grep -ir nchan /etc/nginx/*

et aussi

dpkg -l | grep libluajit*

Je me suis également demandé ce que c’était que ce module nchan, je me suis demandé à quoi il servait et pourquoi il était installé. Comme je n’en sais rien, je n’ai pas osé toucher.

# grep -ir nchan /etc/nginx/*
(rien)

# ls -al /etc/nginx/modules-enabled/ | grep nchan
lrwxrwxrwx 1 root root   49 Apr  7  2020 50-mod-nchan.conf -> /usr/share/nginx/modules-available/mod-nchan.conf

# dpkg -l | grep libluajit*
ii  libluajit2-5.1-2:amd64                2.1-20230119-1                                   amd64        OpenResty-maintained branch of LuaJIT (shared objects)
ii  libluajit2-5.1-common                 2.1-20230119-1                                   all          OpenResty-maintained branch of LuaJIT (common files)

J’ai essayé de voir pourquoi il a été installé :

# apt show libluajit2-5.1-common
Package: libluajit2-5.1-common
Version: 2.1-20230119-1
Priority: optional
Section: interpreters
Source: luajit2
Maintainer: Debian Lua Team <pkg-lua-devel@lists.alioth.debian.org>
Installed-Size: 223 kB
Conflicts: libluajit-5.1-common
Replaces: libluajit-5.1-common
Homepage: https://github.com/openresty/luajit2
Download-Size: 46.6 kB
APT-Manual-Installed: no
APT-Sources: http://deb.debian.org/debian bookworm/main amd64 Packages
Description: OpenResty-maintained branch of LuaJIT (common files)
 This package contains files needed by the LuaJIT interpreter/jitter as well
 by its embeddable (i.e. library) version.

# apt search libluajit2
Sorting... Done
Full Text Search... Done
libluajit2-5.1-2/stable,now 2.1-20230119-1 amd64 [installed,automatic]
  OpenResty-maintained branch of LuaJIT (shared objects)

libluajit2-5.1-common/stable,now 2.1-20230119-1 all [installed,automatic]
  OpenResty-maintained branch of LuaJIT (common files)

Ça ne m’aide pas mais au moins ça confirme que ça a été installé automatiquement (dépendance d’autre chose).

C’est normal que libluajit2 soit installé, chez moi aussi… certains ont eu des soucis avec libluajit comme dépendance (ancienne version), mais ce n’est pas le cas ici.

Ici c’est le module nchan qui semble être en cause… est-il une dépendance nécessaire ? à quelle application ? ou peut-il être enlevé ? c’est la question que je me pose…