Bench start not working

I even restarted the computer and tried , but bench start does not work
ommiforge@ommiforge:~$ bench start
12:07:38 system | redis_socketio.1 started (pid=3686)
12:07:38 system | worker_long.1 started (pid=3690)
12:07:38 redis_socketio.1 | [3694] 05 May 12:07:38.573 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
12:07:38 redis_socketio.1 | .
12:07:38 redis_socketio.1 | .-__ ''-._ 12:07:38 redis_socketio.1 | _.- . . ‘’-._ Redis 2.8.4 (00000000/0) 64 bit
12:07:38 redis_socketio.1 | .- .-```. ```\/ _.,_ ''-._ 12:07:38 redis_socketio.1 | ( ' , .-` | `, ) Running in stand alone mode 12:07:38 redis_socketio.1 | |`-._`-...-` __...-.-.|'_.-'| Port: 12000 12:07:38 redis_socketio.1 | | -. ._ / _.-' | PID: 3694 12:07:38 redis_socketio.1 | -._ -._ -./ .-’ .-’
12:07:38 redis_socketio.1 | |-._-.
-.__.-' _.-'_.-'| 12:07:38 redis_socketio.1 | | -.
-._ _.-'_.-' | http://redis.io 12:07:38 redis_socketio.1 | -._ -._-..-'.-’ .-’
12:07:38 redis_socketio.1 | |-._-.
-.__.-' _.-'_.-'| 12:07:38 redis_socketio.1 | | -.
-._ _.-'_.-' | 12:07:38 redis_socketio.1 | -._ -._-.
.-‘.-’ .-’
12:07:38 redis_socketio.1 | -._ -..-’ _.-’
12:07:38 redis_socketio.1 | -._ _.-' 12:07:38 redis_socketio.1 | -.
.-’
12:07:38 redis_socketio.1 |
12:07:38 redis_socketio.1 | [3694] 05 May 12:07:38.574 # Server started, Redis version 2.8.4
12:07:38 redis_socketio.1 | [3694] 05 May 12:07:38.574 # 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:07:38 redis_socketio.1 | [3694] 05 May 12:07:38.574 * The server is now ready to accept connections on port 12000
12:07:38 system | schedule.1 started (pid=3701)
12:07:38 system | redis_queue.1 started (pid=3702)
12:07:38 system | web.1 started (pid=3703)
12:07:38 system | socketio.1 started (pid=3704)
12:07:38 system | worker_short.1 started (pid=3713)
12:07:38 redis_queue.1 | [3708] 05 May 12:07:38.598 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
12:07:38 redis_queue.1 | .
12:07:38 redis_queue.1 | .-__ ''-._ 12:07:38 redis_queue.1 | _.- . . ‘’-.
Redis 2.8.4 (00000000/0) 64 bit
12:07:38 redis_queue.1 | .- .-```. ```\/ _.,_ ''-._ 12:07:38 redis_queue.1 | ( ' , .-` | `, ) Running in stand alone mode 12:07:38 redis_queue.1 | |`-._`-...-` __...-.-.
|’_.-'| Port: 11000 12:07:38 redis_queue.1 | | -._ ._ / _.-' | PID: 3708 12:07:38 redis_queue.1 | -._ -._ -./ .-’ .-’
12:07:38 redis_queue.1 | |-._-.
-.__.-' _.-'_.-'| 12:07:38 redis_queue.1 | | -.
-._ _.-'_.-' | http://redis.io 12:07:38 redis_queue.1 | -._ -._-..-'.-’ .-’
12:07:38 redis_queue.1 | |-._-.
-.__.-' _.-'_.-'| 12:07:38 redis_queue.1 | | -.
-._ _.-'_.-' | 12:07:38 redis_queue.1 | -._ -._-.
.-‘.-’ .-’
12:07:38 redis_queue.1 | -._ -..-’ _.-’
12:07:38 redis_queue.1 | -._ _.-' 12:07:38 redis_queue.1 | -.
.-’
12:07:38 redis_queue.1 |
12:07:38 redis_queue.1 | [3708] 05 May 12:07:38.598 # Server started, Redis version 2.8.4
12:07:38 redis_queue.1 | [3708] 05 May 12:07:38.598 # 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:07:38 redis_queue.1 | [3708] 05 May 12:07:38.598 * The server is now ready to accept connections on port 11000
12:07:38 system | watch.1 started (pid=3693)
12:07:38 system | redis_cache.1 started (pid=3719)
12:07:38 redis_cache.1 | [3720] 05 May 12:07:38.612 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
12:07:38 redis_cache.1 | .
12:07:38 redis_cache.1 | .-__ ''-._ 12:07:38 redis_cache.1 | _.- . . ‘’-.
Redis 2.8.4 (00000000/0) 64 bit
12:07:38 redis_cache.1 | .- .-```. ```\/ _.,_ ''-._ 12:07:38 redis_cache.1 | ( ' , .-` | `, ) Running in stand alone mode 12:07:38 redis_cache.1 | |`-._`-...-` __...-.-.
|’_.-'| Port: 13000 12:07:38 redis_cache.1 | | -._ ._ / _.-' | PID: 3720 12:07:38 redis_cache.1 | -._ -._ -./ .-’ .-’
12:07:38 redis_cache.1 | |-._-.
-.__.-' _.-'_.-'| 12:07:38 redis_cache.1 | | -.
-._ _.-'_.-' | http://redis.io 12:07:38 redis_cache.1 | -._ -._-..-'.-’ .-’
12:07:38 redis_cache.1 | |-._-.
-.__.-' _.-'_.-'| 12:07:38 redis_cache.1 | | -.
-._ _.-'_.-' | 12:07:38 redis_cache.1 | -._ -._-.
.-‘_.-’ _.-’
12:07:38 redis_cache.1 | -._ -..-’ _.-’
12:07:38 redis_cache.1 | -._ _.-' 12:07:38 redis_cache.1 | -.
.-’
12:07:38 redis_cache.1 |
12:07:38 redis_cache.1 | [3720] 05 May 12:07:38.612 # Server started, Redis version 2.8.4
12:07:38 redis_cache.1 | [3720] 05 May 12:07:38.612 # 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:07:38 redis_cache.1 | [3720] 05 May 12:07:38.612 * The server is now ready to accept connections on port 13000
12:07:38 system | worker_default.1 started (pid=3726)
12:07:41 socketio.1 | listening on *: 9000
12:07:41 watch.1 | Traceback (most recent call last):
12:07:41 watch.1 | File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
12:07:41 watch.1 | “main”, fname, loader, pkg_name)
12:07:41 watch.1 | File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
12:07:41 watch.1 | exec code in run_globals
12:07:41 watch.1 | File “/home/ommiforge/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
12:07:41 watch.1 | main()
12:07:41 watch.1 | File “/home/ommiforge/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
12:07:41 watch.1 | click.Group(commands=commands)(prog_name=‘bench’)
12:07:41 watch.1 | File “/home/ommiforge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
12:07:41 watch.1 | return self.main(*args, **kwargs)
12:07:41 watch.1 | File “/home/ommiforge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
12:07:41 watch.1 | rv = self.invoke(ctx)
12:07:41 watch.1 | File “/home/ommiforge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
12:07:41 watch.1 | return _process_result(sub_ctx.command.invoke(sub_ctx))
12:07:41 watch.1 | File “/home/ommiforge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
12:07:41 worker_short.1 | Traceback (most recent call last):
12:07:41 watch.1 | return _process_result(sub_ctx.command.invoke(sub_ctx))
12:07:41 watch.1 | File “/home/ommiforge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
12:07:41 watch.1 | return ctx.invoke(self.callback, **ctx.params)
12:07:41 watch.1 | File “/home/ommiforge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
12:07:41 watch.1 | return callback(*args, **kwargs)
12:07:41 watch.1 | File “/home/ommiforge/frappe-bench/apps/frappe/frappe/commands.py”, line 268, in watch
12:07:41 watch.1 | frappe.init(‘’)
12:07:41 watch.1 | File “/home/ommiforge/frappe-bench/apps/frappe/frappe/init.py”, line 140, in init
12:07:41 watch.1 | setup_module_map()
12:07:41 watch.1 | File “/home/ommiforge/frappe-bench/apps/frappe/frappe/init.py”, line 787, in setup_module_map
12:07:41 watch.1 | for module in get_module_list(app):
12:07:41 watch.1 | File “/home/ommiforge/frappe-bench/apps/frappe/frappe/init.py”, line 664, in get_module_list
12:07:41 watch.1 | return get_file_items(os.path.join(os.path.dirname(get_module(app_name).file), “modules.txt”))
12:07:41 watch.1 | File “/home/ommiforge/frappe-bench/apps/frappe/frappe/init.py”, line 622, in get_module
12:07:41 watch.1 | return importlib.import_module(modulename)
12:07:41 watch.1 | File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
12:07:41 watch.1 | import(name)
12:07:41 watch.1 | ImportError: No module named product_master
12:07:41 worker_short.1 | File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
12:07:41 worker_short.1 | “main”, fname, loader, pkg_name)
12:07:41 worker_short.1 | File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
12:07:41 worker_short.1 | exec code in run_globals
12:07:41 worker_short.1 | File “/home/ommiforge/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
12:07:41 worker_short.1 | main()
12:07:41 worker_short.1 | File “/home/ommiforge/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
12:07:41 worker_short.1 | click.Group(commands=commands)(prog_name=‘bench’)
12:07:41 worker_short.1 | File “/home/ommiforge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
12:07:41 worker_short.1 | return self.main(*args, **kwargs)
12:07:41 worker_short.1 | File “/home/ommiforge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
12:07:41 worker_short.1 | rv = self.invoke(ctx)
12:07:41 worker_short.1 | File “/home/ommiforge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
12:07:41 worker_short.1 | return _process_result(sub_ctx.command.invoke(sub_ctx))
12:07:41 worker_short.1 | File “/home/ommiforge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
12:07:41 worker_short.1 | return _process_result(sub_ctx.command.invoke(sub_ctx))
12:07:41 worker_short.1 | File “/home/ommiforge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
12:07:41 worker_short.1 | return ctx.invoke(self.callback, **ctx.params)
12:07:41 worker_short.1 | File “/home/ommiforge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
12:07:41 worker_short.1 | return callback(*args, **kwargs)
12:07:41 worker_short.1 | File “/home/ommiforge/frappe-bench/apps/frappe/frappe/commands.py”, line 1037, in start_worker
12:07:41 worker_short.1 | start_worker(queue)
12:07:41 worker_short.1 | File “/home/ommiforge/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 68, in start_worker
12:07:41 worker_short.1 | with frappe.init_site():
12:07:41 worker_short.1 | File “/home/ommiforge/frappe-bench/apps/frappe/frappe/init.py”, line 194, in enter
12:07:41 worker_short.1 | init(self.site)
12:07:41 worker_short.1 | File “/home/ommiforge/frappe-bench/apps/frappe/frappe/init.py”, line 140, in init
12:07:41 worker_short.1 | setup_module_map()
12:07:41 worker_short.1 | File “/home/ommiforge/frappe-bench/apps/frappe/frappe/init.py”, line 787, in setup_module_map
12:07:41 worker_short.1 | for module in get_module_list(app):
12:07:41 worker_short.1 | File “/home/ommiforge/frappe-bench/apps/frappe/frappe/init.py”, line 664, in get_module_list
12:07:41 worker_short.1 | return get_file_items(os.path.join(os.path.dirname(get_module(app_name).file), “modules.txt”))
12:07:41 worker_short.1 | File “/home/ommiforge/frappe-bench/apps/frappe/frappe/init.py”, line 622, in get_module
12:07:41 worker_short.1 | return importlib.import_module(modulename)
12:07:41 worker_short.1 | File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
12:07:41 worker_short.1 | import(name)
12:07:41 worker_short.1 | ImportError: No module named product_master
12:07:41 system | watch.1 stopped (rc=1)
12:07:41 system | sending SIGTERM to redis_socketio.1 (pid 3686)
12:07:41 system | sending SIGTERM to worker_long.1 (pid 3690)
12:07:41 system | sending SIGTERM to redis_queue.1 (pid 3702)
12:07:41 system | sending SIGTERM to web.1 (pid 3703)
12:07:41 system | sending SIGTERM to schedule.1 (pid 3701)
12:07:41 system | sending SIGTERM to worker_default.1 (pid 3726)
12:07:41 system | sending SIGTERM to socketio.1 (pid 3704)
12:07:41 system | sending SIGTERM to redis_cache.1 (pid 3719)
12:07:41 system | sending SIGTERM to worker_short.1 (pid 3713)
12:07:41 system | worker_default.1 stopped (rc=-15)
12:07:41 redis_socketio.1 | [3694 | signal handler] (1462430261) Received SIGTERM, scheduling shutdown…
12:07:41 redis_queue.1 | [3708 | signal handler] (1462430261) Received SIGTERM, scheduling shutdown…
12:07:41 redis_cache.1 | [3720 | signal handler] (1462430261) Received SIGTERM, scheduling shutdown…
12:07:41 system | worker_long.1 stopped (rc=-15)
12:07:41 system | socketio.1 stopped (rc=-15)
12:07:41 system | web.1 stopped (rc=-15)
12:07:41 redis_cache.1 | [3720] 05 May 12:07:41.533 # User requested shutdown…
12:07:41 redis_cache.1 | [3720] 05 May 12:07:41.533 # Redis is now ready to exit, bye bye…
12:07:41 system | redis_cache.1 stopped (rc=-15)
12:07:41 system | schedule.1 stopped (rc=-15)
12:07:41 system | worker_short.1 stopped (rc=-15)
12:07:41 redis_socketio.1 | [3694] 05 May 12:07:41.579 # User requested shutdown…
12:07:41 redis_socketio.1 | [3694] 05 May 12:07:41.579 # Redis is now ready to exit, bye bye…
12:07:41 system | redis_socketio.1 stopped (rc=-15)
12:07:41 redis_queue.1 | [3708] 05 May 12:07:41.610 # User requested shutdown…
12:07:41 redis_queue.1 | [3708] 05 May 12:07:41.610 # Redis is now ready to exit, bye bye…
12:07:41 system | redis_queue.1 stopped (rc=-15)
ommiforge@ommiforge:~$

Hi Ragav,

Your frappe and erpnext need to be either on master or develop branch.

master = stable
develop = cutting edge

If you are using developer setup, your frappe and erpnext would be on ‘develop’ branch. However, you seem to have a custom app ‘product_master’. If this was developed using the master branch of frappe, you will need to change the branches of frappe and erpnext using: bench switch-to-master or bench switch-to-develop depending on your requirement. Once done, you will need to run bench restart

I followed the commands : getting this error

ommiforge@ommiforge:~$ bench switch-to-develop
Already on ‘develop’
Your branch is up-to-date with ‘upstream/develop’.
Already up-to-date.
remote: Counting objects: 7, done.
remote: Total 7 (delta 5), reused 5 (delta 5), pack-reused 2
Unpacking objects: 100% (7/7), done.
From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
9b61984…a110a06 hotfix → upstream/hotfix
Already on ‘develop’
Your branch is up-to-date with ‘upstream/develop’.
Already up-to-date.

Switched to develop
Please run bench update --patch to be safe from any differences in database schema
ommiforge@ommiforge:~$ bench restart
error: <class ‘xmlrpclib.Fault’>, <Fault 10: ‘BAD_NAME: frappe’>: file: /usr/lib/python2.7/xmlrpclib.py line: 794
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==3.0.0’, ‘console_scripts’, ‘bench’)()
File “/home/ommiforge/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/ommiforge/bench-repo/bench/commands/utils.py”, line 18, in restart
restart_supervisor_processes()
File “/home/ommiforge/bench-repo/bench/utils.py”, line 293, in restart_supervisor_processes
exec_cmd(‘sudo supervisorctl restart {group}’.format(group=group), cwd=bench)
File “/home/ommiforge/bench-repo/bench/utils.py”, line 99, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: sudo supervisorctl restart frappe:
ommiforge@ommiforge:~$

Even i tried to switch to master but getting the same error

ommiforge@ommiforge:~$ bench switch-to-master
Branch master set up to track remote branch master from upstream.
Switched to a new branch ‘master’
Already up-to-date.
Branch master set up to track remote branch master from upstream.
Switched to a new branch ‘master’
Already up-to-date.

Switched to master
Please run bench update --patch to be safe from any differences in database schema
ommiforge@ommiforge:~$ bench restart
error: <class ‘xmlrpclib.Fault’>, <Fault 10: ‘BAD_NAME: frappe’>: file: /usr/lib/python2.7/xmlrpclib.py line: 794
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==3.0.0’, ‘console_scripts’, ‘bench’)()
File “/home/ommiforge/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/ommiforge/bench-repo/bench/commands/utils.py”, line 18, in restart
restart_supervisor_processes()
File “/home/ommiforge/bench-repo/bench/utils.py”, line 293, in restart_supervisor_processes
exec_cmd(‘sudo supervisorctl restart {group}’.format(group=group), cwd=bench)
File “/home/ommiforge/bench-repo/bench/utils.py”, line 99, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: sudo supervisorctl restart frappe:
ommiforge@ommiforge:~$

Sir please tell me how to hard reset frappe and erpnext , everytime I encounter with an issue I need to install ubuntu again erase disk and install ubuntu 14.04 which takes almost three hours , please guide me how to reinstall frappe bench and erpnext ?

Thanks in advance ,

Ragav

@ragav you are going the wrong way then. You never need to reinstall an os to fix erpnext issues.

You need to decide whether you are going to use production setup or development setup. If you are not sure about it, read the documentation and get familiar with the framework. If you don’t want to do that, use the cloud or some other hosting provider that handles this for you.

But if you are self hosting, there are going to be some hassles that you will have to fix. Every system is different and we can’t always ensure that it will just work.

The error indicates that your initial setup was a production setup and you are now trying to do bench start which is part of the development setup. Decide.

I want to build custom app , so I used

wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
sudo bash setup_frappe.sh --bench-branch develop

So Please guide me to hard reset the frappe bench and erpnext

please help me to come out of this issue.