Try ERPNext Buy Support Partners Foundation

Coudn't start bench

hello every body
I am newbi in erp next I am trying to start bench but it didn’t
can’t understand what’s wrong with this trace out

bench start
18:38:14 system           | redis_cache.1 started (pid=13262)
18:38:14 system           | socketio.1 started (pid=13269)
18:38:14 system           | redis_queue.1 started (pid=13270)
18:38:14 system           | web.1 started (pid=13271)
18:38:14 system           | redis_socketio.1 started (pid=13273)
18:38:14 system           | schedule.1 started (pid=13278)
18:38:14 system           | watch.1 started (pid=13274)
18:38:14 system           | worker_short.1 started (pid=13281)
18:38:14 system           | worker_long.1 started (pid=13293)
18:38:14 system           | worker_default.1 started (pid=13296)
18:38:14 redis_queue.1    | 13277:C 22 Feb 18:38:14.420 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18:38:14 redis_queue.1    | 13277:C 22 Feb 18:38:14.420 # Redis version=4.0.9, bits=64, commit=00000000, modified=0, pid=13277, just started
18:38:14 redis_queue.1    | 13277:C 22 Feb 18:38:14.420 # Configuration loaded
18:38:14 redis_queue.1    | 13277:M 22 Feb 18:38:14.421 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
18:38:14 redis_queue.1    | 13277:M 22 Feb 18:38:14.421 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
18:38:14 redis_queue.1    | 13277:M 22 Feb 18:38:14.421 # 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'.
18:38:14 redis_queue.1    | 13277:M 22 Feb 18:38:14.502 * Running mode=standalone, port=11000.
18:38:14 redis_queue.1    | 13277:M 22 Feb 18:38:14.502 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
18:38:14 redis_queue.1    | 13277:M 22 Feb 18:38:14.502 # Server initialized
18:38:14 redis_queue.1    | 13277:M 22 Feb 18:38:14.502 # 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.
18:38:14 redis_queue.1    | 13277:M 22 Feb 18:38:14.502 # 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.
18:38:14 redis_queue.1    | 13277:M 22 Feb 18:38:14.502 * Ready to accept connections
18:38:14 redis_cache.1    | 13272:C 22 Feb 18:38:14.513 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18:38:14 redis_cache.1    | 13272:C 22 Feb 18:38:14.513 # Redis version=4.0.9, bits=64, commit=00000000, modified=0, pid=13272, just started
18:38:14 redis_cache.1    | 13272:C 22 Feb 18:38:14.513 # Configuration loaded
18:38:14 redis_cache.1    | 13272:M 22 Feb 18:38:14.514 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
18:38:14 redis_cache.1    | 13272:M 22 Feb 18:38:14.514 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
18:38:14 redis_cache.1    | 13272:M 22 Feb 18:38:14.514 # 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'.
18:38:14 redis_cache.1    | 13272:M 22 Feb 18:38:14.515 * Running mode=standalone, port=13000.
18:38:14 redis_cache.1    | 13272:M 22 Feb 18:38:14.515 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
18:38:14 redis_cache.1    | 13272:M 22 Feb 18:38:14.515 # Server initialized
18:38:14 redis_cache.1    | 13272:M 22 Feb 18:38:14.515 # 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.
18:38:14 redis_cache.1    | 13272:M 22 Feb 18:38:14.515 # 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.
18:38:14 redis_cache.1    | 13272:M 22 Feb 18:38:14.515 * Ready to accept connections
18:38:14 redis_socketio.1 | 13285:C 22 Feb 18:38:14.511 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18:38:14 redis_socketio.1 | 13285:C 22 Feb 18:38:14.511 # Redis version=4.0.9, bits=64, commit=00000000, modified=0, pid=13285, just started
18:38:14 redis_socketio.1 | 13285:C 22 Feb 18:38:14.511 # Configuration loaded
18:38:14 redis_socketio.1 | 13285:M 22 Feb 18:38:14.512 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
18:38:14 redis_socketio.1 | 13285:M 22 Feb 18:38:14.512 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
18:38:14 redis_socketio.1 | 13285:M 22 Feb 18:38:14.512 # 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'.
18:38:14 redis_socketio.1 | 13285:M 22 Feb 18:38:14.513 * Running mode=standalone, port=12000.
18:38:14 redis_socketio.1 | 13285:M 22 Feb 18:38:14.513 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
18:38:14 redis_socketio.1 | 13285:M 22 Feb 18:38:14.513 # Server initialized
18:38:14 redis_socketio.1 | 13285:M 22 Feb 18:38:14.513 # 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.
18:38:14 redis_socketio.1 | 13285:M 22 Feb 18:38:14.513 # 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.
18:38:14 redis_socketio.1 | 13285:M 22 Feb 18:38:14.513 * Ready to accept connections
18:38:42 socketio.1       | listening on *: 9000
18:39:13 web.1            | Traceback (most recent call last):
18:39:13 web.1            |   File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
18:39:13 web.1            |     "__main__", mod_spec)
18:39:13 web.1            |   File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
18:39:13 web.1            |     exec(code, run_globals)
18:39:13 web.1            |   File "/home/zynaboo/erpnext/venv/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
18:39:13 web.1            |     main()
18:39:13 web.1            |   File "/home/zynaboo/erpnext/venv/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
18:39:13 web.1            |     click.Group(commands=commands)(prog_name='bench')
18:39:13 web.1            |   File "/home/zynaboo/erpnext/venv/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 764, in __call__
18:39:13 web.1            |     return self.main(*args, **kwargs)
18:39:13 web.1            |   File "/home/zynaboo/erpnext/venv/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 717, in main
18:39:13 web.1            |     rv = self.invoke(ctx)
18:39:13 web.1            |   File "/home/zynaboo/erpnext/venv/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
18:39:13 web.1            |     return _process_result(sub_ctx.command.invoke(sub_ctx))
18:39:13 web.1            |   File "/home/zynaboo/erpnext/venv/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
18:39:13 web.1            |     return _process_result(sub_ctx.command.invoke(sub_ctx))
18:39:13 web.1            |   File "/home/zynaboo/erpnext/venv/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 956, in invoke
18:39:13 web.1            |     return ctx.invoke(self.callback, **ctx.params)
18:39:13 web.1            |   File "/home/zynaboo/erpnext/venv/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 555, in invoke
18:39:13 web.1            |     return callback(*args, **kwargs)
18:39:13 web.1            |   File "/home/zynaboo/erpnext/venv/frappe-bench/env/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
18:39:13 web.1            |     return f(get_current_context(), *args, **kwargs)
18:39:13 web.1            |   File "/home/zynaboo/erpnext/venv/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func
18:39:13 web.1            |     ret = f(frappe._dict(ctx.obj), *args, **kwargs)
18:39:13 web.1            |   File "/home/zynaboo/erpnext/venv/frappe-bench/apps/frappe/frappe/commands/utils.py", line 481, in serve
18:39:14 web.1            |     import frappe.app
18:39:14 web.1            |   File "/home/zynaboo/erpnext/venv/frappe-bench/apps/frappe/frappe/app.py", line 13, in <module>
18:39:14 web.1            |     from werkzeug.contrib.profiler import ProfilerMiddleware
18:39:14 web.1            | ModuleNotFoundError: No module named 'werkzeug.contrib'
18:39:14 system           | web.1 stopped (rc=1)
18:39:14 system           | sending SIGTERM to redis_cache.1 (pid 13262)
18:39:14 system           | sending SIGTERM to redis_socketio.1 (pid 13273)
18:39:14 system           | sending SIGTERM to redis_queue.1 (pid 13270)
18:39:14 system           | sending SIGTERM to socketio.1 (pid 13269)
18:39:14 system           | sending SIGTERM to watch.1 (pid 13274)
18:39:14 system           | sending SIGTERM to schedule.1 (pid 13278)
18:39:14 system           | sending SIGTERM to worker_short.1 (pid 13281)
18:39:14 system           | sending SIGTERM to worker_long.1 (pid 13293)
18:39:14 system           | sending SIGTERM to worker_default.1 (pid 13296)
18:39:14 redis_cache.1    | 13272:signal-handler (1582389554) Received SIGTERM scheduling shutdown...
18:39:14 worker_short.1   | 18:39:14 Warm shut down requested
18:39:14 worker_default.1 | 18:39:14 Warm shut down requested
18:39:14 redis_socketio.1 | 13285:signal-handler (1582389554) Received SIGTERM scheduling shutdown...
18:39:14 worker_long.1    | 18:39:14 Warm shut down requested
18:39:14 redis_queue.1    | 13277:signal-handler (1582389554) Received SIGTERM scheduling shutdown...
18:39:14 system           | socketio.1 stopped (rc=-15)
18:39:14 system           | schedule.1 stopped (rc=-15)
18:39:14 redis_queue.1    | 13277:M 22 Feb 18:39:14.270 # User requested shutdown...
18:39:14 redis_queue.1    | 13277:M 22 Feb 18:39:14.270 * Removing the pid file.
18:39:14 redis_queue.1    | 13277:M 22 Feb 18:39:14.293 # Redis is now ready to exit, bye bye...
18:39:14 system           | redis_queue.1 stopped (rc=-15)
18:39:14 redis_cache.1    | 13272:M 22 Feb 18:39:14.296 # User requested shutdown...
18:39:14 redis_cache.1    | 13272:M 22 Feb 18:39:14.296 * Removing the pid file.
18:39:14 redis_cache.1    | 13272:M 22 Feb 18:39:14.296 # Redis is now ready to exit, bye bye...
18:39:14 system           | redis_cache.1 stopped (rc=-15)
18:39:14 redis_socketio.1 | 13285:M 22 Feb 18:39:14.295 # User requested shutdown...
18:39:14 redis_socketio.1 | 13285:M 22 Feb 18:39:14.295 * Removing the pid file.
18:39:14 redis_socketio.1 | 13285:M 22 Feb 18:39:14.295 # Redis is now ready to exit, bye bye...
18:39:14 system           | redis_socketio.1 stopped (rc=-15)
18:39:14 system           | watch.1 stopped (rc=-15)
18:39:14 system           | worker_long.1 stopped (rc=-15)
     18:39:14 system           | worker_short.1 stopped (rc=-15)
     system           | worker_default.1 stopped (rc=-15)

Welcome to ERPNext,

This ‘rq.worker.StopRequested’ in your traceback turns up this pointer with clues to troubleshoot Force database creation in install script?

Typically the problem is some process from a previous failed start and ungraceful shutdown remains running, and that must be manually shut down.

Please a request - to copy and paste the complete traceback as that makes searching and finding the problem easier.

1 Like

Thanks for reply, I’ve edited post with full traceback

Thanks! To fix that do this:

cd ${HOME}/frappe-bench
./env/bin/pip install werkzeug==0.16.0

Reference ModuleNotFoundError: No module named 'werkzeug.contrib' (erpnext 12.4.3)

1 Like

it worked Thank you

This issue is fixed in Frappe v12.3.0

2 Likes