Hello,
On a clean Peertube install, everything was working great until I finished uploading my first video. Peertube then was in a infinite restart loop with the same error each time. Here's the details :
PostgreSQL version: 10.1
What is the expected behaviour? Peertube starts normally
What do you see instead? Peertube is in an infinite restart loop
Browser console log if useful (Gist/Pastebin...): n/a
Mar 16 15:24:03 host systemd[1]: Started PeerTube daemon.
Mar 16 15:24:03 host peertube[23036]: > [email protected] start /path/to/peertube/versions/peertube-v1.0.0-alpha.8
Mar 16 15:24:03 host peertube[23036]: > node dist/server
Mar 16 15:24:05 host peertube[23036]: [peertube.ldclrcq.top:443] 2018-03-16 15:24:05.248 info: Database peertube_prod is ready.
Mar 16 15:24:05 host peertube[23036]: [peertube.ldclrcq.top:443] 2018-03-16 15:24:05.422 error: Cannot use SMTP server because of lack of configuration. PeerTube will not be able to send mails!
Mar 16 15:24:05 host peertube[23036]: [peertube.domain.tld:443] 2018-03-16 15:24:05.425 info: Server listening on port 9888
Mar 16 15:24:05 host peertube[23036]: [peertube.domain.tld:443] 2018-03-16 15:24:05.425 info: Web server: https://peertube.ldclrcq.top
Mar 16 15:24:05 host peertube[23036]: [peertube.domain.tld:443] 2018-03-16 15:24:05.450 info: Processing video file in job 4.
Mar 16 15:24:05 host peertube[23036]: [peertube.domain.tld:443] 2018-03-16 15:24:05.453 info: Processing ActivityPub broadcast in job 7.
Mar 16 15:24:06 host peertube[23036]: peertube: symbol lookup error: /path/to/peertube/versions/peertube-v1.0.0-alpha.8/node_modules/rdf-canonize/build/Release/urdna2015.node: undefined symbol: EVP_MD_CTX_init
Mar 16 15:24:06 host peertube[23036]: npm ERR! file sh
Mar 16 15:24:06 host peertube[23036]: npm ERR! code ELIFECYCLE
Mar 16 15:24:06 host peertube[23036]: npm ERR! errno ENOENT
Mar 16 15:24:06 host peertube[23036]: npm ERR! syscall spawn
Mar 16 15:24:06 host peertube[23036]: npm ERR! [email protected] start: `node dist/server`
Mar 16 15:24:06 host peertube[23036]: npm ERR! spawn ENOENT
Mar 16 15:24:06 host peertube[23036]: npm ERR!
Mar 16 15:24:06 host peertube[23036]: npm ERR! Failed at the [email protected] start script.
Mar 16 15:24:06 host peertube[23036]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Mar 16 15:24:06 host peertube[23036]: npm ERR! A complete log of this run can be found in:
Mar 16 15:24:06 host peertube[23036]: npm ERR! /path/to/peertube/.npm/_logs/2018-03-16T14_24_06_486Z-debug.log
Mar 16 15:24:06 host systemd[1]: peertube.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 15:24:06 host systemd[1]: peertube.service: Failed with result 'exit-code'.
Mar 16 15:24:06 host systemd[1]: peertube.service: Service hold-off time over, scheduling restart.
Mar 16 15:24:06 host systemd[1]: peertube.service: Scheduled restart job, restart counter is at 47.
Mar 16 15:24:06 host systemd[1]: Stopped PeerTube daemon.
Complete log from NPM :
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/mnt/storage/Backup/peertube/versions/peertube-v1.0.0-alpha.8/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/bin
9 verbose lifecycle [email protected]~start: CWD: /path/to/peertube/versions/peertube-v1.0.0-alpha.8
10 silly lifecycle [email protected]~start: Args: [ '-c', 'node dist/server' ]
11 info lifecycle [email protected]~start: Failed to exec start script
12 verbose stack Error: [email protected] start: `node dist/server`
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:180:13)
12 verbose stack at maybeClose (internal/child_process.js:936:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
13 verbose pkgid [email protected]
14 verbose cwd /path/to/peertube/versions/peertube-v1.0.0-alpha.8
15 verbose Linux 4.15.7-1-ARCH
16 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
17 verbose node v9.8.0
18 verbose npm v5.7.1
19 error file sh
20 error code ELIFECYCLE
21 error errno ENOENT
22 error syscall spawn
23 error [email protected] start: `node dist/server`
23 error spawn ENOENT
24 error Failed at the [email protected] start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
Try to reinstall node modules: cd /path/to/peertube && rm -r ./node_modules && yarn install --pure-lockfile
I did that and Peertube keeps restarting with the same error as above.
@lucas-dclrcq How much memory do you have?
@sschueller 8gb RAM + 8gb SWAP
total used free shared buff/cache available
Mem: 7.7G 3.3G 531M 292M 3.9G 3.9G
Swap: 8.0G 4.4G 3.6G
This is weird.
Please tell us:
rdf-canonize is compiled)I have exactly the same issue and it seems to be related to openssl since the undefined symbol: EVP_MD_CTX_init is a C library from openssl. see archlinux forum. Both @lucas-dclrcq and I are running peertube on Archlinux, my version of openssl is 1.1.0.g-1.
And to complete what oknozor said, here is my yarn output near when rdf-canonize is compiled :
https://pastebin.com/eQhxgFiY
Reproduced. I'll try to fix it.
Related to https://git.archlinux.org/svntogit/community.git/commit/trunk?h=packages/nodejs&id=611c448f93b7bf3a64f214e19300dee2834ca4ce
I suggest you to downgrade to node 9.8.0-1 for now. The main issue is that node only provides headers with openssl 1.0.x (used by node-gyp to build native dependencies). Moreover rdf-canonize is not compatible with openssl 1.1 (not too difficult to add).
Downgrading to node 9.8.0-1 did it ! Merci beaucoup !
Bis repetita: downgrading to 9.8.0-1 solved it ! Thank you @Chocobozzz !
Closing this because IMHO this is an ArchLinux issue. https://bugs.archlinux.org/task/57863
Hello, just to add a bit of info, it's fixed with nodejs 9.9.0-1.
Most helpful comment
Reproduced. I'll try to fix it.