Chocobozzz / PeerTube

ActivityPub-federated video streaming platform using P2P directly in your web browser
https://joinpeertube.org/
GNU Affero General Public License v3.0
12.92k stars 1.48k forks source link

Plugins issue after migrating to new server #6377

Closed jpatje closed 4 months ago

jpatje commented 4 months ago

Describe the problem

Because my old server was P2V'd and upgraded from Ubuntu 20 to 22 and some other things done to it (like installing Cockpit which I don't want to use anymore) I decided to do a clean install on Ubuntu 24.04 LTS.

Sofar almost everything seems right, only the plugins are broken. The peertube daemon journalctl tail shows the following errors (journalctl -u peertube -f):

May 05 11:42:37 peertube peertube[11805]: [video.yerunski.nl:443] 2024-05-05 11:42:37.137 warn: Cannot install plugin peertube-theme-dark. {
May 05 11:42:37 peertube peertube[11805]:   "err": {
May 05 11:42:37 peertube peertube[11805]:     "err": {
May 05 11:42:37 peertube peertube[11805]:       "stack": "Error: Command failed: yarn add peertube-theme-dark@2.5.0\nwarning package.json: No license field\nwarning No license field\nwarning \"peertube-plugin-tv-streaming > @silvermine/videojs-airplay@1.3.0\" has unmet peer dependency \"video.js@>= 6.0.0\".\nwarning \"peertube-plugin-tv-streaming > @silvermine/videojs-chromecast@1.5.0\" has unmet peer dependency \"video.js@>= 6 < 9\".\nerror Error: EACCES: permission denied, open '/var/www/peertube/storage/plugins/yarn.lock'\n\n    at ChildProcess.exithandler (node:child_process:422:12)\n    at ChildProcess.emit (node:events:517:28)\n    at maybeClose (node:internal/child_process:1098:16)\n    at ChildProcess._handle.onexit (node:internal/child_process:303:5)",
May 05 11:42:37 peertube peertube[11805]:       "message": "Command failed: yarn add peertube-theme-dark@2.5.0\nwarning package.json: No license field\nwarning No license field\nwarning \"peertube-plugin-tv-streaming > @silvermine/videojs-airplay@1.3.0\" has unmet peer dependency \"video.js@>= 6.0.0\".\nwarning \"peertube-plugin-tv-streaming > @silvermine/videojs-chromecast@1.5.0\" has unmet peer dependency \"video.js@>= 6 < 9\".\nerror Error: EACCES: permission denied, open '/var/www/peertube/storage/plugins/yarn.lock'\n",

The files in /var/www/peertube/storage/plugins/node_modules were all owned by 'root', I 'chowned' them so now they are all owned by the peertube user. Still the issue persists. I wonder if this can be fixed or that I have to start all over again with the migration. Any help or guidance would be greatly appreciated :)

edit: I suspect it's better to uninstall all plugins before migrating although it is not mentioned in the migration guide.

Additional information

Chocobozzz commented 4 months ago

Hello,

Try chown -R peertube:peertube /var/www/peertube

jpatje commented 4 months ago

That worked great! Merci beaucoup!