[Peertube] Erreur 502

Matériel: PC fixe
Version de YunoHost: 3.6.5.3
J’ai accès à mon serveur : complet
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non

Bonjour,

Depuis plusieurs jours, peertube me donne pour seul résultat “502 Bad gateway”. Je joins le log d’erreurs du sous-domaine peertube contenu dans “/var/log/nginx”:

https://zerobin.stemy.me/?5c25254a5ee4edea#B7bGz+P6iUAg8jY5KdLAqV0fh1LmU9vc7JLpc/aA27w=

Extrait de journalctl
https://zerobin.stemy.me/?27280362bc6b0744#v64VtKUBZOnc+yimMZBEpjUmvqFtrn/NWgmoSxU1cRY=

Le serveur est de nouveau UP depuis 6:30 du mat’, comme à chaque fois qu’il récupère d’un downtime. Ci-dessous un extrait du log de la dernière fois où il a échoué à démarré suivi d’une réussite. J’espère que quelqu’un pourra comprendre ce qui fait que ça marche ou pas parce que moi, je n’ai pas encore compris.

Mar 30 06:26:35 stemy.me systemd[1]: Started peertube daemon.
Mar 30 06:26:36 stemy.me peertube[24094]: > peertube@2.1.1 start /var/www/peertube
Mar 30 06:26:36 stemy.me peertube[24094]: > node dist/server
Mar 30 06:26:37 stemy.me peertube[24094]: [peertube.stemy.me:443] 2020-03-30 06:26:36.998 warn: Your NodeJS version v8.17.0 is deprecated. Please use Node 10.
Mar 30 06:26:37 stemy.me peertube[24094]: Something went wrong installing the "sharp" module
Mar 30 06:26:37 stemy.me peertube[24094]: Module did not self-register.
Mar 30 06:26:37 stemy.me peertube[24094]: - Remove the "node_modules/sharp" directory, run "npm install" and look for errors
Mar 30 06:26:37 stemy.me peertube[24094]: - Consult the installation documentation at https://sharp.pixelplumbing.com/en/stable/install/
Mar 30 06:26:37 stemy.me peertube[24094]: - Search for this error at https://github.com/lovell/sharp/issues
Mar 30 06:26:37 stemy.me peertube[24094]: npm ERR! code ELIFECYCLE
Mar 30 06:26:37 stemy.me peertube[24094]: npm ERR! errno 1
Mar 30 06:26:37 stemy.me peertube[24094]: npm ERR! peertube@2.1.1 start: `node dist/server`
Mar 30 06:26:37 stemy.me peertube[24094]: npm ERR! Exit status 1
Mar 30 06:26:37 stemy.me peertube[24094]: npm ERR!
Mar 30 06:26:37 stemy.me peertube[24094]: npm ERR! Failed at the peertube@2.1.1 start script.
Mar 30 06:26:37 stemy.me peertube[24094]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Mar 30 06:26:37 stemy.me sudo[24041]: pam_unix(sudo:session): session closed for user root
Mar 30 06:26:37 stemy.me sudo[24126]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/ln --symbolic --force --no-target-directory /opt/node_n/n/versions/node/10.19.0 /opt/node_n/n/versions/node/10
Mar 30 06:26:37 stemy.me sudo[24126]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 30 06:26:38 stemy.me sudo[24126]: pam_unix(sudo:session): session closed for user root
Mar 30 06:26:38 stemy.me peertube[24094]: npm ERR! A complete log of this run can be found in:
Mar 30 06:26:38 stemy.me peertube[24094]: npm ERR!     /home/peertube/.npm/_logs/2020-03-30T04_26_37_731Z-debug.log
Mar 30 06:26:38 stemy.me systemd[1]: peertube.service: Main process exited, code=exited, status=1/FAILURE
Mar 30 06:26:38 stemy.me sudo[24128]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/opt/node_n/bin/n 8
Mar 30 06:26:38 stemy.me systemd[1]: peertube.service: Unit entered failed state.
Mar 30 06:26:38 stemy.me systemd[1]: peertube.service: Failed with result 'exit-code'.
Mar 30 06:26:38 stemy.me sudo[24128]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 30 06:26:38 stemy.me systemd[1]: peertube.service: Service hold-off time over, scheduling restart.
Mar 30 06:26:38 stemy.me systemd[1]: Stopped peertube daemon.
Mar 30 06:26:38 stemy.me systemd[1]: Started peertube daemon.
Mar 30 06:26:39 stemy.me peertube[24146]: > peertube@2.1.1 start /var/www/peertube
Mar 30 06:26:39 stemy.me peertube[24146]: > node dist/server
Mar 30 06:26:39 stemy.me sshd[24178]: Connection from 134.175.121.80 port 55626 on 80.67.181.213 port 22
Mar 30 06:26:40 stemy.me sshd[24178]: Connection closed by 134.175.121.80 port 55626 [preauth]
Mar 30 06:27:12 stemy.me encfs[20513]: 2020-03-30 06:27:12,009 WARN  [default] Unmounting filesystem due to inactivity: /home/yunohost.app/archivist/encrypted_backup/
Mar 30 06:27:22 stemy.me php[4152]: [04:27:22/4152] [MASTER] active jobs: 0, next spawn at 60 sec.
Mar 30 06:27:26 stemy.me sudo[24128]: pam_unix(sudo:session): session closed for user root
Mar 30 06:27:26 stemy.me sudo[24300]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/ln --symbolic --force --no-target-directory /opt/node_n/n/versions/node/8.17.0 /opt/node_n/n/versions/node/8
Mar 30 06:27:26 stemy.me sudo[24300]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 30 06:27:26 stemy.me sudo[24300]: pam_unix(sudo:session): session closed for user root
Mar 30 06:27:28 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:28.826 warn: Redundancy directory should be different than the videos folder.
Mar 30 06:27:35 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:35.958 info: Database peertube_peertube is ready.
Mar 30 06:27:36 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:36.984 info: Using localhost:25 as SMTP server.
Mar 30 06:27:36 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:36.988 info: Testing SMTP server...
Mar 30 06:27:37 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:37.071 info: Connection established to 127.0.0.1:25 {
Mar 30 06:27:37 stemy.me peertube[24146]:   "component": "smtp-connection",
Mar 30 06:27:37 stemy.me peertube[24146]:   "sid": "oVIc5WXGi5I",
Mar 30 06:27:37 stemy.me peertube[24146]:   "tnx": "network",
Mar 30 06:27:37 stemy.me peertube[24146]:   "localAddress": "127.0.0.1",
Mar 30 06:27:37 stemy.me peertube[24146]:   "localPort": 48194,
Mar 30 06:27:37 stemy.me peertube[24146]:   "remoteAddress": "127.0.0.1",
Mar 30 06:27:37 stemy.me peertube[24146]:   "remotePort": 25
Mar 30 06:27:37 stemy.me peertube[24146]: }
Mar 30 06:27:37 stemy.me postfix/smtpd[24336]: connect from localhost[127.0.0.1]
Mar 30 06:27:37 stemy.me postfix/smtpd[24336]: disconnect from localhost[127.0.0.1] ehlo=1 quit=1 commands=2
Mar 30 06:27:37 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:37.154 info: Successfully connected to SMTP server.
Mar 30 06:27:37 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:37.444 info: Cleaning HTML cache.
Mar 30 06:27:37 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:37.459 info: Connection closed {
Mar 30 06:27:37 stemy.me peertube[24146]:   "component": "smtp-connection",
Mar 30 06:27:37 stemy.me peertube[24146]:   "sid": "oVIc5WXGi5I",
Mar 30 06:27:37 stemy.me peertube[24146]:   "tnx": "network"
Mar 30 06:27:37 stemy.me peertube[24146]: }
Mar 30 06:27:37 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:37.482 info: Registering plugin or theme peertube-theme-dark.
Mar 30 06:27:37 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:37.559 info: Registering plugin or theme peertube-plugin-slides.
Mar 30 06:27:37 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:37.762 info: Add plugin peertube-plugin-slides CSS to global file.
Mar 30 06:27:37 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:37.794 info: Unregister plugin peertube-plugin-slides.
Mar 30 06:27:37 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:37.795 error: Cannot register plugin slides, skipping. {
Mar 30 06:27:37 stemy.me peertube[24146]:   "err": {
Mar 30 06:27:37 stemy.me peertube[24146]:     "stack": "Error: ENOENT: no such file or directory, open '/home/yunohost.app/peertube/storage/plugins/node_modules/peertube-plugin-slides/node_modules/videojs-slides/dist/browser/videojs-slides.min.css'",
Mar 30 06:27:37 stemy.me peertube[24146]:     "message": "ENOENT: no such file or directory, open '/home/yunohost.app/peertube/storage/plugins/node_modules/peertube-plugin-slides/node_modules/videojs-slides/dist/browser/videojs-slides.min.css'",
Mar 30 06:27:37 stemy.me peertube[24146]:     "errno": -2,
Mar 30 06:27:37 stemy.me peertube[24146]:     "code": "ENOENT",
Mar 30 06:27:37 stemy.me peertube[24146]:     "syscall": "open",
Mar 30 06:27:37 stemy.me peertube[24146]:     "path": "/home/yunohost.app/peertube/storage/plugins/node_modules/peertube-plugin-slides/node_modules/videojs-slides/dist/browser/videojs-slides.min.css"
Mar 30 06:27:37 stemy.me peertube[24146]:   }
Mar 30 06:27:37 stemy.me peertube[24146]: }
Mar 30 06:27:37 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:37.796 info: Registering plugin or theme peertube-plugin-glavlit.
Mar 30 06:27:39 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:39.525 info: Add plugin peertube-plugin-glavlit CSS to global file.
Mar 30 06:27:39 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:39.525 info: Cleaning HTML cache.
Mar 30 06:27:39 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:39.526 info: Registering plugin or theme peertube-plugin-hcaptcha.
Mar 30 06:27:39 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:39.722 info: Add plugin peertube-plugin-hcaptcha CSS to global file.
Mar 30 06:27:39 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:39.726 info: Cleaning HTML cache.
Mar 30 06:27:39 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:39.733 info: Server listening on localhost:9000
Mar 30 06:27:39 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:39.734 info: Web server: https://peertube.stemy.me
Mar 30 06:27:41 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:41.038 info: Fetching remote actor https://skeptikon.fr/accounts/peertube.
Mar 30 06:27:42 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:42.382 info: Fetching remote actor https://peertube.freeforge.eu/accounts/peertube.
Mar 30 06:27:43 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:43.458 info: 91.216.110.33 - - [30/Mar/2020:04:27:43 +0000] "POST /inbox HTTP/1.0" - - "-" "PeerTube/2.1.1 (+https://skeptikon.fr)"
Mar 30 06:27:44 stemy.me peertube[24146]: [peertube.stemy.me:443] 2020-03-30 06:27:44.125 warn: Signature not verified. {

Cela semble assez clair, Peertube et sa dépendance sharp ont besoin de Node version 10 (confirmé sur la page Github de Peertube). Le “bad gateway” indique bien que le service ne s’est pas lancé. Il faut voir avec le mainteneur de l’app, car dans son script il demande bien l’installation de Node 10, et tu te retrouves avec Node 8.

C’est ce que je pensais aussi, mais quand j’ai tenté de mettre node à jour, j’ai eu un message disant que j’ai déjà la version 10.x de node installée.

Et puis, ça n’explique pas pourquoi mon instance s’est mise à refonctionner toute seule sans que je n’aie rien fait, et pourquoi c’est toujours pile à la même heure qu’elle récupère de ses downtime (sans rire, pas une seule fois elle ne s’est réveillée à une autre heure que 6:30 du matin).