Problem in ERPNext bench setup

whenever i use bench start,
the page is “Not found”.
but when i use this command “bench --site devo.local serve --port 8082” erpnext will successfully loaded.
Note: when i use “bench start” its port number is 8000, when i use “bench --site devo.local serve --port 8082” its port number is 8082.

what should i do for this problem. please guide me someone.

please apply it.

bench use devo.local
bench start

if change my site name like “devo.com” instead of “devo.local” can run bench start without using
bench using devo.local.

1 Like

To rename the site name

mv sites/old-name sites/new-name
bench setup nginx
sudo service nginx reload
bench restart

:~/frappe-bench$ mv sites/devo.local sites/devo.com
sumith@administrator-OptiPlex-3090:~/frappe-bench$ bench setup nginx
nginx.conf already exists and this will overwrite it. Do you want to continue? [y/N]: n
INFO: A newer version of bench is available: 5.22.3 → 5.22.6
sumith@administrator-OptiPlex-3090:~/frappe-bench$ sudo service nginx reload
[sudo] password for sumith:
nginx: unrecognized service
sumith@administrator-OptiPlex-3090:~/frappe-bench$ bench restart
$ sudo supervisorctl restart frappe:
frappe: ERROR (no such group)
frappe: ERROR (no such group)
ERROR: sudo supervisorctl restart frappe:
subprocess.CalledProcessError: Command ‘sudo supervisorctl restart frappe:’ returned non-zero exit status 2.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
sys.exit(cli())
File “/usr/local/lib/python3.10/dist-packages/bench/cli.py”, line 132, in cli
bench_command()
File “/usr/local/lib/python3.10/dist-packages/bench/commands/utils.py”, line 41, in restart
Bench(“.”).reload(web, supervisor, systemd)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/render.py”, line 126, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.10/dist-packages/bench/bench.py”, line 152, in reload
restart_supervisor_processes(bench_path=self.name, web_workers=web, _raise=_raise)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py”, line 342, in restart_supervisor_processes
failure = bench.run(f"{sudo}supervisorctl restart {group}", _raise=_raise)
File “/usr/local/lib/python3.10/dist-packages/bench/bench.py”, line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/init.py”, line 169, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: sudo supervisorctl restart frappe:

INFO: A newer version of bench is available: 5.22.3 → 5.22.6

your site is on production mode or development mode?

development mode i think so.how can i check it

Then not needed below command.

mv: cannot stat ‘sites/devo.local’: No such file or directory

and also now i cant reach my erpnext site. the page shows “Not found”
if i try to use : bench use devo.local it response No such file or directory

stop bench, and again start it.

also check it in the common site config, if the default site name is not changed according to the new site name then change it.

im stopped the bench and again tried to start but still erpnext site “Not found”
and the site name is changed into devo.com

read this.

do u mean common site config.json

yes … !

{
“background_workers”: 1,
“developer_mode”: 1,
“file_watcher_port”: 6787,
“frappe_user”: “sumith”,
“gunicorn_workers”: 17,
“live_reload”: true,
“pause_scheduler”: 1,
“rebase_on_pull”: false,
“redis_cache”: “redis://127.0.0.1:13000”,
“redis_queue”: “redis://127.0.0.1:11000”,
“redis_socketio”: “redis://127.0.0.1:13000”,
“restart_supervisor_on_update”: true,
“restart_systemd_on_update”: false,
“serve_default_site”: true,
“shallow_clone”: true,
“socketio_port”: 9000,
“use_redis_auth”: false,
“webserver_port”: 8000
}

there is no default site name in it

okay, now apply it.

bench use devo.com
bench start
1 Like

Thank you its worked. its my mistake i forgot to use this command bench use devo.com
after changing the name.