WORKAROUND: https://github.com/Chocobozzz/PeerTube/issues/830#issuecomment-425942717
Hi
PeerTube is failing for some users on some vps with YunoHost 3 (Debian Stretch). I am unable to reproduce it on my VPS.
The error happens after yarn install --production --pure-lockfile --silent --cache-folder /var/cache/yarn/. Here is the failure log.
91412 DEBUG + yarn install --production --pure-lockfile --silent --cache-folder /var/cache/yarn/
137042 WARNING error /var/www/peertube/node_modules/rdf-canonize: Command failed.
137043 WARNING Exit code: 1
137044 WARNING Command: node-gyp rebuild
137045 WARNING Arguments:
137047 WARNING Directory: /var/www/peertube/node_modules/rdf-canonize
137048 WARNING Output:
137049 WARNING /bin/sh: BASH_XTRACEFD : 7 : valeur non valable pour un descripteur de fichier de trace
137050 WARNING sh: BASH_XTRACEFD : 7 : valeur non valable pour un descripteur de fichier de trace
137051 WARNING gyp info it worked if it ends with ok
137052 WARNING gyp info using [email protected]
137054 WARNING gyp info using [email protected] | linux | x64
137055 WARNING gyp info spawn /usr/bin/python2
137056 WARNING gyp info spawn args [ '/opt/node_n/n/versions/node/8.11.3/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
137057 WARNING gyp info spawn args 'binding.gyp',
137059 WARNING gyp info spawn args '-f',
137060 WARNING gyp info spawn args 'make',
137061 WARNING gyp info spawn args '-I',
137062 WARNING gyp info spawn args '/var/www/peertube/node_modules/rdf-canonize/build/config.gypi',
137063 WARNING gyp info spawn args '-I',
137064 WARNING gyp info spawn args '/opt/node_n/n/versions/node/8.11.3/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
137065 WARNING gyp info spawn args '-I',
137066 WARNING gyp info spawn args '/root/.node-gyp/8.11.3/include/node/common.gypi',
137067 WARNING gyp info spawn args '-Dlibrary=shared_library',
137068 WARNING gyp info spawn args '-Dvisibility=default',
137069 WARNING gyp info spawn args '-Dnode_root_dir=/root/.node-gyp/8.11.3',
137069 WARNING gyp info spawn args '-Dnode_gyp_dir=/opt/node_n/n/versions/node/8.11.3/lib/node_modules/npm/node_modules/node-gyp',
137070 WARNING gyp info spawn args '-Dnode_lib_file=/root/.node-gyp/8.11.3/<(target_arch)/node.lib',
137071 WARNING gyp info spawn args '-Dmodule_root_dir=/var/www/peertube/node_modules/rdf-canonize',
137071 WARNING gyp info spawn args '-Dnode_engine=v8',
137072 WARNING gyp info spawn args '--depth=.',
137073 WARNING gyp info spawn args '--no-parallel',
137073 WARNING gyp info spawn args '--generator-output',
137074 WARNING gyp info spawn args 'build',
137075 WARNING gyp info spawn args '-Goutput_dir=.' ]
137076 WARNING /bin/sh: BASH_XTRACEFD : 7 : valeur non valable pour un descripteur de fichier de trace
137076 WARNING gyp: Call to 'node -e "require('nan')"' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
137077 WARNING gyp ERR! configure error
137078 WARNING gyp ERR! stack Error: gyp failed with exit code: 1
137079 WARNING gyp ERR! stack at ChildProcess.onCpExit (/opt/node_n/n/versions/node/8.11.3/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
137079 WARNING gyp ERR! stack at emitTwo (events.js:126:13)
137080 WARNING gyp ERR! stack at ChildProcess.emit (events.js:214:7)
137080 WARNING gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
137081 WARNING gyp ERR! System Linux 4.9.103-xxxx-std-ipv6-64
137082 WARNING gyp ERR! command "/opt/node_n/n/versions/node/8.11.3/bin/node" "/opt/node_n/n/versions/node/8.11.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
137083 WARNING gyp ERR! cwd /var/www/peertube/node_modules/rdf-canonize
137084 WARNING gyp ERR! node -v v8.11.3
137084 WARNING gyp ERR! node-gyp -v v3.6.2
137085 WARNING gyp ERR! not ok
140713 DEBUG + ynh_exit_properly
140713 WARNING !!
140715 WARNING peertube's script has encountered an error. Its execution was cancelled.
140715 DEBUG + local exit_code=1
140716 WARNING !!
140716 DEBUG + '[' 1 -eq 0 ']'
140717 DEBUG + trap '' EXIT
140718 WARNING
140719 DEBUG + set +eu
140720 DEBUG + echo -e '!!\n peertube'''s script has encountered an error. Its execution was cancelled.\n!!'
140721 DEBUG + type -t ynh_clean_setup
140723 DEBUG + ynh_die
Issue on PeerTube YunoHost page: https://github.com/YunoHost-Apps/peertube_ynh/issues/36
What is the cause of the failure?
yes same for me
Did you install node through official repository? https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
Have try this :
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
But Fail
`yunohost app install https://github.com/YunoHost-Apps/peertube_ynh
Domaines disponibles :
Attention : Warning: apt-key output should not be parsed (stdout is not a terminal)
Attention : 2018-07-23 13:16:13 URL:https://github-production-release-asset-2e65be.s3.amazonaws.com/45213667/25a8261c-785b-11e8-96ac-61883a546a4a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180723%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180723T131612Z&X-Amz-Expires=300&X-Amz-Signature=6cf60b3945417a573e1720d7fce0bbc42785c04984443a5d8bfcf548b54fe689&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dpeertube-v1.0.0-beta.9.tar.xz&response-content-type=application%2Foctet-stream [1575288/1575288] -> "app.tar.xz" [1]
Attention : error /var/www/peertube/node_modules/rdf-canonize: Command failed.
Attention : Exit code: 1
Attention : Command: node-gyp rebuild
Attention : Arguments:
Attention : Directory: /var/www/peertube/node_modules/rdf-canonize
Attention : Output:
Attention : /bin/sh: BASH_XTRACEFD : 7 : valeur non valable pour un descripteur de fichier de trace
Attention : sh: BASH_XTRACEFD : 7 : valeur non valable pour un descripteur de fichier de trace
Attention : gyp info it worked if it ends with ok
Attention : gyp info using [email protected]
Attention : gyp info using [email protected] | linux | x64
Attention : gyp info spawn /usr/bin/python2
Attention : gyp info spawn args [ '/opt/node_n/n/versions/node/8.11.3/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
Attention : gyp info spawn args 'binding.gyp',
Attention : gyp info spawn args '-f',
Attention : gyp info spawn args 'make',
Attention : gyp info spawn args '-I',
Attention : gyp info spawn args '/var/www/peertube/node_modules/rdf-canonize/build/config.gypi',
Attention : gyp info spawn args '-I',
Attention : gyp info spawn args '/opt/node_n/n/versions/node/8.11.3/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
Attention : gyp info spawn args '-I',
Attention : gyp info spawn args '/root/.node-gyp/8.11.3/include/node/common.gypi',
Attention : gyp info spawn args '-Dlibrary=shared_library',
Attention : gyp info spawn args '-Dvisibility=default',
Attention : gyp info spawn args '-Dnode_root_dir=/root/.node-gyp/8.11.3',
Attention : gyp info spawn args '-Dnode_gyp_dir=/opt/node_n/n/versions/node/8.11.3/lib/node_modules/npm/node_modules/node-gyp',
Attention : gyp info spawn args '-Dnode_lib_file=/root/.node-gyp/8.11.3/<(target_arch)/node.lib',
Attention : gyp info spawn args '-Dmodule_root_dir=/var/www/peertube/node_modules/rdf-canonize',
Attention : gyp info spawn args '-Dnode_engine=v8',
Attention : gyp info spawn args '--depth=.',
Attention : gyp info spawn args '--no-parallel',
Attention : gyp info spawn args '--generator-output',
Attention : gyp info spawn args 'build',
Attention : gyp info spawn args '-Goutput_dir=.' ]
Attention : /bin/sh: BASH_XTRACEFD : 7 : valeur non valable pour un descripteur de fichier de trace
Attention : gyp: Call to 'node -e "require('nan')"' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
Attention : gyp ERR! configure error
Attention : gyp ERR! stack Error: gyp failed with exit code: 1
Attention : gyp ERR! stack at ChildProcess.onCpExit (/opt/node_n/n/versions/node/8.11.3/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
Attention : gyp ERR! stack at emitTwo (events.js:126:13)
Attention : gyp ERR! stack at ChildProcess.emit (events.js:214:7)
Attention : gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
Attention : gyp ERR! System Linux 4.9.103-xxxx-std-ipv6-64
Attention : gyp ERR! command "/opt/node_n/n/versions/node/8.11.3/bin/node" "/opt/node_n/n/versions/node/8.11.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
Attention : gyp ERR! cwd /var/www/peertube/node_modules/rdf-canonize
Attention : gyp ERR! node -v v8.11.3
Attention : gyp ERR! node-gyp -v v3.6.2
Attention : gyp ERR! not ok
Attention : !!
Attention : peertube's script has encountered an error. Its execution was cancelled.
Attention : !!
Attention :
Attention : /usr/local/n wasn't deleted because it doesn't exist.
Attention : /etc/apt/sources.list.d/jessie-backports.list wasn't deleted because it doesn't exist.
Attention : /etc/nginx/conf.d/peertube1.firewall-sec.com.d/peertube.conf wasn't deleted because it doesn't exist.
Attention : Remove the user peertube
Succ猫s ! La configuration de SSOwat a 茅t茅 g茅n茅r茅e
Erreur : 脡chec de l'installation`
This is an OVH Debain Stretch related issue. On other VPS its working. Someone using OVH VPS on Debian Stretch can confirm it?
I am not able to reproduce this on my home server and other VPS.
We don't really support n. But maybe it is a default shell issue? (/bin/sh: BASH_XTRACEFD : 7 : valeur non valable pour un descripteur de fichier de trace
What is the output of echo $SHELL when you are in the peertube user shell? (or user used by yunohost)
no idea what is going on but all problems with gyp and OVH that is a problem I install this script on contabo vps was fine online.net perfect couple of vps from oneprovider was cool but all problems coming when Im trying to install this scrip on Soyourstart and how I can see one of the guy trying to do the same on kimsufi vps
the same problem for me锛宧ow can i solve it
Hi, same problem for me, some idea?
~If someone gives me an access to this kind of vps, I can try to see what happens (see my email in my profile).~
EDIT: done by @anmol26s
Any update on this?
I sent you an email @anmol26s:
Sorry, but I couldn't get it to work
I don't know why it does not find the `nan` package. It doesn't make any sense. Since we can install peertube directly from the CLI on this server without any issue, maybe it's one of the yunohost function called above yarn install that breaks on a OVH VPS? I don't know...
Sorry not to be able to help more.
Sorry,these big companies put emails in spam. I got your email.
Thanks for looking into it.
Many people are facing nodejs and yarn install issues while installing from the shell scripts in some VPS and dedicated servers(mostly OVH). I don't have solution for this right now. So if you still want to install peertube over yunohost on these servers, I have done a branch which just install the sources and put folders in right place. It means you will need to do few steps manually to make peertube to work over yunohost. Remove script will work normally.
Install nodejs
$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt-get install -y nodejs
Install the peertube with OVH fix branch.
$ yunohost app install --debug https://github.com/YunoHost-Apps/peertube_ynh/tree/ovh_fix
After installation is complete run yarn install .
$ cd /var/www/peertube && yarn install --production --pure-lockfile
Give proper permissions to peertube
$ chown -R peertube:peertube /var/www/peertube
Restart peertube and check if there is any error message.
$ service peertube restart
$ journalctl -feu peertube
Change your root password by this command:
$ cd /var/www/peertube && NODE_CONFIG_DIR="/var/www/peertube/config/" NODE_ENV=production npm run reset-password -- -u root
Username: root
password: created in above step
Great Thanks, it's working
but some fix :
chwon -R peertube:peertube /var/www/peertube to chown -R peertube:peertube /var/www/peertubecd /var/www/peertube && NODE_CONFIG_DIR="/var/www/peertube/config/" NODE_ENV=production /opt/node_n/bin/npm run reset-password -- -u root to cd /var/www/peertube && NODE_CONFIG_DIR="/var/www/peertube/config/" NODE_ENV=production npm run reset-password -- -u rootClosing because I don't think it's a PeerTube bug.
@anmol26s I edited your issue to link to your workaround for people who will still encounter this strange bug.
Most helpful comment
~If someone gives me an access to this kind of vps, I can try to see what happens (see my email in my profile).~
EDIT: done by @anmol26s