[Résolu] Redondance PeerTubes sur Yunohost

Bonjour à tou.te.s,

Mon serveur YunoHost

Matériel: Proxmox Yunohost et un ordinateur virtualisé dans un conteneur LXC
Version de YunoHost: 3.6.4.6 (stable)
J’ai accès à mon serveur : En direct avec un clavier/écran à travers Proxmox
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non

Description du problème

Je rencontre un problème avec la redondance de Peertube, je n’arrive pas à la configurer.
Quand je modifie la partie du fichier ligne 89.

root@Video:/var/www/peertube/config# vi production.yaml
redundancy:
  videos:
    check_interval: '6 hour' # How often you want to check new videos to cache
    strategies:
#    -
#      size: '10GB'
#        # Minimum time the video must remain in the cache. Only accept values > 10 hours
 (to not overload remote instances)
#        min_lifetime: '48 hours'
#      strategy: 'most-views' # Cache videos that have the most views
#    -
#      size: '10GB'
#        # Minimum time the video must remain in the cache. Only accept values > 10 hours
 (to not overload remote instances)
#        min_lifetime: '48 hours'
#      strategy: 'trending' # Cache trending videos
#    -
#        size: '10GB'
#       # Minimum time the video must remain in the cache. Only accept values > 10 hours
(to not overload remote instances)
#       min_lifetime: '48 hours'
#       strategy: 'recently-added' # Cache recently added videos
#       min_views: 10 # Having at least x views

en décommentant à partir de la ligne 103 jusqu’à la ligne 108

     -
         size: '10GB'
#       # Minimum time the video must remain in the cache. Only accept values > 10 hours
(to not overload remote instances)
        min_lifetime: '48 hours'
        strategy: 'recently-added' # Cache recently added videos
        min_views: 10 # Having at least x views

Quand je fait

root@Video:/var/www/peertube/config# systemctl restart peertube && sudo journalctl -fu peertube

J’obtient

-- Logs begin at Mon 2019-09-02 16:13:20 UTC. --
Sep 02 16:58:07 Video peertube[4952]: [video.barcelo:443] 2019-09-02 16:58:07.665 info: Connection closed {
Sep 02 16:58:07 Video peertube[4952]:   "component": "smtp-connection",
Sep 02 16:58:07 Video peertube[4952]:   "sid": "2AEaRtJe8VA",
Sep 02 16:58:07 Video peertube[4952]:   "tnx": "network"
Sep 02 16:58:07 Video peertube[4952]: }
Sep 02 17:42:14 Video systemd[1]: Stopping peertube daemon...
Sep 02 17:42:14 Video systemd[1]: Stopped peertube daemon.
Sep 02 17:42:14 Video systemd[1]: peertube.service: Failed to reset devices.list: Operation not permitted
Sep 02 17:42:14 Video systemd[1]: peertube.service: Failed to set invocation ID on control group /system.slice/peertube.service, ignoring: Operation not permitted
Sep 02 17:42:14 Video systemd[1]: Started peertube daemon.
Sep 02 17:42:14 Video peertube[5348]: > peertube@1.3.1 start /var/www/peertube
Sep 02 17:42:14 Video peertube[5348]: > node dist/server
Sep 02 17:42:14 Video peertube[5348]: /var/www/peertube/node_modules/config/lib/config.js:838
Sep 02 17:42:14 Video peertube[5348]:     throw new Error("Cannot parse config file: '" + fullFilename + "': " + e3);
Sep 02 17:42:14 Video peertube[5348]:     ^
Sep 02 17:42:14 Video peertube[5348]: Error: Cannot parse config file: '/var/www/peertube/config/production.yaml': YAMLException: bad indentation of a sequence entry at line 106, column 9:
Sep 02 17:42:14 Video peertube[5348]:             min_lifetime: '48 hours'
Sep 02 17:42:14 Video peertube[5348]:             ^
Sep 02 17:42:14 Video peertube[5348]:     at Config.util.parseFile (/var/www/peertube/node_modules/config/lib/config.js:838:11)
Sep 02 17:42:14 Video peertube[5348]:     at /var/www/peertube/node_modules/config/lib/config.js:600:28
Sep 02 17:42:14 Video peertube[5348]:     at Array.forEach (<anonymous>)
Sep 02 17:42:14 Video peertube[5348]:     at /var/www/peertube/node_modules/config/lib/config.js:596:14
Sep 02 17:42:14 Video peertube[5348]:     at Array.forEach (<anonymous>)
Sep 02 17:42:14 Video peertube[5348]:     at Config.util.loadFileConfigs (/var/www/peertube/node_modules/config/lib/config.js:595:13)
Sep 02 17:42:14 Video peertube[5348]:     at new Config (/var/www/peertube/node_modules/config/lib/config.js:136:27)
Sep 02 17:42:14 Video peertube[5348]:     at Object.<anonymous> (/var/www/peertube/node_modules/config/lib/config.js:1643:31)
Sep 02 17:42:14 Video peertube[5348]:     at Module._compile (module.js:653:30)
Sep 02 17:42:14 Video peertube[5348]:     at Object.Module._extensions..js (module.js:664:10)
Sep 02 17:42:14 Video peertube[5348]: npm ERR! code ELIFECYCLE
Sep 02 17:42:14 Video peertube[5348]: npm ERR! errno 1
Sep 02 17:42:14 Video peertube[5348]: npm ERR! peertube@1.3.1 start: `node dist/server`
Sep 02 17:42:14 Video peertube[5348]: npm ERR! Exit status 1
Sep 02 17:42:14 Video peertube[5348]: npm ERR!
Sep 02 17:42:14 Video peertube[5348]: npm ERR! Failed at the peertube@1.3.1 start script.
Sep 02 17:42:14 Video peertube[5348]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Sep 02 17:42:14 Video peertube[5348]: npm ERR! A complete log of this run can be found in:
Sep 02 17:42:14 Video peertube[5348]: npm ERR!     /home/peertube/.npm/_logs/2019-09-02T17_42_14_778Z-debug.log
Sep 02 17:42:14 Video systemd[1]: peertube.service: Main process exited, code=exited, status=1/FAILURE
Sep 02 17:42:14 Video systemd[1]: peertube.service: Unit entered failed state.
Sep 02 17:42:14 Video systemd[1]: peertube.service: Failed with result 'exit-code'.
Sep 02 17:42:15 Video systemd[1]: peertube.service: Service hold-off time over, scheduling restart.
Sep 02 17:42:15 Video systemd[1]: Stopped peertube daemon.
Sep 02 17:42:15 Video systemd[1]: peertube.service: Failed to reset devices.list: Operation not permitted
Sep 02 17:42:15 Video systemd[1]: peertube.service: Failed to set invocation ID on control group /system.slice/peertube.service, ignoring: Operation not permitted
Sep 02 17:42:15 Video systemd[1]: Started peertube daemon.
Sep 02 17:42:15 Video peertube[5379]: > peertube@1.3.1 start /var/www/peertube
Sep 02 17:42:15 Video peertube[5379]: > node dist/server
Sep 02 17:42:15 Video peertube[5379]: /var/www/peertube/node_modules/config/lib/config.js:838
Sep 02 17:42:15 Video peertube[5379]:     throw new Error("Cannot parse config file: '" + fullFilename + "': " + e3);
Sep 02 17:42:15 Video peertube[5379]:     ^
Sep 02 17:42:15 Video peertube[5379]: Error: Cannot parse config file: '/var/www/peertube/config/production.yaml': YAMLException: bad indentation of a sequence entry at line 106, column 9:
Sep 02 17:42:15 Video peertube[5379]:             min_lifetime: '48 hours'
Sep 02 17:42:15 Video peertube[5379]:             ^
Sep 02 17:42:15 Video peertube[5379]:     at Config.util.parseFile (/var/www/peertube/node_modules/config/lib/config.js:838:11)
Sep 02 17:42:15 Video peertube[5379]:     at /var/www/peertube/node_modules/config/lib/config.js:600:28
Sep 02 17:42:15 Video peertube[5379]:     at Array.forEach (<anonymous>)
Sep 02 17:42:15 Video peertube[5379]:     at /var/www/peertube/node_modules/config/lib/config.js:596:14
Sep 02 17:42:15 Video peertube[5379]:     at Array.forEach (<anonymous>)
Sep 02 17:42:15 Video peertube[5379]:     at Config.util.loadFileConfigs (/var/www/peertube/node_modules/config/lib/config.js:595:13)
Sep 02 17:42:15 Video peertube[5379]:     at new Config (/var/www/peertube/node_modules/config/lib/config.js:136:27)
Sep 02 17:42:15 Video peertube[5379]:     at Object.<anonymous> (/var/www/peertube/node_modules/config/lib/config.js:1643:31)
Sep 02 17:42:15 Video peertube[5379]:     at Module._compile (module.js:653:30)
Sep 02 17:42:15 Video peertube[5379]:     at Object.Module._extensions..js (module.js:664:10)
Sep 02 17:42:15 Video peertube[5379]: npm ERR! code ELIFECYCLE
Sep 02 17:42:15 Video peertube[5379]: npm ERR! errno 1
Sep 02 17:42:15 Video peertube[5379]: npm ERR! peertube@1.3.1 start: `node dist/server`
Sep 02 17:42:15 Video peertube[5379]: npm ERR! Exit status 1
Sep 02 17:42:15 Video peertube[5379]: npm ERR!
Sep 02 17:42:15 Video peertube[5379]: npm ERR! Failed at the peertube@1.3.1 start script.
Sep 02 17:42:15 Video peertube[5379]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Sep 02 17:42:15 Video peertube[5379]: npm ERR! A complete log of this run can be found in:
Sep 02 17:42:15 Video peertube[5379]: npm ERR!     /home/peertube/.npm/_logs/2019-09-02T17_42_15_738Z-debug.log
Sep 02 17:42:15 Video systemd[1]: peertube.service: Main process exited, code=exited, status=1/FAILURE
Sep 02 17:42:15 Video systemd[1]: peertube.service: Unit entered failed state.
Sep 02 17:42:15 Video systemd[1]: peertube.service: Failed with result 'exit-code'.
Sep 02 17:42:16 Video systemd[1]: peertube.service: Service hold-off time over, scheduling restart.
Sep 02 17:42:16 Video systemd[1]: Stopped peertube daemon.
Sep 02 17:42:16 Video systemd[1]: peertube.service: Failed to reset devices.list: Operation not permitted
Sep 02 17:42:16 Video systemd[1]: peertube.service: Failed to set invocation ID on control group /system.slice/peertube.service, ignoring: Operation not permitted
Sep 02 17:42:16 Video systemd[1]: Started peertube daemon.
Sep 02 17:42:16 Video peertube[5404]: > peertube@1.3.1 start /var/www/peertube
Sep 02 17:42:16 Video peertube[5404]: > node dist/server
Sep 02 17:42:16 Video peertube[5404]: /var/www/peertube/node_modules/config/lib/config.js:838
Sep 02 17:42:16 Video peertube[5404]:     throw new Error("Cannot parse config file: '" + fullFilename + "': " + e3);
Sep 02 17:42:16 Video peertube[5404]:     ^
Sep 02 17:42:16 Video peertube[5404]: Error: Cannot parse config file: '/var/www/peertube/config/production.yaml': YAMLException: bad indentation of a sequence entry at line 106, column 9:
Sep 02 17:42:16 Video peertube[5404]:             min_lifetime: '48 hours'
Sep 02 17:42:16 Video peertube[5404]:             ^
Sep 02 17:42:16 Video peertube[5404]:     at Config.util.parseFile (/var/www/peertube/node_modules/config/lib/config.js:838:11)
Sep 02 17:42:16 Video peertube[5404]:     at /var/www/peertube/node_modules/config/lib/config.js:600:28
Sep 02 17:42:16 Video peertube[5404]:     at Array.forEach (<anonymous>)
Sep 02 17:42:16 Video peertube[5404]:     at /var/www/peertube/node_modules/config/lib/config.js:596:14
Sep 02 17:42:16 Video peertube[5404]:     at Array.forEach (<anonymous>)
Sep 02 17:42:16 Video peertube[5404]:     at Config.util.loadFileConfigs (/var/www/peertube/node_modules/config/lib/config.js:595:13)
Sep 02 17:42:16 Video peertube[5404]:     at new Config (/var/www/peertube/node_modules/config/lib/config.js:136:27)
Sep 02 17:42:16 Video peertube[5404]:     at Object.<anonymous> (/var/www/peertube/node_modules/config/lib/config.js:1643:31)
Sep 02 17:42:16 Video peertube[5404]:     at Module._compile (module.js:653:30)
Sep 02 17:42:16 Video peertube[5404]:     at Object.Module._extensions..js (module.js:664:10)
Sep 02 17:42:16 Video peertube[5404]: npm ERR! code ELIFECYCLE
Sep 02 17:42:16 Video peertube[5404]: npm ERR! errno 1
Sep 02 17:42:16 Video peertube[5404]: npm ERR! peertube@1.3.1 start: `node dist/server`
Sep 02 17:42:16 Video peertube[5404]: npm ERR! Exit status 1
Sep 02 17:42:16 Video peertube[5404]: npm ERR!
Sep 02 17:42:16 Video peertube[5404]: npm ERR! Failed at the peertube@1.3.1 start script.
Sep 02 17:42:16 Video peertube[5404]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Sep 02 17:42:16 Video peertube[5404]: npm ERR! A complete log of this run can be found in:
Sep 02 17:42:16 Video peertube[5404]: npm ERR!     /home/peertube/.npm/_logs/2019-09-02T17_42_16_733Z-debug.log
Sep 02 17:42:16 Video systemd[1]: peertube.service: Main process exited, code=exited, status=1/FAILURE
Sep 02 17:42:16 Video systemd[1]: peertube.service: Unit entered failed state.
Sep 02 17:42:16 Video systemd[1]: peertube.service: Failed with result 'exit-code'.
Sep 02 17:42:17 Video systemd[1]: peertube.service: Service hold-off time over, scheduling restart.
Sep 02 17:42:17 Video systemd[1]: Stopped peertube daemon.
Sep 02 17:42:17 Video systemd[1]: peertube.service: Failed to reset devices.list: Operation not permitted
Sep 02 17:42:17 Video systemd[1]: peertube.service: Failed to set invocation ID on control group /system.slice/peertube.service, ignoring: Operation not permitted
Sep 02 17:42:17 Video systemd[1]: Started peertube daemon.
Sep 02 17:42:17 Video peertube[5429]: > peertube@1.3.1 start /var/www/peertube
Sep 02 17:42:17 Video peertube[5429]: > node dist/server
Sep 02 17:42:17 Video peertube[5429]: /var/www/peertube/node_modules/config/lib/config.js:838
Sep 02 17:42:17 Video peertube[5429]:     throw new Error("Cannot parse config file: '" + fullFilename + "': " + e3);
Sep 02 17:42:17 Video peertube[5429]:     ^
Sep 02 17:42:17 Video peertube[5429]: Error: Cannot parse config file: '/var/www/peertube/config/production.yaml': YAMLException: bad indentation of a sequence entry at line 106, column 9:
Sep 02 17:42:17 Video peertube[5429]:             min_lifetime: '48 hours'
Sep 02 17:42:17 Video peertube[5429]:             ^
Sep 02 17:42:17 Video peertube[5429]:     at Config.util.parseFile (/var/www/peertube/node_modules/config/lib/config.js:838:11)
Sep 02 17:42:17 Video peertube[5429]:     at /var/www/peertube/node_modules/config/lib/config.js:600:28
Sep 02 17:42:17 Video peertube[5429]:     at Array.forEach (<anonymous>)
Sep 02 17:42:17 Video peertube[5429]:     at /var/www/peertube/node_modules/config/lib/config.js:596:14
Sep 02 17:42:17 Video peertube[5429]:     at Array.forEach (<anonymous>)
Sep 02 17:42:17 Video peertube[5429]:     at Config.util.loadFileConfigs (/var/www/peertube/node_modules/config/lib/config.js:595:13)
Sep 02 17:42:17 Video peertube[5429]:     at new Config (/var/www/peertube/node_modules/config/lib/config.js:136:27)
Sep 02 17:42:17 Video peertube[5429]:     at Object.<anonymous> (/var/www/peertube/node_modules/config/lib/config.js:1643:31)
Sep 02 17:42:17 Video peertube[5429]:     at Module._compile (module.js:653:30)
Sep 02 17:42:17 Video peertube[5429]:     at Object.Module._extensions..js (module.js:664:10)
Sep 02 17:42:17 Video peertube[5429]: npm ERR! code ELIFECYCLE
Sep 02 17:42:17 Video peertube[5429]: npm ERR! errno 1
Sep 02 17:42:17 Video peertube[5429]: npm ERR! peertube@1.3.1 start: `node dist/server`
Sep 02 17:42:17 Video peertube[5429]: npm ERR! Exit status 1
Sep 02 17:42:17 Video peertube[5429]: npm ERR!
Sep 02 17:42:17 Video peertube[5429]: npm ERR! Failed at the peertube@1.3.1 start script.
Sep 02 17:42:17 Video peertube[5429]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Sep 02 17:42:17 Video peertube[5429]: npm ERR! A complete log of this run can be found in:
Sep 02 17:42:17 Video peertube[5429]: npm ERR!     /home/peertube/.npm/_logs/2019-09-02T17_42_17_734Z-debug.log
Sep 02 17:42:17 Video systemd[1]: peertube.service: Main process exited, code=exited, status=1/FAILURE
Sep 02 17:42:17 Video systemd[1]: peertube.service: Unit entered failed state.
Sep 02 17:42:17 Video systemd[1]: peertube.service: Failed with result 'exit-code'.
Sep 02 17:42:18 Video systemd[1]: peertube.service: Service hold-off time over, scheduling restart.
Sep 02 17:42:18 Video systemd[1]: Stopped peertube daemon.
Sep 02 17:42:18 Video systemd[1]: peertube.service: Failed to reset devices.list: Operation not permitted
Sep 02 17:42:18 Video systemd[1]: peertube.service: Failed to set invocation ID on control group /system.slice/peertube.service, ignoring: Operation not permitted
Sep 02 17:42:18 Video systemd[1]: Started peertube daemon.
Sep 02 17:42:18 Video peertube[5454]: > peertube@1.3.1 start /var/www/peertube
Sep 02 17:42:18 Video peertube[5454]: > node dist/server
Sep 02 17:42:18 Video peertube[5454]: /var/www/peertube/node_modules/config/lib/config.js:838
Sep 02 17:42:18 Video peertube[5454]:     throw new Error("Cannot parse config file: '" + fullFilename + "': " + e3);
Sep 02 17:42:18 Video peertube[5454]:     ^
Sep 02 17:42:18 Video peertube[5454]: Error: Cannot parse config file: '/var/www/peertube/config/production.yaml': YAMLException: bad indentation of a sequence entry at line 106, column 9:
Sep 02 17:42:18 Video peertube[5454]:             min_lifetime: '48 hours'
Sep 02 17:42:18 Video peertube[5454]:             ^
Sep 02 17:42:18 Video peertube[5454]:     at Config.util.parseFile (/var/www/peertube/node_modules/config/lib/config.js:838:11)
Sep 02 17:42:18 Video peertube[5454]:     at /var/www/peertube/node_modules/config/lib/config.js:600:28
Sep 02 17:42:18 Video peertube[5454]:     at Array.forEach (<anonymous>)
Sep 02 17:42:18 Video peertube[5454]:     at /var/www/peertube/node_modules/config/lib/config.js:596:14
Sep 02 17:42:18 Video peertube[5454]:     at Array.forEach (<anonymous>)
Sep 02 17:42:18 Video peertube[5454]:     at Config.util.loadFileConfigs (/var/www/peertube/node_modules/config/lib/config.js:595:13)
Sep 02 17:42:18 Video peertube[5454]:     at new Config (/var/www/peertube/node_modules/config/lib/config.js:136:27)
Sep 02 17:42:18 Video peertube[5454]:     at Object.<anonymous> (/var/www/peertube/node_modules/config/lib/config.js:1643:31)
Sep 02 17:42:18 Video peertube[5454]:     at Module._compile (module.js:653:30)
Sep 02 17:42:18 Video peertube[5454]:     at Object.Module._extensions..js (module.js:664:10)
Sep 02 17:42:18 Video peertube[5454]: npm ERR! code ELIFECYCLE
Sep 02 17:42:18 Video peertube[5454]: npm ERR! errno 1
Sep 02 17:42:18 Video peertube[5454]: npm ERR! peertube@1.3.1 start: `node dist/server`
Sep 02 17:42:18 Video peertube[5454]: npm ERR! Exit status 1
Sep 02 17:42:18 Video peertube[5454]: npm ERR!
Sep 02 17:42:18 Video peertube[5454]: npm ERR! Failed at the peertube@1.3.1 start script.
Sep 02 17:42:18 Video peertube[5454]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Sep 02 17:42:18 Video peertube[5454]: npm ERR! A complete log of this run can be found in:
Sep 02 17:42:18 Video peertube[5454]: npm ERR!     /home/peertube/.npm/_logs/2019-09-02T17_42_18_801Z-debug.log
Sep 02 17:42:18 Video systemd[1]: peertube.service: Main process exited, code=exited, status=1/FAILURE
Sep 02 17:42:18 Video systemd[1]: peertube.service: Unit entered failed state.
Sep 02 17:42:18 Video systemd[1]: peertube.service: Failed with result 'exit-code'.
Sep 02 17:42:19 Video systemd[1]: peertube.service: Service hold-off time over, scheduling restart.
Sep 02 17:42:19 Video systemd[1]: Stopped peertube daemon.
Sep 02 17:42:19 Video systemd[1]: peertube.service: Start request repeated too quickly.
Sep 02 17:42:19 Video systemd[1]: Failed to start peertube daemon.
Sep 02 17:42:19 Video systemd[1]: peertube.service: Unit entered failed state.
Sep 02 17:42:19 Video systemd[1]: peertube.service: Failed with result 'exit-code'.

et sur le navigateur(Firefox)

502 Bad Gateway

Quelqu’un aurais une idée d’ou vient le problème
J’ai accès à trois connections adsl si j’arrive à les mettre toutes les trois en redondance avec trois vieux serveur je pourrais utiliser correctement PeerTube car pour l’instant dés que j’ai deux/trois vidéo différente téléchargé en même temps sa lague un peu.
Mon instances Peertube pour l’instant avec qu’un serveur.

Merci de votre aide

Hello,

Comme spécifié dans le message d’erreur tu as un problème d’indentation : il semble que size ait un espace de trop dans ton exemple.

Salut,

Le “-” doit-il vraiment être “décommenté” aussi ?

Je me demande si le prob viendrait pas de là, plutôt.

Oui il doit l’être

Merci Chocobozzz La bonne indentation est:

redundancy:
  videos:
    check_interval: '6 hour' # How often you want to check new videos to cache
    strategies:
#    -
#      size: '10GB'
#        # Minimum time the video must remain in the cache. Only accept values > 10 hours
 (to not overload remote instances)
#        min_lifetime: '48 hours'
#      strategy: 'most-views' # Cache videos that have the most views
#    -
#      size: '10GB'
#        # Minimum time the video must remain in the cache. Only accept values > 10 hours
 (to not overload remote instances)
#        min_lifetime: '48 hours'
#      strategy: 'trending' # Cache trending videos
    -
       size: '10GB'
#       # Minimum time the video must remain in the cache. Only accept values > 10 hours
(to not overload remote instances)
       min_lifetime: '48 hours'
       strategy: 'recently-added' # Cache recently added videos
       min_views: 10 # Having at least x views