Bench start error in frappe

Hi All

I created a new app in frappe and things were going on fine . All of a sudden bench start is failing. Could some one help me resolve this

15:07:58 system | redis_socketio.1 started (pid=3079)
15:07:58 system | worker_long.1 started (pid=3081)
15:07:58 system | worker_default.1 started (pid=3093)
15:07:58 system | schedule.1 started (pid=3091)
15:07:58 redis_socketio.1 | [3085] 31 May 15:07:58.536 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
15:07:58 redis_socketio.1 | .
15:07:58 redis_socketio.1 | .-__ ''-._ 15:07:58 redis_socketio.1 | _.- . . ‘’-._ Redis 2.8.4 (00000000/0) 64 bit
15:07:58 redis_socketio.1 | .- .-```. ```\/ _.,_ ''-._ 15:07:58 redis_socketio.1 | ( ' , .-` | `, ) Running in stand alone mode 15:07:58 redis_socketio.1 | |`-._`-...-` __...-.-.|'_.-'| Port: 12311 15:07:58 redis_socketio.1 | | -. ._ / _.-' | PID: 3085 15:07:58 redis_socketio.1 | -._ -._ -./ .-’ .-’
15:07:58 redis_socketio.1 | |-._-.
-.__.-' _.-'_.-'| 15:07:58 redis_socketio.1 | | -.
-._ _.-'_.-' | http://redis.io 15:07:58 redis_socketio.1 | -._ -._-..-'.-’ .-’
15:07:58 redis_socketio.1 | |-._-.
-.__.-' _.-'_.-'| 15:07:58 redis_socketio.1 | | -.
-._ _.-'_.-' | 15:07:58 redis_socketio.1 | -._ -._-.
.-‘.-’ .-’
15:07:58 redis_socketio.1 | -._ -..-’ _.-’
15:07:58 redis_socketio.1 | -._ _.-' 15:07:58 redis_socketio.1 | -.
.-’
15:07:58 redis_socketio.1 |
15:07:58 redis_socketio.1 | [3085] 31 May 15:07:58.536 # Server started, Redis version 2.8.4
15:07:58 redis_socketio.1 | [3085] 31 May 15:07:58.536 # 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.
15:07:58 redis_socketio.1 | [3085] 31 May 15:07:58.536 * The server is now ready to accept connections on port 12311
15:07:58 system | redis_queue.1 started (pid=3092)
15:07:58 redis_queue.1 | [3099] 31 May 15:07:58.545 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
15:07:58 redis_queue.1 | [3099] 31 May 15:07:58.545 # Creating Server TCP listening socket 127.0.0.1:6379: bind: Address already in use
15:07:58 system | web.1 started (pid=3087)
15:07:58 system | watch.1 started (pid=3083)
15:07:58 system | redis_queue.1 stopped (rc=1)
15:07:58 system | redis_cache.1 started (pid=3110)
15:07:58 system | worker_short.1 started (pid=3109)
15:07:58 redis_cache.1 | [3112] 31 May 15:07:58.580 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
15:07:58 redis_cache.1 | .
15:07:58 redis_cache.1 | .-__ ''-._ 15:07:58 redis_cache.1 | _.- . . ‘’-.
Redis 2.8.4 (00000000/0) 64 bit
15:07:58 redis_cache.1 | .- .-```. ```\/ _.,_ ''-._ 15:07:58 redis_cache.1 | ( ' , .-` | `, ) Running in stand alone mode 15:07:58 redis_cache.1 | |`-._`-...-` __...-.-.
|’_.-'| Port: 11311 15:07:58 redis_cache.1 | | -._ ._ / _.-' | PID: 3112 15:07:58 redis_cache.1 | -._ -._ -./ .-’ .-’
15:07:58 redis_cache.1 | |-._-.
-.__.-' _.-'_.-'| 15:07:58 redis_cache.1 | | -.
-._ _.-'_.-' | http://redis.io 15:07:58 redis_cache.1 | -._ -._-..-'.-’ .-’
15:07:58 redis_cache.1 | |-._-.
-.__.-' _.-'_.-'| 15:07:58 redis_cache.1 | | -.
-._ _.-'_.-' | 15:07:58 redis_cache.1 | -._ -._-.
.-‘_.-’ _.-’
15:07:58 redis_cache.1 | -._ -..-’ _.-’
15:07:58 redis_cache.1 | -._ _.-' 15:07:58 redis_cache.1 | -.
.-’
15:07:58 redis_cache.1 |
15:07:58 redis_cache.1 | [3112] 31 May 15:07:58.581 # Server started, Redis version 2.8.4
15:07:58 redis_cache.1 | [3112] 31 May 15:07:58.581 # 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.
15:07:58 redis_cache.1 | [3112] 31 May 15:07:58.581 * The server is now ready to accept connections on port 11311
15:07:58 system | socketio.1 started (pid=3115)
15:07:58 system | sending SIGTERM to redis_socketio.1 (pid 3079)
15:07:58 system | sending SIGTERM to worker_long.1 (pid 3081)
15:07:58 system | sending SIGTERM to watch.1 (pid 3083)
15:07:58 system | sending SIGTERM to web.1 (pid 3087)
15:07:58 system | sending SIGTERM to schedule.1 (pid 3091)
15:07:58 system | sending SIGTERM to worker_default.1 (pid 3093)
15:07:58 system | sending SIGTERM to socketio.1 (pid 3115)
15:07:58 system | sending SIGTERM to redis_cache.1 (pid 3110)
15:07:58 system | sending SIGTERM to worker_short.1 (pid 3109)
15:07:58 redis_socketio.1 | [3085 | signal handler] (1464687478) Received SIGTERM, scheduling shutdown…
15:07:58 system | worker_long.1 stopped (rc=-15)
15:07:58 system | schedule.1 stopped (rc=-15)
15:07:58 system | socketio.1 stopped (rc=-15)
15:07:58 system | worker_short.1 stopped (rc=-15)
15:07:58 system | watch.1 stopped (rc=-15)
15:07:58 redis_cache.1 | [3112 | signal handler] (1464687478) Received SIGTERM, scheduling shutdown…
15:07:58 system | worker_default.1 stopped (rc=-15)
15:07:58 system | web.1 stopped (rc=-15)
15:07:58 redis_socketio.1 | [3085] 31 May 15:07:58.643 # User requested shutdown…
15:07:58 redis_socketio.1 | [3085] 31 May 15:07:58.643 # Redis is now ready to exit, bye bye…
15:07:58 system | redis_socketio.1 stopped (rc=-15)
15:07:58 redis_cache.1 | [3112] 31 May 15:07:58.681 # User requested shutdown…
15:07:58 redis_cache.1 | [3112] 31 May 15:07:58.681 # Redis is now ready to exit, bye bye…
15:07:58 system | redis_cache.1 stopped (rc=-15)


when I tried railsfactory@railsfactory:~/bench-repo/bench$ curl -I http://localhost:8000
curl: (7) Failed to connect to localhost port 8000: Connection refused

How should I resolve this?

Seems your 8000 ports is already being used. Maybe by Frappe itself or by a different process. Find that process and kill it. Just simply restarting your PC will also kill all processes.

Hi Valmik

Thank you for your help.
I checked out the port and couldn’t find anything running. (sudo netstat -peant | grep ":8000 ")
Ive restarted my machine several times , but same output…
Any other pointers on resolving this???

@Ilakya_Buvanashekara Please check whether you have Redis process already running on your system. Since as per the error it says 6379 is already in use.

Hi Shreyas

Thank you.
Yes Redis was running. Ive stopped it. when I start the bench it fails, but redis seem to have got started again.
10:40:49 system | redis_socketio.1 started (pid=2820)
10:40:49 system | redis_queue.1 started (pid=2824)
10:40:49 system | web.1 started (pid=2831)
10:40:49 system | schedule.1 started (pid=2835)
10:40:49 system | socketio.1 started (pid=2836)
10:40:49 system | redis_cache.1 started (pid=2839)
10:40:49 system | watch.1 started (pid=2833)
10:40:49 redis_socketio.1 | [2826] 02 Jun 10:40:49.336 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
10:40:49 redis_socketio.1 | .
10:40:49 redis_socketio.1 | .-__ ''-._ 10:40:49 redis_socketio.1 | _.- . . ‘’-._ Redis 2.8.4 (00000000/0) 64 bit
10:40:49 redis_socketio.1 | .- .-```. ```\/ _.,_ ''-._ 10:40:49 redis_socketio.1 | ( ' , .-` | `, ) Running in stand alone mode 10:40:49 redis_socketio.1 | |`-._`-...-` __...-.-.|'_.-'| Port: 12311 10:40:49 redis_socketio.1 | | -. ._ / _.-' | PID: 2826 10:40:49 redis_socketio.1 | -._ -._ -./ .-’ .-’
10:40:49 redis_socketio.1 | |-._-.
-.__.-' _.-'_.-'| 10:40:49 redis_socketio.1 | | -.
-._ _.-'_.-' | http://redis.io 10:40:49 redis_socketio.1 | -._ -._-..-'.-’ .-’
10:40:49 redis_socketio.1 | |-._-.
-.__.-' _.-'_.-'| 10:40:49 redis_socketio.1 | | -.
-._ _.-'_.-' | 10:40:49 redis_socketio.1 | -._ -._-.
.-‘.-’ .-’
10:40:49 redis_socketio.1 | -._ -..-’ _.-’
10:40:49 redis_socketio.1 | -._ _.-' 10:40:49 redis_socketio.1 | -.
.-’
10:40:49 redis_socketio.1 |
10:40:49 redis_socketio.1 | [2826] 02 Jun 10:40:49.336 # Server started, Redis version 2.8.4
10:40:49 redis_socketio.1 | [2826] 02 Jun 10:40:49.337 # 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.
10:40:49 redis_queue.1 | [2832] 02 Jun 10:40:49.339 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
10:40:49 redis_queue.1 | .
10:40:49 redis_queue.1 | .-__ ''-._ 10:40:49 redis_queue.1 | _.- . . ‘’-.
Redis 2.8.4 (00000000/0) 64 bit
10:40:49 redis_queue.1 | .- .-```. ```\/ _.,_ ''-._ 10:40:49 redis_queue.1 | ( ' , .-` | `, ) Running in stand alone mode 10:40:49 redis_queue.1 | |`-._`-...-` __...-.-.
|’_.-'| Port: 6379 10:40:49 redis_queue.1 | | -._ ._ / _.-' | PID: 2832 10:40:49 redis_queue.1 | -._ -._ -./ .-’ .-’
10:40:49 redis_queue.1 | |-._-.
-.__.-' _.-'_.-'| 10:40:49 redis_queue.1 | | -.
-._ _.-'_.-' | http://redis.io 10:40:49 redis_queue.1 | -._ -._-..-'.-’ .-’
10:40:49 redis_queue.1 | |-._-.
-.__.-' _.-'_.-'| 10:40:49 redis_queue.1 | | -.
-._ _.-'_.-' | 10:40:49 redis_queue.1 | -._ -._-.
.-‘.-’ .-’
10:40:49 redis_queue.1 | -._ -..-’ _.-’
10:40:49 redis_queue.1 | -._ _.-' 10:40:49 redis_queue.1 | -.
.-’
10:40:49 redis_queue.1 |
10:40:49 redis_queue.1 | [2832] 02 Jun 10:40:49.339 # Server started, Redis version 2.8.4
10:40:49 redis_queue.1 | [2832] 02 Jun 10:40:49.339 # 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.
10:40:49 redis_cache.1 | [2847] 02 Jun 10:40:49.338 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
10:40:49 redis_cache.1 | .
10:40:49 redis_cache.1 | .-__ ''-._ 10:40:49 redis_cache.1 | _.- . . ‘’-.
Redis 2.8.4 (00000000/0) 64 bit
10:40:49 redis_cache.1 | .- .-```. ```\/ _.,_ ''-._ 10:40:49 redis_cache.1 | ( ' , .-` | `, ) Running in stand alone mode 10:40:49 redis_cache.1 | |`-._`-...-` __...-.-.
|’_.-'| Port: 11311 10:40:49 redis_cache.1 | | -._ ._ / _.-' | PID: 2847 10:40:49 redis_cache.1 | -._ -._ -./ .-’ .-’
10:40:49 redis_cache.1 | |-._-.
-.__.-' _.-'_.-'| 10:40:49 redis_cache.1 | | -.
-._ _.-'_.-' | http://redis.io 10:40:49 redis_cache.1 | -._ -._-..-'.-’ .-’
10:40:49 redis_cache.1 | |-._-.
-.__.-' _.-'_.-'| 10:40:49 redis_cache.1 | | -.
-._ _.-'_.-' | 10:40:49 redis_cache.1 | -._ -._-.
.-‘_.-’ _.-’
10:40:49 redis_cache.1 | -._ -..-’ _.-’
10:40:49 redis_cache.1 | -._ _.-' 10:40:49 redis_cache.1 | -.
.-’
10:40:49 redis_cache.1 |
10:40:49 redis_cache.1 | [2847] 02 Jun 10:40:49.338 # Server started, Redis version 2.8.4
10:40:49 redis_cache.1 | [2847] 02 Jun 10:40:49.338 # 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.
10:40:49 system | worker_short.1 started (pid=2840)
10:40:49 system | worker_default.1 started (pid=2837)
10:40:49 redis_socketio.1 | [2826] 02 Jun 10:40:49.375 * The server is now ready to accept connections on port 12311
10:40:49 redis_queue.1 | [2832] 02 Jun 10:40:49.375 * The server is now ready to accept connections on port 6379
10:40:49 redis_cache.1 | [2847] 02 Jun 10:40:49.375 * The server is now ready to accept connections on port 11311
10:40:49 system | worker_long.1 started (pid=2838)
10:40:49 schedule.1 | Usage: bench [OPTIONS] COMMAND [ARGS]…
10:40:49 schedule.1 |
10:40:49 schedule.1 | Error: No such command “schedule”.
10:40:49 system | schedule.1 stopped (rc=2)
10:40:49 system | sending SIGTERM to redis_socketio.1 (pid 2820)
10:40:49 system | sending SIGTERM to worker_long.1 (pid 2838)
10:40:49 system | sending SIGTERM to watch.1 (pid 2833)
10:40:49 system | sending SIGTERM to redis_queue.1 (pid 2824)
10:40:49 system | sending SIGTERM to web.1 (pid 2831)
10:40:49 system | sending SIGTERM to worker_default.1 (pid 2837)
10:40:49 system | sending SIGTERM to socketio.1 (pid 2836)
10:40:49 system | sending SIGTERM to redis_cache.1 (pid 2839)
10:40:49 system | sending SIGTERM to worker_short.1 (pid 2840)
10:40:49 redis_socketio.1 | [2826 | signal handler] (1464844249) Received SIGTERM, scheduling shutdown…
10:40:49 redis_socketio.1 | [2826] 02 Jun 10:40:49.785 # User requested shutdown…
10:40:49 redis_socketio.1 | [2826] 02 Jun 10:40:49.785 # Redis is now ready to exit, bye bye…
10:40:49 system | worker_short.1 stopped (rc=-15)
10:40:49 redis_queue.1 | [2832 | signal handler] (1464844249) Received SIGTERM, scheduling shutdown…
10:40:49 redis_queue.1 | [2832] 02 Jun 10:40:49.785 # User requested shutdown…
10:40:49 redis_queue.1 | [2832] 02 Jun 10:40:49.785 # Redis is now ready to exit, bye bye…
10:40:49 system | worker_long.1 stopped (rc=-15)
10:40:49 system | web.1 stopped (rc=-15)
10:40:49 system | worker_default.1 stopped (rc=-15)
10:40:49 system | redis_queue.1 stopped (rc=-15)
10:40:49 system | watch.1 stopped (rc=-15)
10:40:49 system | redis_socketio.1 stopped (rc=-15)
10:40:49 redis_cache.1 | [2847 | signal handler] (1464844249) Received SIGTERM, scheduling shutdown…
10:40:49 redis_cache.1 | [2847] 02 Jun 10:40:49.787 # User requested shutdown…
10:40:49 redis_cache.1 | [2847] 02 Jun 10:40:49.787 # Redis is now ready to exit, bye bye…
10:40:49 system | redis_cache.1 stopped (rc=-15)
10:40:49 system | socketio.1 stopped (rc=-15)

???

Can you run

bench setup procfile that should fix it.

Oops no luck… still the same status.