PHP Broke since Custom Web App Update

My YunoHost server

YunoHost version: 4.0.1 alpha

I have access to my server : Through SSH | through the webadmin

Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Since CUSTOM Web App update, php fpm broke. Here is the log

I don’t know how to resolve this problem :confused:

– Logs begin at Thu 2019-02-14 11:11:58 CET, end at Wed 2020-06-17 14:59:33 CEST. –
juin 17 13:49:49 systemd[1]: php7.3-fpm.service: Failed with result ‘exit-code’.
– Subject: Unit failed
– Defined-By: systemd
– Support: https://www.debian.org/support

– The unit php7.3-fpm.service has entered the ‘failed’ state with result ‘exit-code’.
juin 17 13:49:49 systemd[1]: Failed to start The PHP 7.3 FastCGI Process Manager.
– Subject: L’unité (unit) php7.3-fpm.service a échoué
– Defined-By: systemd
– Support: https://www.debian.org/support

– L’unité (unit) php7.3-fpm.service a échoué, avec le résultat failed.
juin 17 13:52:06 systemd[1]: Starting The PHP 7.3 FastCGI Process Manager…
– Subject: L’unité (unit) php7.3-fpm.service a commencé à démarrer
– Defined-By: systemd
– Support: https://www.debian.org/support

– L’unité (unit) php7.3-fpm.service a commencé à démarrer.
juin 17 13:52:06 php-fpm7.3[4417]: [17-Jun-2020 13:52:06] ERROR: [pool my_webapp__4] cannot get uid for user ‘my_webapp__4’
juin 17 13:52:06 php-fpm7.3[4417]: [17-Jun-2020 13:52:06] ERROR: FPM initialization failed
juin 17 13:52:06 systemd[1]: php7.3-fpm.service: Main process exited, code=exited, status=78/CONFIG
– Subject: Unit process exited
– Defined-By: systemd
– Support: https://www.debian.org/support

– An ExecStart= process belonging to unit php7.3-fpm.service has exited.

– The process’ exit code is ‘exited’ and its exit status is 78.
juin 17 13:52:06 systemd[1]: php7.3-fpm.service: Failed with result ‘exit-code’.
– Subject: Unit failed
– Defined-By: systemd
– Support: https://www.debian.org/support

Can you share the log of the upgrade…

Same issue for me this morning.
Here the log : https://paste.yunohost.org/raw/kuxuxazuna

@pcet : can you tell what does
php-fpm7.0 --test

returns ?

J’ai le même problème chez moi :
Same issue here :

https://paste.yunohost.org/raw/egazojuzuf

For me it’s yunohost 4.0.1 alpha so php 7.3

The test said NOTICE: configuration file /etc/php/7.3/fpm/php-fpm.conf test is successful

L’upgrade de la custom web app donne : https://paste.yunohost.org/raw/ayejokepiw

Same output for me,
sudo php-fpm7.0 --test
[17-Jun-2020 15:38:48] NOTICE: configuration file /etc/php/7.0/fpm/php-fpm.conf test is successful

My version is yunohost 3.8.4.8

même problème… si cela peut aider, un log en plus : https://paste.yunohost.org/raw/gusexocesi

1 Like

Pas sur de piger l’origine du bug mais j’ai fait une PR qui devrait normalement fixer le soucis …

C’est possible de tester avec :

yunohost app upgrade my_webapp -u https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing
2 Likes

Ça marche !!
:+1:
Merci @Aleks !

1 Like

N.B. : attention, pour se connecter à l’app après cette mise à jour, il faudra utiliser comme login l’ID de l’app (par exemple my_webapp, ou bien my_webapp__2, etc…) au lieu de “webapp1” ou “webapp2”)

La connexion sftp avec le login de l’app permet (pour moi) d’arriver à /var/www/my_webapp, ce qui me paraît un peu dangereux, non ?

Pourquoi tu trouves ça dangereux ?

Avec un client, genre Filezilla, une bêtise peut vite arriver…
C’est mon avis personnel, je trouve plus rassurant de n’avoir accès qu’à la racine de la webapp - après, le login “webapp1” marche toujours, avec le comportement d’avant.
Sinon, beau travail pour les nouveautés dans l’admin, notamment !

Beh du coup je viens de tester et je n’ai acces que a la racine de my_webapp…

Est-ce que tu peux vérifier avec yunohost service regen-conf ssh que la conf est d’équerre

Ça me dit qu’elle a été modifiée manuellement… :thinking:

Un diff me donne :

        `Attention : Le fichier de configuration '/etc/ssh/sshd_config' a été modifié manuellement et ne sera pas mis à jour
ssh: 
  applied: 
  pending: 
    /etc/ssh/sshd_config: 
      diff: @@ -80,12 +80,15 @@
 # If the server is a VPS, it's expected that the owner of the
 # server has access to a web console through which to log in.
 Match Address 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,169.254.0.0/16,fe80::/10,fd00::/8
+        PermitRootLogin yes
+
 ##-> my_webapp
 # Hardening user connection
-Match User webapp1
-  ChrootDirectory %h
-  ForceCommand internal-sftp
-  AllowTcpForwarding no
-  PermitTunnel no
-  X11Forwarding no
+Match User my_webapp
+    ChrootDirectory %h
+    ForceCommand internal-sftp
+    AllowTcpForwarding no
+    PermitTunnel no
+    X11Forwarding no
+    PasswordAuthentication yes
 ##<- my_webapp
      status: modified`

Du coup applique les modifs avec --force

En effet, ça marche mieux !
Je n’ai accès qu’à la racine de la webapp.

1 Like

Bon ben moi avec la commande ou la tentative d’update via la webadmin j’ai ce message d’erreur : Ces services requis doivent être en cours d’exécution pour exécuter cette action : php7.3-fpm. Essayez de les redémarrer pour continuer (et éventuellement rechercher pourquoi ils sont en panne).

Impossible de redémarrer php qui reste en failed

(je rapelle que je suis sous l’alpha 4.0.1 sur mon raspberry qui me sert à dev uniquement, c’est pas super grave, ce yunohost est déstiné a des tests)

Zblerg, je dirais faisons un :

rm /etc/php/7.3/fpm/pool.d/my_webapp__4.conf

puis 'systemctl restart php7.3-fpm'

1 Like