[solved] V6 upgrade errors

I was of V5, everything woked fine and I decided to do a bench update --upgrade.
Btw, I’m on a VPS with OVH.

I get this when
sudo supervisorctl status
frappe:frappe-web RUNNING pid 26517, uptime 0:04:43
frappe:frappe-worker RUNNING pid 26516, uptime 0:04:43
frappe:frappe-workerbeat RUNNING pid 26518, uptime 0:04:43
node-socketio FATAL Exited too quickly (process log may have details)
redis-async-broker RUNNING pid 26520, uptime 0:04:43
redis-cache FATAL Exited too quickly (process log may have details)

If I try to do a
sudo bench setup socketio
npm http GET https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/redis
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/superagent
npm http GET https://registry.npmjs.org/cookie

npm ERR! Error: failed to fetch from registry: cookie
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR! at Request. (/usr/lib/nodejs/request/main.js:212:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest. (/usr/lib/nodejs/request/main.js:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! http://bugs.debian.org/npm
npm ERR! or use
npm ERR! reportbug --attach /home/frappe/frappe-bench/npm-debug.log npm
npm ERR!
npm ERR! System Linux 2.6.32-042stab108.8
npm ERR! command “node” “/usr/bin/npm” “install” “socket.io” “redis” “express” “superagent” “cookie”
npm ERR! cwd /home/frappe/frappe-bench
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: cookie
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/frappe/frappe-bench/npm-debug.log
npm not ok
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 60, in cli
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 664, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 644, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/cli.py”, line 487, in _setup_socketio
File “/home/frappe/bench-repo/bench/utils.py”, line 112, in setup_socketio
exec_cmd(“npm install socket.io redis express superagent cookie”, cwd=bench)
File “/home/frappe/bench-repo/bench/utils.py”, line 104, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: npm install socket.io redis express superagent cookie

And My npm-debug.log contain:
http GET https://registry.npmjs.org/cookie
ERR! Error: failed to fetch from registry: cookie
ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
ERR! at Request. (/usr/lib/nodejs/request/main.js:212:58)
ERR! at Request.emit (events.js:88:20)
ERR! at ClientRequest. (/usr/lib/nodejs/request/main.js:412:12)
ERR! at ClientRequest.emit (events.js:67:17)
ERR! at HTTPParser.onIncoming (http.js:1261:11)
ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
ERR! You may report this log at:
ERR! http://bugs.debian.org/npm
ERR! or use
ERR! reportbug --attach /home/frappe/frappe-bench/npm-debug.log npm
ERR! System Linux 2.6.32-042stab108.8
ERR! command “node” “/usr/bin/npm” “install” “socket.io” “redis” “express” “superagent” “cookie”
ERR! cwd /home/frappe/frappe-bench
ERR! node -v v0.6.12
ERR! npm -v 1.1.4
ERR! message failed to fetch from registry: cookie
verbose exit [ 1, true ]

Finally found this solution : http://stackoverflow.com/questions/12913141/message-failed-to-fetch-from-registry-while-trying-to-install-any-module

First uninstall
sudo apt-get purge nodejs npm

Then enable nodesource’s repo and install:

curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs

Then run sudo bench setup socketio

Now socketio work fine when I do
sudo supervisorctl status

Only have one issue left with redis-cache server “backoff”


Finally solve the redis-cache issue.

I had to go to frappe/bench/logs directory, and open redis-cache.error.log to find that there were an issue at line 6 of the configuratino file. It was an emply save “”.

So I removed this line from the config/redis_cache.conf and did a
sudo supervisorctl reload