Lutim "502 Bad Gateway" suite a migration yunohost 2.7.14.5 -> 3.0.0.1

,

Configuration de mon YunoHost

Matériel: PC
Accès Internet: ethernet à la maison
YunoHost version: 3.0.0.1
yunohost: 3.0.0
yunohost-admin: 3.0.0
moulinette: 3.0.0
ssowat: 3.0.0

Modification:

Migration de yunohost 2.7.14.5 -> 3.0.0.1 en ligne de commande -> yunohost tools migrations migrate

Description de mon problème:

Quand, sur l’interface utilisateur, je clique sur l’application lutim je tombe sur une erreur http ‘502 Bad Gateway’.

J’ai tenté une mise à jour de Lutim:

# yunohost app upgrade -u https://github.com/YunoHost-Apps/lutim_ynh lutim
Upgrading apps lutim
Mise à jour de l'application lutim...
Attention : Up-to-date, nothing to do
Succès ! lutim a été mis à jour
Succès ! La configuration de SSOwat a été générée
Succès ! Mise à jour terminée

Pas d’amélioration!

Je ne sais pas si cela peut aider, mais quand je tape la commande service php7.0-fpm status je ne vois nulle part Lutim. (en même temps je ne vois pas Gogs non plus et il semble bien fonctionner)

# service php7.0-fpm status 
● php7.0-fpm.service - The PHP 7.0 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2018-06-30 17:29:47 CEST; 5s ago
     Docs: man:php-fpm7.0(8)
 Main PID: 4247 (php-fpm7.0)
   Status: "Ready to handle connections"
    Tasks: 14 (limit: 4915)
   CGroup: /system.slice/php7.0-fpm.service
           ├─4247 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
           ├─4253 php-fpm: pool dokuwiki
           ├─4254 php-fpm: pool dokuwiki
           ├─4255 php-fpm: pool nextcloud
           ├─4256 php-fpm: pool nextcloud
           ├─4257 php-fpm: pool pihole
           ├─4258 php-fpm: pool pihole
           ├─4259 php-fpm: pool rainloop
           ├─4260 php-fpm: pool rainloop
           ├─4261 php-fpm: pool rainloop
           ├─4262 php-fpm: pool www
           ├─4263 php-fpm: pool www
           ├─4264 php-fpm: pool zerobin
           └─4265 php-fpm: pool zerobin

juin 30 17:29:47 atlas systemd[1]: Starting The PHP 7.0 FastCGI Process Manager...
juin 30 17:29:47 atlas systemd[1]: Started The PHP 7.0 FastCGI Process Manager.

Pour finir la commande yunohost service status lutim :

# yunohost service status lutim
active: active
active_at: 
  human: 2018-06-30 16:32:51
  timestamp: 1530369171927750
description: Image hosting and sharing service
loaded: enabled
service_file_path: /etc/systemd/system/lutim.service
status: exited

Si quelqu’un a une idée, je suis preneur :wink:

Cela doit venir du fait qu’ils utilisent chacun un serveur HTTP individuel
Hypnotoad du framwork Perl Mojolicious pour Lutim
Et pour Gogs il me semble que c’est pareil, mais en langage GO.

Bref… du coup pourquoi Gogs fonctionne et pas Lutim s’ils utilisent tous deux le même principe de redirection ?

Désolé … je réfléchit à voix haute, et je ne suis pas très calé en reverse proxy et configuration de serveur HTTP en général.

Salut djez,

Je vois que le service lutim n’est pas démarré, même après un upgrade.
Peux-tu regarder le log de lutim ? /var/log/lutim/production.log

Bonjour @Maniack_Crudelis.

Voici le tail du log :

# tail /var/log/lutim/production.log 
[Fri Jun 29 04:50:39 2018] [info] [VIEW] someone viewed six feet under saison1.jpg (path: files/3XlgCNW5.jpg)
[Fri Jun 29 04:50:39 2018] [info] [VIEW] someone viewed 2017-11-17.png (path: files/gC5YxbDS.png)
[Fri Jun 29 23:45:04 2018] [info] [VIEW] someone viewed six feet under saison1.jpg (path: files/3XlgCNW5.jpg)
[Fri Jun 29 23:45:04 2018] [info] [VIEW] someone viewed 2017-11-17.png (path: files/gC5YxbDS.png)
[Sat Jun 30 09:22:38 2018] [info] [VIEW] someone viewed six feet under saison1.jpg (path: files/3XlgCNW5.jpg)
[Sat Jun 30 09:22:39 2018] [info] [VIEW] someone viewed 2017-11-17.png (path: files/gC5YxbDS.png)
[Sat Jun 30 10:28:13 2018] [info] [VIEW] someone viewed 2017-11-17.png (path: files/gC5YxbDS.png)
[Sat Jun 30 10:30:15 2018] [info] Listening at "http://127.0.0.1:8095"
[Sat Jun 30 10:30:15 2018] [info] Manager 1540 started
[Sat Jun 30 10:30:15 2018] [info] Creating process id file "/var/www/lutim/script/hypnotoad.pid"

et si je ls le fichier hypnotoad.pid:

# ls -l /var/www/lutim/script/hypnotoad.pid
ls: impossible d'accéder à '/var/www/lutim/script/hypnotoad.pid': Aucun fichier ou dossier de ce type

Si je le start cela ne change rien :

# yunohost service start lutim
Succès ! Le service « lutim » a été démarré
# yunohost service status lutim
active: active
active_at: 
  human: 2018-06-30 16:32:51
  timestamp: 1530369171927750
description: Image hosting and sharing service
loaded: enabled
service_file_path: /etc/systemd/system/lutim.service
status: exited

Je ne vois vraiment rien dans le log…

Peux-tu tenter un redémarrage avec cette commande:

sudo systemctl restart lutim

Puis vérifier son état avec:

sudo systemctl statut lutim

Voici le resultat des commandes demandées:

# systemctl restart lutim
# systemctl statut lutim
Unknown operation statut.

status désolé

Pas de souçi :wink:

# systemctl status lutim
● lutim.service - Image hosting and sharing service
   Loaded: loaded (/etc/systemd/system/lutim.service; enabled; vendor preset: enabled)
   Active: active (exited) (Result: exit-code) since Mon 2018-07-02 11:07:49 CEST; 4min 21s ago
  Process: 4819 ExecStop=/usr/bin/carton exec hypnotoad -s script/lutim >> /var/log/lutim/production.log 2>&1 (code=exited, status=127)
  Process: 4824 ExecStart=/usr/bin/carton exec hypnotoad script/lutim >> /var/log/lutim/production.log 2>&1 (code=exited, status=127)
 Main PID: 4824 (code=exited, status=127)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/lutim.service

juil. 02 11:07:49 atlas systemd[1]: Started Image hosting and sharing service.
juil. 02 11:07:49 atlas systemd[1]: lutim.service: Main process exited, code=exited, status=127/n/a

Mais pourquoi tant de haine !?
Et pourquoi des putains de services kill silencieusement !!!???

Dans la même seconde il démarre et s’arrête sans rien dire…

Tu peux regarder à nouveau dans le log /var/log/lutim/production.log, voir si il y a du nouveau ?

@Maniack_Crudelis: Merci de votre aide.

# tail /var/log/lutim/production.log
[Fri Jun 29 04:50:39 2018] [info] [VIEW] someone viewed six feet under saison1.jpg (path: files/3XlgCNW5.jpg)
[Fri Jun 29 04:50:39 2018] [info] [VIEW] someone viewed 2017-11-17.png (path: files/gC5YxbDS.png)
[Fri Jun 29 23:45:04 2018] [info] [VIEW] someone viewed six feet under saison1.jpg (path: files/3XlgCNW5.jpg)
[Fri Jun 29 23:45:04 2018] [info] [VIEW] someone viewed 2017-11-17.png (path: files/gC5YxbDS.png)
[Sat Jun 30 09:22:38 2018] [info] [VIEW] someone viewed six feet under saison1.jpg (path: files/3XlgCNW5.jpg)
[Sat Jun 30 09:22:39 2018] [info] [VIEW] someone viewed 2017-11-17.png (path: files/gC5YxbDS.png)
[Sat Jun 30 10:28:13 2018] [info] [VIEW] someone viewed 2017-11-17.png (path: files/gC5YxbDS.png)
[Sat Jun 30 10:30:15 2018] [info] Listening at "http://127.0.0.1:8095"
[Sat Jun 30 10:30:15 2018] [info] Manager 1540 started
[Sat Jun 30 10:30:15 2018] [info] Creating process id file "/var/www/lutim/script/hypnotoad.pid"

Pas de changement :frowning:

Mais ! Il ne log pas !!!
Ce log date de 2 jours !

Hum…
Essaye donc ça:

cd /var/www/lutim
sudo -u lutim /usr/bin/carton exec hypnotoad script/lutim
# sudo -u lutim /usr/bin/carton exec hypnotoad script/lutim
Création du répertoire « /home/lutim ».
/usr/bin/perl: symbol lookup error: /var/www/lutim/local/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Net/SSLeay/SSLeay.so: undefined symbol: Perl_xs_apiversion_bootcheck

Je pense qu’il doit y avoir une histoire de compilation, mais la doc de “carton” est tellement claire que je n’ai pas la moindre idée de si il est possible de faire un upgrade…

Je crains également que, globalement, lutim ne supporte pas la migration actuellement…
Une première solution qu’on peut tester est de recompiler avec “carton”.

D’abord un backup:

sudo yunohost backup create --ignore-system --apps lutim

Ensuite,

cd /var/www/lutim
carton install
ls -1 $final_path/local/lib/perl5/ | grep linux-gnu

Copier le résultat obtenu et remplacer la précédente occurence dans /var/www/lutim/script/lutim sur la 3e ligne BEGIN { unshift @INC... si il y a.

Si ça ne fonctionne pas mieux, on peut recommencer en supprimant au préalable le dossier compilé,

sudo rm -rf /var/www/lutim/local
1 Like

Note: En yunohost 3.0.0.1 --ignore-system n’existe plus et est par défaut :slight_smile:

# yunohost backup create --apps lutim
Succès ! Sauvegarde terminée
name: 20180702-120019
results: 
  apps: 
    lutim: Success
  system: 
size: 138094470


# cd /var/www/lutim
atlas:/var/www/lutim# carton install
Installing modules using /var/www/lutim/cpanfile
! Configure failed for DBD-Pg-3.7.4. See /root/.cpanm/work/1530525788.5894/build.log for details.
! Installing the dependencies failed: Module 'DBD::Pg' is not installed
! Bailing out the installation for Mojo-Pg-4.08.
! Configure failed for DBD-SQLite-1.56. See /root/.cpanm/work/1530525788.5894/build.log for details.
! Installing the dependencies failed: Installed version (1.40) of DBD::SQLite is not in range '1.50'
! Bailing out the installation for Mojo-SQLite-3.000.
! Installing the dependencies failed: Module 'Mojo::SQLite' is not installed
! Bailing out the installation for Minion-Backend-SQLite-0.009.
! Installing Net::SSLeay failed. See /root/.cpanm/work/1530525788.5894/build.log for details. Retry with --force to force install it.
! Installing the dependencies failed: Module 'Mojo::SQLite' is not installed, Module 'Mojo::Pg' is not installed, Module 'Minion::Backend::SQLite' is not installed, Installed version (1.58) of Net::SSLeay is not in range '1.81'
! Bailing out the installation for /var/www/lutim/.
Installing modules failed

Comme la commande me retourne des erreurs, je teste en supprimant le dossier:

# rm -rf /var/www/lutim/local

# carton install
Installing modules using /var/www/lutim/cpanfile
Successfully installed Mojolicious-7.71
Successfully installed Switch-2.17
Successfully installed Sub-Uplevel-0.2800
Successfully installed Test-Warn-0.32
Successfully installed Filesys-DiskUsage-0.11
Successfully installed Module-Build-0.4224
Successfully installed Crypt-Rijndael-1.13
Successfully installed HTTP-Lite-2.44
Successfully installed Data-Float-0.013
Successfully installed Params-Classify-0.015
Successfully installed Data-Entropy-0.007
Successfully installed Exporter-Tiny-1.000000
Successfully installed List-MoreUtils-XS-0.428
Successfully installed List-MoreUtils-0.428
Successfully installed Archive-Zip-1.60
Successfully installed Module-Runtime-0.016
Successfully installed Dist-CheckConflicts-0.11
Successfully installed Role-Tiny-2.000006
Successfully installed Eval-Closure-0.14
Successfully installed Try-Tiny-0.30
Successfully installed Test-Fatal-0.014
Successfully installed Sub-Quote-2.005000
Successfully installed MRO-Compat-0.13
Successfully installed Devel-StackTrace-2.03
Successfully installed Specio-0.42
Successfully installed Variable-Magic-0.62
Successfully installed Sub-Exporter-Progressive-0.001013
Successfully installed Module-Implementation-0.09
Successfully installed B-Hooks-EndOfScope-0.21
Successfully installed Sub-Identify-0.14
Successfully installed Package-Stash-XS-0.28
Successfully installed Package-Stash-0.37
Successfully installed namespace-clean-0.27
Successfully installed namespace-autoclean-0.28
Successfully installed Class-Singleton-1.5
Successfully installed Class-Data-Inheritable-0.08
Successfully installed Exception-Class-1.44
Successfully installed Params-ValidationCompiler-0.27
Successfully installed DateTime-TimeZone-2.17
Successfully installed ExtUtils-Config-0.008
Successfully installed ExtUtils-Helpers-0.026
Successfully installed ExtUtils-InstallPaths-0.011
Successfully installed Module-Build-Tiny-0.039
Successfully installed File-ShareDir-Install-0.11
Successfully installed Scalar-List-Utils-1.50 (upgraded from 1.42_02)
Successfully installed Class-Inspector-1.32
Successfully installed File-ShareDir-1.104
Successfully installed DateTime-Locale-1.17
Successfully installed DateTime-1.46
Successfully installed Mojolicious-Plugin-StaticCache-0.02
Successfully installed IPC-System-Simple-1.25
Successfully installed File-Which-1.22
Successfully installed File-BaseDir-0.07
Successfully installed URI-1.73
Successfully installed File-DesktopEntry-0.22
Successfully installed File-MimeInfo-0.28
Successfully installed Canary-Stability-2012
Successfully installed common-sense-3.74
Successfully installed EV-4.22
Successfully installed IO-stringy-2.111
Successfully installed Minion-4.06
Successfully installed DBI-1.640
Successfully installed DBD-SQLite-1.56
Successfully installed Clone-Choose-0.008
Successfully installed Hash-Merge-0.300
Successfully installed Devel-GlobalDestruction-0.14
Successfully installed Class-Method-Modifiers-2.12
Successfully installed Moo-2.003004
Successfully installed SQL-Abstract-1.85
Successfully installed URI-Nested-0.10
Successfully installed URI-db-0.18
Successfully installed Mojo-SQLite-3.000
Successfully installed Minion-Backend-SQLite-0.009
Successfully installed DBD-Pg-3.7.4
Successfully installed Mojo-Pg-4.08
Successfully installed Net-Domain-TLD-1.75
Successfully installed Text-Unidecode-1.30
Successfully installed Mojolicious-Plugin-DebugDumperHelper-0.03
Successfully installed Crypt-CBC-2.33
Successfully installed Mozilla-CA-20180117
! Installing Net::SSLeay failed. See /root/.cpanm/work/1530526167.6203/build.log for details. Retry with --force to force install it.
Successfully installed IO-Socket-SSL-2.056
Successfully installed Data-Validate-Domain-0.14
Successfully installed NetAddr-IP-4.079
Successfully installed Data-Validate-IP-0.27
Successfully installed Data-Validate-URI-0.07
Successfully installed Image-ExifTool-10.80
Successfully installed Data-Serializer-0.60
Successfully installed Locale-Maketext-Lexicon-1.00
Successfully installed MooX-Types-MooseLike-0.29
Successfully installed MooX-Types-MooseLike-Numeric-1.03
Successfully installed Data-UUID-1.221
Successfully installed Exporter-Lite-0.08
Successfully installed Time-Duration-Parse-0.13
Successfully installed Log-Any-1.705
Successfully installed Hash-MoreUtils-0.05
Successfully installed Time-Duration-1.20
Successfully installed Task-Weaken-1.05
Successfully installed Sub-Install-0.928
Successfully installed Params-Util-1.07
Successfully installed Data-OptList-0.110
Successfully installed Class-Load-0.24
Successfully installed JSON-MaybeXS-1.003010
Successfully installed Digest-JHash-0.10
Successfully installed Sub-Exporter-0.987
Successfully installed String-RewritePrefix-0.007
Successfully installed Carp-Assert-0.21
Successfully installed CHI-0.60
Successfully installed Crypt-Blowfish-2.14
Successfully installed Mojolicious-Plugin-I18N-1.6
Successfully installed Mojolicious-Plugin-PgURLHelper-0.03
! Installing the dependencies failed: Installed version (1.80) of Net::SSLeay is not in range '1.81'
! Bailing out the installation for /var/www/lutim/.
110 distributions installed
Installing modules failed

Encore un souçi avec le module Net::SSLeay le log -> /root/.cpanm/work/1530526167.6203/build.log

Du coup ,je n’ai pas exécuté les commandes suivantes:

Ben, le problème c’est /usr/bin/ld : ne peut trouver -lz
Je n’ai pas la moindre idée de pourquoi, comment, ce que c’est…
Essaye tout de même de continuer pour voir si ça fonctionne ou pas.

la commande ls ... |grep... me retourne:

# ls -1 /var/www/lutim/local/lib/perl5/ |grep linux-gnu
x86_64-linux-gnu-thread-multi

Je dois ajouter à la variable @IND, mais je ne vois pas à quoi je dois substituer ?
le script perl non modifié:

#!/usr/bin/env perl

use strict;
use warnings;

use FindBin;
BEGIN { unshift @INC, "$FindBin::Bin/../lib" } 

# Start command line interface for application
require Mojolicious::Commands;
Mojolicious::Commands->start_app('Mounter');

Tu n’as qu’une seule ligne BEGIN, le fichier a été réécrit, c’est une partie du script qui devrait être revue, c’est peut-être plus nécessaire.

Quoi qu’il en soit, peux-tu tenter de restart lutim ?

# yunohost service start lutim
Succès ! Le service « lutim » a été démarré

# yunohost service status lutim
active: active
active_at: 
  human: 2018-07-02 11:07:49
  timestamp: 1530522469147845
description: Image hosting and sharing service
loaded: enabled
service_file_path: /etc/systemd/system/lutim.service
status: exited

snif :’(

sudo systemctl restart lutim
sudo systemctl statut lutim

De préférence stp, et on verra le log, bien que je ne m’attende pas à d’avantage d’infos…

Bonjour.

# systemctl restart lutim
# systemctl status lutim
● lutim.service - Image hosting and sharing service
   Loaded: loaded (/etc/systemd/system/lutim.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2018-07-07 11:55:57 CEST; 13s ago
  Process: 3743 ExecStop=/usr/bin/carton exec hypnotoad -s script/lutim >> /var/log/lutim/production.log 2>&1 (code=exited, status=0/SUCCESS)
 Main PID: 3752 (/var/www/lutim/)
    Tasks: 5 (limit: 4915)
   CGroup: /system.slice/lutim.service
           ├─3752 /var/www/lutim/script/lutim
           ├─3753 /var/www/lutim/script/lutim
           ├─3754 /var/www/lutim/script/lutim
           ├─3755 /var/www/lutim/script/lutim
           └─3756 /var/www/lutim/script/lutim

juil. 07 11:55:57 atlas systemd[1]: Started Image hosting and sharing service.
juil. 07 11:55:58 atlas carton[3749]: Server available at http://127.0.0.1:8095

Le service est de nouveau fonctionnel. Franchement, je ne comprends pas pourquoi.

Merci pour votre aide !