Bench Start doesn't start

Hi,

After installing frappe and setting ERPNEXT on Ubuntu 18.04 LTS when I run
bench start, I get the error:
17:14:03 system | worker_long.1 started (pid=19420)
17:14:03 system | redis_socketio.1 started (pid=19418)
17:14:03 redis_socketio.1 | 19424:C 19 Nov 2019 17:14:03.090 # Fatal error, can’t open config file ‘config/redis_socketio.conf’
17:14:03 system | redis_socketio.1 stopped (rc=1)
17:14:03 system | web.1 started (pid=19429)
17:14:03 system | watch.1 started (pid=19425)
17:14:03 system | worker_short.1 started (pid=19439)
17:14:03 system | redis_queue.1 started (pid=19432)
17:14:03 redis_queue.1 | 19438:C 19 Nov 2019 17:14:03.117 # Fatal error, can’t open config file ‘config/redis_queue.conf’
17:14:03 system | redis_queue.1 stopped (rc=1)
17:14:03 system | schedule.1 started (pid=19441)
17:14:03 system | socketio.1 started (pid=19445)
17:14:03 system | worker_default.1 started (pid=19449)
17:14:03 system | redis_cache.1 started (pid=19437)
17:14:03 system | sending SIGTERM to worker_long.1 (pid 19420)
17:14:03 system | sending SIGTERM to watch.1 (pid 19425)
17:14:03 system | sending SIGTERM to web.1 (pid 19429)
17:14:03 system | sending SIGTERM to schedule.1 (pid 19441)
17:14:03 system | sending SIGTERM to worker_default.1 (pid 19449)
17:14:03 system | sending SIGTERM to socketio.1 (pid 19445)
17:14:03 system | sending SIGTERM to redis_cache.1 (pid 19437)
17:14:03 system | sending SIGTERM to worker_short.1 (pid 19439)
17:14:03 redis_cache.1 | 19440:C 19 Nov 2019 17:14:03.118 # Fatal error, can’t open config file ‘config/redis_cache.conf’
17:14:03 system | redis_cache.1 stopped (rc=1)
17:14:03 system | worker_default.1 stopped (rc=-15)
17:14:03 system | schedule.1 stopped (rc=-15)
17:14:03 system | worker_long.1 stopped (rc=-15)
17:14:03 system | watch.1 stopped (rc=-15)
17:14:03 system | worker_short.1 stopped (rc=-15)
17:14:03 system | web.1 stopped (rc=-15)
17:14:03 system | socketio.1 stopped (rc=-15)

Thanks
Nitesh chahar

check if file exists

you can try this…

redis-cli -p 13000 FLUSHALL

and then start bench again

1 Like

After adding redis_cache.conf in config folder and running the bench again then i get this :
12:13:48 system | redis_socketio.1 started (pid=23379)
12:13:48 redis_socketio.1 | 23386:C 20 Nov 2019 12:13:48.686 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
12:13:48 redis_socketio.1 | 23386:C 20 Nov 2019 12:13:48.686 # Redis version=5.0.6, bits=64, commit=00000000, modified=0, pid=23386, just started
12:13:48 redis_socketio.1 | 23386:C 20 Nov 2019 12:13:48.686 # Configuration loaded
12:13:48 redis_socketio.1 | 23386:M 20 Nov 2019 12:13:48.687 * Increased maximum number of open files to 10032 (it was originally set to 1024).
12:13:48 redis_socketio.1 | 23386:M 20 Nov 2019 12:13:48.688 * Running mode=standalone, port=12000.
12:13:48 redis_socketio.1 | 23386:M 20 Nov 2019 12:13:48.688 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
12:13:48 redis_socketio.1 | 23386:M 20 Nov 2019 12:13:48.688 # Server initialized
12:13:48 redis_socketio.1 | 23386:M 20 Nov 2019 12:13:48.688 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.
12:13:48 redis_socketio.1 | 23386:M 20 Nov 2019 12:13:48.688 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command ‘echo never > /sys/kernel/mm/transparent_hugepage/enabled’ as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
12:13:48 redis_socketio.1 | 23386:M 20 Nov 2019 12:13:48.688 * Ready to accept connections
12:13:48 system | worker_long.1 started (pid=23381)
12:13:48 system | watch.1 started (pid=23383)
12:13:48 system | web.1 started (pid=23389)
12:13:48 system | worker_default.1 started (pid=23390)
12:13:48 system | redis_queue.1 started (pid=23397)
12:13:48 redis_queue.1 | 23400:C 20 Nov 2019 12:13:48.696 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
12:13:48 redis_queue.1 | 23400:C 20 Nov 2019 12:13:48.696 # Redis version=5.0.6, bits=64, commit=00000000, modified=0, pid=23400, just started
12:13:48 redis_queue.1 | 23400:C 20 Nov 2019 12:13:48.696 # Configuration loaded
12:13:48 redis_queue.1 | 23400:M 20 Nov 2019 12:13:48.697 * Increased maximum number of open files to 10032 (it was originally set to 1024).
12:13:48 redis_queue.1 | 23400:M 20 Nov 2019 12:13:48.698 * Running mode=standalone, port=11000.
12:13:48 redis_queue.1 | 23400:M 20 Nov 2019 12:13:48.698 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
12:13:48 redis_queue.1 | 23400:M 20 Nov 2019 12:13:48.698 # Server initialized
12:13:48 redis_queue.1 | 23400:M 20 Nov 2019 12:13:48.698 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.
12:13:48 redis_queue.1 | 23400:M 20 Nov 2019 12:13:48.698 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command ‘echo never > /sys/kernel/mm/transparent_hugepage/enabled’ as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
12:13:48 redis_queue.1 | 23400:M 20 Nov 2019 12:13:48.698 * Ready to accept connections
12:13:48 system | socketio.1 started (pid=23408)
12:13:48 system | worker_short.1 started (pid=23396)
12:13:48 system | schedule.1 started (pid=23410)
12:13:48 system | redis_cache.1 started (pid=23411)
12:13:48 redis_cache.1 | 23415:C 20 Nov 2019 12:13:48.734 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
12:13:48 redis_cache.1 | 23415:C 20 Nov 2019 12:13:48.734 # Redis version=5.0.6, bits=64, commit=00000000, modified=0, pid=23415, just started
12:13:48 redis_cache.1 | 23415:C 20 Nov 2019 12:13:48.734 # Configuration loaded
12:13:48 redis_cache.1 | 23415:M 20 Nov 2019 12:13:48.735 * Increased maximum number of open files to 10032 (it was originally set to 1024).
12:13:48 redis_cache.1 | 23415:M 20 Nov 2019 12:13:48.735 * Running mode=standalone, port=13000.
12:13:48 redis_cache.1 | 23415:M 20 Nov 2019 12:13:48.735 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
12:13:48 redis_cache.1 | 23415:M 20 Nov 2019 12:13:48.735 # Server initialized
12:13:48 redis_cache.1 | 23415:M 20 Nov 2019 12:13:48.735 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.
12:13:48 redis_cache.1 | 23415:M 20 Nov 2019 12:13:48.735 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command ‘echo never > /sys/kernel/mm/transparent_hugepage/enabled’ as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
12:13:48 redis_cache.1 | 23415:M 20 Nov 2019 12:13:48.735 * Ready to accept connections
12:13:49 socketio.1 | events.js:174
12:13:49 socketio.1 | throw er; // Unhandled ‘error’ event
12:13:49 socketio.1 | ^
12:13:49 socketio.1 |
12:13:49 socketio.1 | Error: listen EADDRINUSE: address already in use :::9000
12:13:49 socketio.1 | at Server.setupListenHandle [as _listen2] (net.js:1280:14)
12:13:49 socketio.1 | at listenInCluster (net.js:1328:12)
12:13:49 socketio.1 | at Server.listen (net.js:1415:7)
12:13:49 socketio.1 | at Object. (/opt/bench/erpnext/apps/frappe/socketio.js:25:8)
12:13:49 socketio.1 | at Module._compile (internal/modules/cjs/loader.js:778:30)
12:13:49 socketio.1 | at Object.Module._extensions…js (internal/modules/cjs/loader.js:789:10)
12:13:49 socketio.1 | at Module.load (internal/modules/cjs/loader.js:653:32)
12:13:49 socketio.1 | at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
12:13:49 socketio.1 | at Function.Module._load (internal/modules/cjs/loader.js:585:3)
12:13:49 socketio.1 | at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
12:13:49 socketio.1 | Emitted ‘error’ event at:
12:13:49 socketio.1 | at emitErrorNT (net.js:1307:8)
12:13:49 socketio.1 | at process._tickCallback (internal/process/next_tick.js:63:19)
12:13:49 socketio.1 | at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
12:13:49 socketio.1 | at startup (internal/bootstrap/node.js:283:19)
12:13:49 socketio.1 | at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
12:13:49 system | socketio.1 stopped (rc=1)
12:13:49 system | sending SIGTERM to redis_socketio.1 (pid 23379)
12:13:49 system | sending SIGTERM to worker_long.1 (pid 23381)
12:13:49 system | sending SIGTERM to watch.1 (pid 23383)
12:13:49 system | sending SIGTERM to redis_queue.1 (pid 23397)
12:13:49 system | sending SIGTERM to web.1 (pid 23389)
12:13:49 system | sending SIGTERM to schedule.1 (pid 23410)
12:13:49 system | sending SIGTERM to worker_default.1 (pid 23390)
12:13:49 system | sending SIGTERM to redis_cache.1 (pid 23411)
12:13:49 system | sending SIGTERM to worker_short.1 (pid 23396)
12:13:49 redis_socketio.1 | 23386:signal-handler (1574232229) Received SIGTERM scheduling shutdown…
12:13:49 redis_socketio.1 | 23386:M 20 Nov 2019 12:13:49.595 # User requested shutdown…
12:13:49 redis_socketio.1 | 23386:M 20 Nov 2019 12:13:49.595 * Removing the pid file.
12:13:49 redis_socketio.1 | 23386:M 20 Nov 2019 12:13:49.595 # Redis is now ready to exit, bye bye…
12:13:49 system | redis_socketio.1 stopped (rc=-15)
12:13:49 system | worker_long.1 stopped (rc=-15)
12:13:49 system | worker_default.1 stopped (rc=-15)
12:13:49 redis_queue.1 | 23400:signal-handler (1574232229) Received SIGTERM scheduling shutdown…
12:13:49 system | watch.1 stopped (rc=-15)
12:13:49 system | worker_short.1 stopped (rc=-15)
12:13:49 redis_cache.1 | 23415:signal-handler (1574232229) Received SIGTERM scheduling shutdown…
12:13:49 system | web.1 stopped (rc=-15)
12:13:49 system | schedule.1 stopped (rc=-15)
12:13:49 redis_queue.1 | 23400:M 20 Nov 2019 12:13:49.605 # User requested shutdown…
12:13:49 redis_queue.1 | 23400:M 20 Nov 2019 12:13:49.605 * Removing the pid file.
12:13:49 redis_queue.1 | 23400:M 20 Nov 2019 12:13:49.605 # Redis is now ready to exit, bye bye…
12:13:49 system | redis_queue.1 stopped (rc=-15)
12:13:49 redis_cache.1 | 23415:M 20 Nov 2019 12:13:49.642 # User requested shutdown…
12:13:49 redis_cache.1 | 23415:M 20 Nov 2019 12:13:49.642 * Removing the pid file.
12:13:49 redis_cache.1 | 23415:M 20 Nov 2019 12:13:49.642 # Redis is now ready to exit, bye bye…
12:13:49 system | redis_cache.1 stopped (rc=-15)

Do a search for this error in your traceback
Preformatted textError: listen EADDRINUSE: address already in use :::9000Preformatted text

1 Like

Try this command.
sudo service nginx stop
sudo service supervisor stop