Looks like your node modules are problematic. Try running bench setup socketio
from the frappe-bench folder
Long output pasted here: ~/frappe-bench$ bench setup socketionpm http GET https://registry.npmjs.org/so - Pastebin.com
Now try sudo supervisorctl restart frappe-bench-processes:frappe-bench-node-socketio
~/frappe-bench$ sudo supervisorctl restart frappe-bench-processes:frappe-bench-node-socketio
frappe-bench-processes:frappe-bench-node-socketio: ERROR (not running)
frappe-bench-processes:frappe-bench-node-socketio: ERROR (abnormal termination)
Try running this again. if this doesn’t show any different error, I am officially out of thoughts. Can we continue this tomorrow? It is very late here.
~/frappe-bench$ nodejs apps/frappe/socketio.js
listening on *: 9000
Then it just hangs there…
Also tried this:
~/frappe-bench$ sudo supervisorctl start frappe-bench-processes:frappe-bench-node-socketio
frappe-bench-processes:frappe-bench-node-socketio: ERROR (abnormal termination)
~/frappe-bench$ sudo supervisorctl restart frappe-bench-processes:frappe-bench-node-socketio
FAILED: attempted to kill frappe-bench-node-socketio with sig SIGTERM but it wasn't running
frappe-bench-processes:frappe-bench-node-socketio: ERROR (already started)
This means your nodejs apps/frappe/socketio.js
command worked!
So technically there is nothing wrong with your setup but still nodejs doesn’t start.
Do these steps:
sudo supervisorctl stop all
ps aux | grep redis-server
ps aux | grep frappe
and tell its output.
~/frappe-bench$ sudo supervisorctl stop all
frappe-bench-frappe-async-worker: stopped
frappe-bench-frappe-longjob-worker: stopped
frappe-bench-frappe-workerbeat: stopped
frappe-bench-frappe-web: stopped
frappe-bench-frappe-worker: stopped
ubuntu@ip-xxx-xxx-xxx-xxx:~/frappe-bench$ ps aux | grep redis-server
redis 1587 0.0 0.7 36992 7868 ? Ssl 12:37 0:01 /usr/bin/redis-server 127.0.0.1:6379
ubuntu 3187 0.0 0.0 10464 944 pts/0 S+ 13:27 0:00 grep --color=auto redis-server
~/frappe-bench$ ps aux | grep frappe
ubuntu 3190 0.0 0.0 10460 940 pts/0 S+ 13:29 0:00 grep --color=auto frappe
Ok. I think I got the problem. Try this if you are not using this server for anything else other than erpnext:
sudo update-rc.d redis-server disable
sudo supervisorctl start all
Only using server for erpnext, so here we go…
~/frappe-bench$ sudo update-rc.d redis-server disable
update-rc.d: warning: start runlevel arguments (none) do not match redis-server Default-Start values (2 3 4 5)
update-rc.d: warning: stop runlevel arguments (none) do not match redis-server Default-Stop values (0 1 6)
Disabling system startup links for /etc/init.d/redis-server …
Removing any system startup links for /etc/init.d/redis-server …
/etc/rc0.d/K20redis-server
/etc/rc1.d/K20redis-server
/etc/rc2.d/S20redis-server
/etc/rc3.d/S20redis-server
/etc/rc4.d/S20redis-server
/etc/rc5.d/S20redis-server
/etc/rc6.d/K20redis-server
Adding system startup for /etc/init.d/redis-server …
/etc/rc0.d/K20redis-server → …/init.d/redis-server
/etc/rc1.d/K20redis-server → …/init.d/redis-server
/etc/rc6.d/K20redis-server → …/init.d/redis-server
/etc/rc2.d/K80redis-server → …/init.d/redis-server
/etc/rc3.d/K80redis-server → …/init.d/redis-server
/etc/rc4.d/K80redis-server → …/init.d/redis-server
/etc/rc5.d/K80redis-server → …/init.d/redis-server
~/frappe-bench$ sudo supervisorctl start all
frappe-bench-frappe-async-worker: started
frappe-bench-frappe-longjob-worker: started
frappe-bench-frappe-workerbeat: started
frappe-bench-frappe-web: started
frappe-bench-frappe-worker: started
frappe-bench-node-socketio: ERROR (abnormal termination)
frappe-bench-redis-queue: started
frappe-bench-redis-cache: started
frappe-bench-redis-socketio: started
Output of tail -n20 logs/node-socketio.log
and tail -n20 logs/node-socketio.error.log
~/frappe-bench$ tail -n20 logs/node-socketio.log
listening on *: 9000
listening on *: 9000
listening on *: 9000
listening on *: 9000
listening on *: 9000
listening on *: 9000
listening on *: 9000
listening on *: 9000
listening on *: 9000
listening on *: 9000
listening on *: 9000
listening on *: 9000
listening on *: 9000
listening on *: 9000
listening on *: 9000
listening on *: 9000
listening on *: 9000
listening on *: 9000
listening on *: 9000
listening on *: 9000
~/frappe-bench$ tail -n20 logs/node-socketio.error.log
events.js:72
throw er; // Unhandled 'error' event
^
Error: Redis connection to redis://localhost:12311 failed - connect ENOENT
at RedisClient.on_error (/home/ubuntu/frappe-bench/node_modules/redis/index.js:196:24)
at Socket.<anonymous> (/home/ubuntu/frappe-bench/node_modules/redis/index.js:106:14)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:441:14
at process._tickCallback (node.js:415:13)
events.js:72
throw er; // Unhandled 'error' event
^
Error: Redis connection to redis://localhost:12311 failed - connect ENOENT
at RedisClient.on_error (/home/ubuntu/frappe-bench/node_modules/redis/index.js:196:24)
at Socket.<anonymous> (/home/ubuntu/frappe-bench/node_modules/redis/index.js:106:14)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:441:14
at process._tickCallback (node.js:415:13)
I had a small issue with the commands provided on point 4:
bench setup sudoers frappe # or the user that you used to install erpnext
gives an error about requiring super privileges. I ran it with sudo in front and that seemed to work. Just want to confirm that won’t cause other problems (and maybe you should update the commands).
Let’s continue this discussion tomorrow. I am out of ideas . May be someone else in the community can help troubleshoot.
Hi Kody. Socketio down doesn’t mean you can’t use ERPNext. Did you try logging in?
Gah… nginx was stopped due to all the testing. Started nginx again and we’re running. Thanks!
I followed note 4,
had to follow Redis cache server not running. Please contact Administrator / Techsupport error to remove redis-cache error
In brief :
I see no error on bench update now. I get error on sudo supervisorctl status
output of sudo supervisorctl status
:
frappe-bench-processes:frappe-bench-frappe-async-worker RUNNING pid 3461, uptime 0:07:55
frappe-bench-processes:frappe-bench-frappe-longjob-worker RUNNING pid 3462, uptime 0:07:55
frappe-bench-processes:frappe-bench-frappe-web RUNNING pid 3486, uptime 0:07:54
frappe-bench-processes:frappe-bench-frappe-worker RUNNING pid 3497, uptime 0:07:54
frappe-bench-processes:frappe-bench-frappe-workerbeat RUNNING pid 3479, uptime 0:07:55
frappe-bench-processes:frappe-bench-node-socketio RUNNING pid 3517, uptime 0:07:51
frappe-bench-redis:frappe-bench-redis-cache RUNNING pid 3514, uptime 0:07:52
frappe-bench-redis:frappe-bench-redis-queue FATAL Exited too quickly (process log may have details)
frappe-bench-redis:frappe-bench-redis-socketio RUNNING pid 3519, uptime 0:07:51
process log logs/redis-queue.log:
[3513] 25 Mar 09:22:45 # Opening port 6379: bind: Address already in use
[3518] 25 Mar 09:22:46 # Opening port 6379: bind: Address already in use
[3528] 25 Mar 09:22:49 # Opening port 6379: bind: Address already in use
[3529] 25 Mar 09:22:52 # Opening port 6379: bind: Address already in use
Everything is working fine on desk. No errors on desk.
solved with :
sudo update-rc.d redis-server disable
sudo service redis-server stop
sudo supervisorctl start all
After following the steps here ended up:
admin@server1:~/frappe-bench$ sudo supervisorctl restart frappe-bench-processes:frappe-bench-frappe-async-worker: stopped
frappe-bench-frappe-longjob-worker: stopped
frappe-bench-frappe-workerbeat: stopped
frappe-bench-frappe-web: stopped
frappe-bench-frappe-worker: stopped
frappe-bench-node-socketio: stopped
frappe-bench-frappe-async-worker: ERROR (abnormal termination)
frappe-bench-frappe-longjob-worker: ERROR (abnormal termination)
frappe-bench-frappe-workerbeat: ERROR (abnormal termination)
frappe-bench-frappe-web: ERROR (abnormal termination)
frappe-bench-frappe-worker: ERROR (abnormal termination)
frappe-bench-node-socketio: started
Here is the current status:
sudo supervisorctl status
[sudo] password for admin:
frappe-bench-processes:frappe-bench-frappe-async-worker FATAL Exited too quickly (process log may have details)
frappe-bench-processes:frappe-bench-frappe-longjob-worker FATAL Exited too quickly (process log may have details)
frappe-bench-processes:frappe-bench-frappe-web FATAL Exited too quickly (process log may have details)
frappe-bench-processes:frappe-bench-frappe-worker FATAL Exited too quickly (process log may have details)
frappe-bench-processes:frappe-bench-frappe-workerbeat FATAL Exited too quickly (process log may have details)
frappe-bench-processes:frappe-bench-node-socketio RUNNING pid 17667, uptime 11:08:12
frappe-bench-redis:frappe-bench-redis-cache RUNNING pid 8780, uptime 11:26:41
frappe-bench-redis:frappe-bench-redis-queue RUNNING pid 8779, uptime 11:26:41
frappe-bench-redis:frappe-bench-redis-socketio RUNNING pid 8785, uptime 11:26:40
help please.
Which steps did you follow? Please paste your full command history.