Bench Start Error - What to do after installation

I’ve finished my installation following instructions on this site…everything went well until I got to the last bit of

Setup Supervisor and Nginx

I am using a cloud server from Digital Ocean, my new site address were

bench new-site erp.mysite.com

bench --site erp.mysite.com install-app erpnext

How can I access it now after installation. Bench start is failing with the procfile error and even after running bench setup procfile, it still gives me more errors.

[bench@erpnext ~]$  sudo supervisorctl status all
erpnext-redis:erpnext-redis-cache                 RUNNING   pid 2344, uptime 0:00:11
erpnext-redis:erpnext-redis-queue                 RUNNING   pid 2338, uptime 0:00:11
erpnext-redis:erpnext-redis-socketio              RUNNING   pid 2350, uptime 0:00:11
erpnext-web:erpnext-frappe-web                    RUNNING   pid 2399, uptime 0:00:09
erpnext-web:erpnext-node-socketio                 RUNNING   pid 2375, uptime 0:00:10
erpnext-workers:erpnext-frappe-default-worker-0   RUNNING   pid 2351, uptime 0:00:11
erpnext-workers:erpnext-frappe-long-worker-0      RUNNING   pid 2302, uptime 0:00:13
erpnext-workers:erpnext-frappe-schedule           RUNNING   pid 2272, uptime 0:00:14
erpnext-workers:erpnext-frappe-short-worker-0     RUNNING   pid 2327, uptime 0:00:12

What am I not doing or what should I do to be able to access it?

Thanks in advance,
E’m

1 Like

You will need to change the ports to suit your needs - the 8238 is just an example

sudo bench setup production frappe
bench set-nginx-port erp.mysite.com 8238
#Site erp.mysite.com assigned port: 8238
nginx.conf already exists and this will overwrite it. Do you want to continue? [y/N]: y
bench setup nginx
sudo systemctl reload nginx

Then browse to http://yoursite:8238

Thanks @trentmu for the quick response.

This is the error I get when I try that:

[bench@erpnext-cloud ~]$ bench set-nginx-port erp.mysite.com 8238
Traceback (most recent call last):
  File "/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/opt/bench/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/opt/bench/bench-repo/bench/commands/utils.py", line 33, in set_nginx_port
    set_nginx_port(site, port)
  File "/opt/bench/bench-repo/bench/config/site_config.py", line 24, in set_nginx_port
    set_site_config_nginx_property(site, {"nginx_port": port}, bench_path=bench_path, gen_config=gen_config)
  File "/opt/bench/bench-repo/bench/config/site_config.py", line 33, in set_site_config_nginx_property
    if site not in get_sites(bench_path=bench_path):
  File "/opt/bench/bench-repo/bench/utils.py", line 208, in get_sites
    sites = [site for site in os.listdir(sites_dir)
OSError: [Errno 2] No such file or directory: './sites'

Any other way out?

E’m

Sorry - I should have said…you need to be in the ~/frappe-bench subdir, as the frappe user, so

cd ~/frappe-bench

then the commands above

1 Like