Bench Start Error?

hi
ikhlas@Ikhlas:~/sajid/frappe-bench$ bench start
14:20:13 web.1 | started with pid 2954
14:20:13 redis_async_broker.1 | started with pid 2955
14:20:13 socketio.1 | started with pid 2957
14:20:13 workerbeat.1 | started with pid 2959
14:20:13 worker.1 | started with pid 2961
14:20:13 redis_cache.1 | started with pid 2963
14:20:13 redis_async_broker.1 | [2958] 09 Jan 14:20:13 * Server started, Redis version 2.2.12
14:20:13 redis_cache.1 | process terminated
14:20:13 system | sending SIGTERM to all processes
14:20:13 system | sending SIGTERM to pid 2954
14:20:13 system | sending SIGTERM to pid 2955
14:20:13 system | sending SIGTERM to pid 2957
14:20:13 system | sending SIGTERM to pid 2959
14:20:13 system | sending SIGTERM to pid 2961
14:20:13 redis_async_broker.1 | [2958] 09 Jan 14:20:13 # 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.
14:20:13 web.1 | process terminated
14:20:13 redis_async_broker.1 | process terminated
14:20:13 socketio.1 | process terminated
14:20:13 workerbeat.1 | process terminated
14:20:13 worker.1 | process terminated
14:20:13 redis_async_broker.1 | [2958] 09 Jan 14:20:13 * The server is now ready to accept connections on port 12311
14:20:13 redis_async_broker.1 | [2958] 09 Jan 14:20:13 - 0 clients connected (0 slaves), 539532 bytes in use

14:20:13 redis_cache.1 | *** FATAL CONFIG FILE ERROR ***
14:20:13 redis_cache.1 | Reading the configuration file, at line 6
14:20:13 redis_cache.1 | >>> ‘save “”’
14:20:13 redis_cache.1 | Bad directive or wrong number of arguments
ikhlas@Ikhlas:~/sajid/frappe-bench$

@Mohamed_Sajid which OS are you trying to install ERPNext?

Hi,
Ubuntu 12.04 LTS …

@Mohamed_Sajid,It’s very strange!

Are you using a updated bench? I use Ubuntu 12.04 on my vagrant env, with no pain!

Yes I m Using Updated Bench Only…But Now i run bench with bench serve --port 3000

ikhlas@Ikhlas:~/sajid/frappe-bench$ bench start
15:07:53 web.1 | started with pid 7643
15:07:53 redis_async_broker.1 | started with pid 7644
15:07:53 socketio.1 | started with pid 7646
15:07:53 workerbeat.1 | started with pid 7648
15:07:53 worker.1 | started with pid 7650
15:07:53 redis_cache.1 | started with pid 7653
15:07:53 redis_async_broker.1 | [7647] 13 Jan 15:07:53 * Server started, Redis version 2.2.12
15:07:53 redis_cache.1 | process terminated
15:07:53 system | sending SIGTERM to all processes
15:07:53 system | sending SIGTERM to pid 7643
15:07:53 system | sending SIGTERM to pid 7644
15:07:53 system | sending SIGTERM to pid 7646
15:07:53 system | sending SIGTERM to pid 7648
15:07:53 system | sending SIGTERM to pid 7650
15:07:53 redis_async_broker.1 | [7647] 13 Jan 15:07:53 # 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:53 web.1 | process terminated
15:07:53 redis_async_broker.1 | process terminated
15:07:53 socketio.1 | process terminated
15:07:53 workerbeat.1 | process terminated
15:07:53 worker.1 | process terminated
15:07:53 redis_async_broker.1 | [7647] 13 Jan 15:07:53 * The server is now ready to accept connections on port 12311
15:07:53 redis_async_broker.1 | [7647] 13 Jan 15:07:53 - 0 clients connected (0 slaves), 539532 bytes in use

15:07:53 redis_cache.1 | *** FATAL CONFIG FILE ERROR ***
15:07:53 redis_cache.1 | Reading the configuration file, at line 6
15:07:53 redis_cache.1 | >>> ‘save “”’
15:07:53 redis_cache.1 | Bad directive or wrong number of arguments
ikhlas@Ikhlas:~/sajid/frappe-bench$

@Mohamed_Sajid, I dont know if it is fixed, but can you try run:

bench setup procfile
bench start

@Mohamed_Sajid, I got a issue here!
You cant run bench on port 3000, because bench start a process that run in port 3000!

ikhlas@Ikhlas:~/sajid/frappe-bench$ bench setup procfile
ikhlas@Ikhlas:~/sajid/frappe-bench$ bench start
13:38:00 web.1 | started with pid 3427
13:38:00 redis_async_broker.1 | started with pid 3428
13:38:00 socketio.1 | started with pid 3430
13:38:00 workerbeat.1 | started with pid 3432
13:38:00 worker.1 | started with pid 3434
13:38:00 redis_cache.1 | started with pid 3436
13:38:00 redis_async_broker.1 | [3431] 14 Jan 13:38:00 * Server started, Redis version 2.2.12
13:38:00 redis_cache.1 | process terminated
13:38:00 system | sending SIGTERM to all processes
13:38:00 system | sending SIGTERM to pid 3427
13:38:00 system | sending SIGTERM to pid 3428
13:38:00 system | sending SIGTERM to pid 3430
13:38:00 system | sending SIGTERM to pid 3432
13:38:00 system | sending SIGTERM to pid 3434
13:38:00 redis_async_broker.1 | [3431] 14 Jan 13:38:00 # 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.
13:38:00 web.1 | process terminated
13:38:00 redis_async_broker.1 | process terminated
13:38:00 socketio.1 | process terminated
13:38:00 workerbeat.1 | process terminated
13:38:00 worker.1 | process terminated
13:38:00 redis_async_broker.1 | [3431] 14 Jan 13:38:00 * The server is now ready to accept connections on port 12311
13:38:00 redis_async_broker.1 | [3431] 14 Jan 13:38:00 - 0 clients connected (0 slaves), 539532 bytes in use

13:38:00 redis_cache.1 | *** FATAL CONFIG FILE ERROR ***
13:38:00 redis_cache.1 | Reading the configuration file, at line 6
13:38:00 redis_cache.1 | >>> ‘save “”’
13:38:00 redis_cache.1 | Bad directive or wrong number of arguments
ikhlas@Ikhlas:~/sajid/frappe-bench$

@Mohamed_Sajid, can you share your Procfile, and the files in the config folder via gist?

Procfile

web: bench serve
redis_async_broker: redis-server config/redis_async_broker.conf
socketio: /usr/bin/node apps/frappe/socketio.js
workerbeat: sh -c ‘cd sites && exec …/env/bin/python -m frappe.celery_app beat -s scheduler.schedule’
worker: sh -c ‘cd sites && exec …/env/bin/python -m frappe.celery_app worker’
redis_cache: redis-server config/redis_cache.conf

My Procfile is in frappe-bench folder Not in a Config folder…

@Mohamed_Sajid, can you share too the file frappe-bench/config/redis_cache.conf ?

frappe-bench/config/redis_cache.conf

dbfilename redis_cache_dump.rdb
pidfile redis_cache.pid
port 11311
maxmemory 50mb
maxmemory-policy allkeys-lru
save “”
appendonly no

@Mohamed_Sajid, what is the acutal version of redis that do you is using? redis-cli --version

Edit: Do you tried do this?

redis_async_broker.1 | [3431] 14 Jan 13:38:00 # 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.

My redis-cli --version is redis-cli 2.2.12

ikhlas@Ikhlas:~/sajid/frappe-bench$ bench start
14:57:03 web.1 | started with pid 7604
14:57:03 redis_async_broker.1 | started with pid 7605
14:57:03 socketio.1 | started with pid 7607
14:57:03 workerbeat.1 | started with pid 7609
14:57:03 worker.1 | started with pid 7611
14:57:03 redis_cache.1 | started with pid 7613
14:57:04 redis_async_broker.1 | [7608] 15 Jan 14:57:03 * Server started, Redis version 2.2.12
14:57:04 redis_async_broker.1 | [7608] 15 Jan 14:57:03 # 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.
14:57:04 redis_async_broker.1 | [7608] 15 Jan 14:57:03 * The server is now ready to accept connections on port 12311
14:57:04 redis_async_broker.1 | [7608] 15 Jan 14:57:03 - 0 clients connected (0 slaves), 539532 bytes in use

14:57:04 redis_cache.1 | process terminated
14:57:04 system | sending SIGTERM to all processes
14:57:04 system | sending SIGTERM to pid 7604
14:57:04 system | sending SIGTERM to pid 7605
14:57:04 system | sending SIGTERM to pid 7607
14:57:04 system | sending SIGTERM to pid 7609
14:57:04 system | sending SIGTERM to pid 7611
14:57:04 redis_cache.1 | *** FATAL CONFIG FILE ERROR ***
14:57:04 redis_async_broker.1 | process terminated
14:57:04 socketio.1 | process terminated
14:57:04 workerbeat.1 | process terminated
14:57:04 worker.1 | process terminated
14:57:04 redis_cache.1 | Reading the configuration file, at line 6
14:57:04 redis_cache.1 | >>> ‘save “”’
14:57:04 redis_cache.1 | Bad directive or wrong number of arguments
14:57:04 web.1 | process terminated
ikhlas@Ikhlas:~/sajid/frappe-bench$

To be sure that there is an error do bench setup redis-cache to generate a new config for redis cache.

If that does not work update redis to version 3.0.5 at least.

Luis.

@luisfmfernandes, I M updated to latest version 3.0.6 …But bench Start error…
ikhlas@Ikhlas:~/sajid/frappe-bench$ bench start
20:37:59 web.1 | started with pid 22539
20:37:59 redis_async_broker.1 | started with pid 22540
20:37:59 socketio.1 | started with pid 22542
20:37:59 workerbeat.1 | started with pid 22544
20:37:59 worker.1 | started with pid 22546
20:37:59 redis_cache.1 | started with pid 22549
20:37:59 redis_async_broker.1 | 22543:M 15 Jan 20:37:59.713 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
20:37:59 redis_async_broker.1 | process terminated
20:37:59 system | sending SIGTERM to all processes
20:37:59 system | sending SIGTERM to pid 22539
20:37:59 system | sending SIGTERM to pid 22542
20:37:59 system | sending SIGTERM to pid 22544
20:37:59 system | sending SIGTERM to pid 22546
20:37:59 socketio.1 | process terminated
20:37:59 workerbeat.1 | process terminated
20:37:59 worker.1 | process terminated
20:37:59 redis_cache.1 | process terminated
20:37:59 redis_async_broker.1 | 22543:M 15 Jan 20:37:59.713 # Redis can’t set maximum open files to 10032 because of OS error: Operation not permitted.
20:37:59 redis_async_broker.1 | 22543:M 15 Jan 20:37:59.713 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase ‘ulimit -n’.
20:37:59 redis_async_broker.1 | 22543:M 15 Jan 20:37:59.713 # Creating Server TCP listening socket *:12311: bind: Address already in use
20:37:59 redis_cache.1 | 22552:M 15 Jan 20:37:59.743 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
20:37:59 redis_cache.1 | 22552:M 15 Jan 20:37:59.743 # Redis can’t set maximum open files to 10032 because of OS error: Operation not permitted.
20:37:59 redis_cache.1 | 22552:M 15 Jan 20:37:59.743 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase ‘ulimit -n’.
20:37:59 redis_cache.1 | 22552:M 15 Jan 20:37:59.743 # Creating Server TCP listening socket *:11311: bind: Address already in use
ikhlas@Ikhlas:~/sajid/frappe-bench$

Now you must kill the process who is bind to 11311 port.

To find out the pid do this: lsof -i tcp:11311

Then with pid do sudo kill -9 <PID>

Luis.

1 Like

ikhlas@Ikhlas:~/sajid/frappe-bench$ bench start
21:04:26 web.1 | started with pid 22994
21:04:26 redis_async_broker.1 | started with pid 22995
21:04:26 socketio.1 | started with pid 22997
21:04:26 workerbeat.1 | started with pid 23000
21:04:26 worker.1 | started with pid 23002
21:04:26 redis_cache.1 | started with pid 23003
21:04:26 redis_async_broker.1 | 22998:M 15 Jan 21:04:26.580 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
21:04:26 redis_async_broker.1 | process terminated
21:04:26 system | sending SIGTERM to all processes
21:04:26 system | sending SIGTERM to pid 22994
21:04:26 system | sending SIGTERM to pid 22997
21:04:26 system | sending SIGTERM to pid 23000
21:04:26 system | sending SIGTERM to pid 23002
21:04:26 system | sending SIGTERM to pid 23003
21:04:26 socketio.1 | process terminated
21:04:26 workerbeat.1 | process terminated
21:04:26 worker.1 | process terminated
21:04:26 redis_cache.1 | process terminated
21:04:26 redis_async_broker.1 | 22998:M 15 Jan 21:04:26.580 # Redis can’t set maximum open files to 10032 because of OS error: Operation not permitted.
21:04:26 redis_async_broker.1 | 22998:M 15 Jan 21:04:26.580 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase ‘ulimit -n’.
21:04:26 redis_async_broker.1 | 22998:M 15 Jan 21:04:26.580 # Creating Server TCP listening socket *:12311: bind: Address already in use
21:04:26 redis_cache.1 | 23007:M 15 Jan 21:04:26.585 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
21:04:26 redis_cache.1 | 23007:M 15 Jan 21:04:26.585 # Redis can’t set maximum open files to 10032 because of OS error: Operation not permitted.
21:04:26 redis_cache.1 | 23007:M 15 Jan 21:04:26.585 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase ‘ulimit -n’.
21:04:26 redis_cache.1 | .
21:04:26 redis_cache.1 | .-__ ''-._ 21:04:26 redis_cache.1 | _.- . . ‘’-._ Redis 3.0.6 (00000000/0) 32 bit
21:04:26 redis_cache.1 | .- .-```. ```\/ _.,_ ''-._ 21:04:26 redis_cache.1 | ( ' , .-` | `, ) Running in standalone mode 21:04:26 redis_cache.1 | |`-._`-...-` __...-.-.|'_.-'| Port: 11311 21:04:26 redis_cache.1 | | -. ._ / _.-' | PID: 23007 21:04:26 redis_cache.1 | -._ -._ -./ .-’ .-’
21:04:26 redis_cache.1 | |-._-.
-.__.-' _.-'_.-'| 21:04:26 redis_cache.1 | | -.
-._ _.-'_.-' | http://redis.io 21:04:26 redis_cache.1 | -._ -._-..-'.-’ .-’
21:04:26 redis_cache.1 | |-._-.
-.__.-' _.-'_.-'| 21:04:26 redis_cache.1 | | -.
-._ _.-'_.-' | 21:04:26 redis_cache.1 | -._ -._-.
.-‘_.-’ _.-’
21:04:26 redis_cache.1 | -._ -..-’ _.-’
21:04:26 redis_cache.1 | -._ _.-' 21:04:26 redis_cache.1 | -.
.-’

21:04:26 redis_cache.1 | 23007:M 15 Jan 21:04:26.586 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
21:04:26 redis_cache.1 | 23007:M 15 Jan 21:04:26.586 # Server started, Redis version 3.0.6
21:04:26 redis_cache.1 | 23007:M 15 Jan 21:04:26.586 # 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.
21:04:26 redis_cache.1 | 23007:M 15 Jan 21:04:26.586 # 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.
21:04:26 redis_cache.1 | 23007:M 15 Jan 21:04:26.586 * The server is now ready to accept connections on port 11311