Systemd indispensable?

Bonjour,

je tente de recycler un ancien ordinateur portable (i5, 8GB ram, 500GB) pour faire tourner un peertube maison sous une bonne fibre. Merci pour cette perpective merveilleuse.

je n’avais jamais touché à un truc s’apparentant à linux auparavant.

J’ai donc installé debian 9.5 et suivi les dependancies puis le production en suivant le mieux possible le protocole RTFMN.

j’ai eu du mal à comprendre la fin :
« si votre systeme utilise systemd » puis suite d’instruction. OK.
Sur mon système le pid 1 est init donc a priori (d’après google) pas de systemd.
Hors c’est la seule suite d’instructions qui mènent au start de peertube!

Comme lancer peertube sans systemd?

au cas où j’ai essayé de suivre quand même les instructions systemd et ça crash :

sudo journalctl -feu peertube
Nov 03 20:53:42 pc-504 systemd[1]: Started PeerTube daemon.
Nov 03 20:53:42 pc-504 peertube[13695]: > peertube@1.0.1 start /var/www/peertube/versions/peertube-v1.0.1
Nov 03 20:53:42 pc-504 peertube[13695]: > node dist/server
Nov 03 20:53:43 pc-504 peertube[13695]: /var/www/peertube/versions/peertube-v1.0.1/dist/server/initializers/constants.js:648
Nov 03 20:53:43 pc-504 peertube[13695]:     return objs.map(obj => {
Nov 03 20:53:43 pc-504 peertube[13695]:                 ^
Nov 03 20:53:43 pc-504 peertube[13695]: TypeError: objs.map is not a function
Nov 03 20:53:43 pc-504 peertube[13695]:     at buildVideosRedundancy (/var/www/peertube/versions/peertube-v1.0.1/dist/server/initializers/constants.js:648:17)
Nov 03 20:53:43 pc-504 peertube[13695]:     at Object.<anonymous> (/var/www/peertube/versions/peertube-v1.0.1/dist/server/initializers/constants.js:203:25)
Nov 03 20:53:43 pc-504 peertube[13695]:     at Module._compile (module.js:653:30)
Nov 03 20:53:43 pc-504 peertube[13695]:     at Object.Module._extensions..js (module.js:664:10)
Nov 03 20:53:43 pc-504 peertube[13695]:     at Module.load (module.js:566:32)
Nov 03 20:53:43 pc-504 peertube[13695]:     at tryModuleLoad (module.js:506:12)
Nov 03 20:53:43 pc-504 peertube[13695]:     at Function.Module._load (module.js:498:3)
Nov 03 20:53:43 pc-504 peertube[13695]:     at Module.require (module.js:597:17)
Nov 03 20:53:43 pc-504 peertube[13695]:     at require (internal/module.js:11:18)
Nov 03 20:53:43 pc-504 peertube[13695]:     at Object.<anonymous> (/var/www/peertube/versions/peertube-v1.0.1/dist/server/initializers/index.js:6:10)
Nov 03 20:53:43 pc-504 peertube[13695]: npm ERR! code ELIFECYCLE
Nov 03 20:53:43 pc-504 peertube[13695]: npm ERR! errno 1
Nov 03 20:53:43 pc-504 peertube[13695]: npm ERR! peertube@1.0.1 start: `node dist/server`
Nov 03 20:53:43 pc-504 peertube[13695]: npm ERR! Exit status 1
Nov 03 20:53:43 pc-504 peertube[13695]: npm ERR!
Nov 03 20:53:43 pc-504 peertube[13695]: npm ERR! Failed at the peertube@1.0.1 start script.
Nov 03 20:53:43 pc-504 peertube[13695]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Nov 03 20:53:43 pc-504 systemd[1]: peertube.service: Main process exited, code=exited, status=1/FAILURE
Nov 03 20:53:43 pc-504 systemd[1]: peertube.service: Unit entered failed state.
Nov 03 20:53:43 pc-504 systemd[1]: peertube.service: Failed with result 'exit-code'.
Nov 03 20:53:43 pc-504 systemd[1]: peertube.service: Service hold-off time over, scheduling restart.
Nov 03 20:53:43 pc-504 systemd[1]: Stopped PeerTube daemon.
Nov 03 20:53:43 pc-504 systemd[1]: peertube.service: Start request repeated too quickly.
Nov 03 20:53:43 pc-504 systemd[1]: Failed to start PeerTube daemon.
Nov 03 20:53:43 pc-504 systemd[1]: peertube.service: Unit entered failed state.
Nov 03 20:53:43 pc-504 systemd[1]: peertube.service: Failed with result 'exit-code'.
``̀`
1 « J'aime »

Hello @saxziton

En suivant le protocole RTFM justement, je trouve que systemd s’appelle init sous debian à fins de compatibilité: https://manpages.debian.org/stretch/systemd-sysv/init.1.en.html

Ton erreur vient cependant d’une erreur dans ton fichier de configuration de PeerTube, dans le bloc redundancy.videos.strategies.

Merci infiniment, l’instance peertube se lance maintenant !

j’ai obtenu une autre erreur.

finalement j’ai pris une image docker c’est vachement plus facile.

UP and running here : video.chromatique.xyz

1 « J'aime »

Hello, I’m currently struggling with this same error message about redundancy. My last block looks this way:

I have tried many combinations of these, and I cannot understand why it is not working.

You need to uncomment the - line just above size: '1GB'

That has resolved the issue. I had tried that before, but rebooting seems to have helped the changes go into effect. I wonder if I had another processing using the file.

Thank you so much for helping me.

hi all,
i have changed the production config file but i still get the npm error when i run the command:

/var/www/peertube/peertube-latest sudo systemctl restart peertube && sudo journalctl -fu peertube

Apr 27 11:00:24 soy systemd[1]: Started PeerTube daemon.
Apr 27 11:00:24 soy peertube[26565]: > peertube@1.2.1 start /var/www/peertube/versions/peertube-v1.2.1
Apr 27 11:00:24 soy peertube[26565]: > node dist/server
Apr 27 11:00:25 soy peertube[26565]: /var/www/peertube/versions/peertube-v1.2.1/dist/server/initializers/constants.js:705
Apr 27 11:00:25 soy peertube[26565]: return objs.map(obj => {
Apr 27 11:00:25 soy peertube[26565]: ^
Apr 27 11:00:25 soy peertube[26565]: TypeError: objs.map is not a function
Apr 27 11:00:25 soy peertube[26565]: at buildVideosRedundancy (/var/www/peertube/versions/peertube-v1.2.1/dist/server/initializers/constants.js:705:17)
Apr 27 11:00:25 soy peertube[26565]: at Object. (/var/www/peertube/versions/peertube-v1.2.1/dist/server/initializers/constants.js:212:25)
Apr 27 11:00:25 soy peertube[26565]: at Module._compile (module.js:653:30)
Apr 27 11:00:25 soy peertube[26565]: at Object.Module._extensions…js (module.js:664:10)
Apr 27 11:00:25 soy peertube[26565]: at Module.load (module.js:566:32)
Apr 27 11:00:25 soy peertube[26565]: at tryModuleLoad (module.js:506:12)
Apr 27 11:00:25 soy peertube[26565]: at Function.Module._load (module.js:498:3)
Apr 27 11:00:25 soy peertube[26565]: at Module.require (module.js:597:17)
Apr 27 11:00:25 soy peertube[26565]: at require (internal/module.js:11:18)
Apr 27 11:00:25 soy peertube[26565]: at Object. (/var/www/peertube/versions/peertube-v1.2.1/dist/server/initializers/index.js:6:10)
Apr 27 11:00:25 soy peertube[26565]: npm ERR! code ELIFECYCLE
Apr 27 11:00:25 soy peertube[26565]: npm ERR! errno 1
Apr 27 11:00:25 soy peertube[26565]: npm ERR! peertube@1.2.1 start: node dist/server
Apr 27 11:00:25 soy peertube[26565]: npm ERR! Exit status 1
Apr 27 11:00:25 soy peertube[26565]: npm ERR!
Apr 27 11:00:25 soy peertube[26565]: npm ERR! Failed at the peertube@1.2.1 start script.
Apr 27 11:00:25 soy peertube[26565]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Apr 27 11:00:25 soy peertube[26565]: npm ERR! A complete log of this run can be found in:
Apr 27 11:00:25 soy peertube[26565]: npm ERR! /var/www/peertube/.npm/_logs/2019-04-27T11_00_25_264Z-debug.log
Apr 27 11:00:25 soy systemd[1]: peertube.service: Main process exited, code=exited, status=1/FAILURE
Apr 27 11:00:25 soy systemd[1]: peertube.service: Failed with result ‹ exit-code ›.
Apr 27 11:00:25 soy systemd[1]: peertube.service: Service hold-off time over, scheduling restart.
Apr 27 11:00:25 soy systemd[1]: peertube.service: Scheduled restart job, restart counter is at 2.
Apr 27 11:00:25 soy systemd[1]: Stopped PeerTube daemon.

Please open a new issue with your configuration file enclosed.

1 « J'aime »