Chocobozzz / PeerTube

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

Peertube stopped working after a full disk incident #2821

Closed FathiBenNasr closed 4 years ago

FathiBenNasr commented 4 years ago

Hi, I have a peertube instance running on a debian 10 container. It worked for several weeks and I enjoyed adding content to it. I started swapping personalized drupal content type for peertube embedded videos on our intranet, till i filled up the peertube container. So, I added some space to the container and rebooted it, and then:

peertube@veedeo:~$ cd peertube-latest peertube@veedeo:~/peertube-latest$ npm start npm WARN npm npm does not support Node.js v10.19.0 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9. npm WARN npm You can find the latest version at https://nodejs.org/

peertube@2.1.1 start /var/www/peertube/versions/peertube-v2.1.1 node dist/server Could someone help me please ?

Chocobozzz commented 4 years ago

Did you install nodejs using https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions?

FathiBenNasr commented 4 years ago

Yes, I followed the link on that url to https://github.com/nodesource/distributions/blob/master/README.md and installed accordingly. This is a second working install, moving between hypervisors and it worked smoothly on browsers and on Thorium android app.

Chocobozzz commented 4 years ago

What is the output of which npm?

FathiBenNasr commented 4 years ago

I removed all packages related to node and reinstalled them. Also copying content to a remote server before restoring from a container backup. which npm returns: /usr/bin/npm

Now, I have: peertube@veedeo:~$ cd peertube-latest peertube@veedeo:~/peertube-latest$ npm start

peertube@2.1.1 start /var/www/peertube/versions/peertube-v2.1.1 node dist/server

Something went wrong installing the "sharp" module

libnode.so.64: cannot open shared object file: No such file or directory

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! peertube@2.1.1 start: node dist/server npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the peertube@2.1.1 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /var/www/peertube/.npm/_logs/2020-06-02T10_53_03_348Z-debug.log

Did what it asked and now: peertube@veedeo:~/peertube-latest$ npm start

peertube@2.1.1 start /var/www/peertube/versions/peertube-v2.1.1 node dist/server

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! peertube@2.1.1 start: node dist/server npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the peertube@2.1.1 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /var/www/peertube/.npm/_logs/2020-06-02T11_11_15_948Z-debug.log

In the previous logfile, i have: peertube@veedeo:~/peertube-latest$ cat /var/www/peertube/.npm/_logs/2020-06-02T11_11_15_948Z-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ] 2 info using npm@6.14.4 3 info using node@v12.17.0 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle peertube@2.1.1~prestart: peertube@2.1.1 6 info lifecycle peertube@2.1.1~start: peertube@2.1.1 7 verbose lifecycle peertube@2.1.1~start: unsafe-perm in lifecycle true 8 verbose lifecycle peertube@2.1.1~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/peertube/versions/peertube-v2.1.1/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games 9 verbose lifecycle peertube@2.1.1~start: CWD: /var/www/peertube/versions/peertube-v2.1.1 10 silly lifecycle peertube@2.1.1~start: Args: [ '-c', 'node dist/server' ] 11 silly lifecycle peertube@2.1.1~start: Returned: code: 1 signal: null 12 info lifecycle peertube@2.1.1~start: Failed to exec start script 13 verbose stack Error: peertube@2.1.1 start: node dist/server 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:315:20) 13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:315:20) 13 verbose stack at maybeClose (internal/child_process.js:1021:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) 14 verbose pkgid peertube@2.1.1 15 verbose cwd /var/www/peertube/versions/peertube-v2.1.1 16 verbose Linux 5.4.41-1-pve 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start" 18 verbose node v12.17.0 19 verbose npm v6.14.4 20 error code ELIFECYCLE 21 error errno 1 22 error peertube@2.1.1 start: node dist/server 22 error Exit status 1 23 error Failed at the peertube@2.1.1 start script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

Chocobozzz commented 4 years ago

Run rm -r node_modules && yarn install --pure-lockfile with the peertube user

FathiBenNasr commented 4 years ago

peertube@veedeo:~/peertube-latest$ rm -r node_modules && yarn install -pure-lockfile yarn install v1.22.4 error install has been replaced with add to add new dependencies. Run "yarn add -l -o -c -k -f -i -l -e" instead. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Chocobozzz commented 4 years ago

Sorry, I made a typo. It's --pure-lockfile instead of -pure-lockfile. I edited my comment