ERPNext Installation ubuntu 18.04.01

Helloo all,

I am trying to install erpnext on ubuntu 18.04.01.

Is that possible to fix the below error?

`TASK [bench : Install ERPNext to default site] *************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “–site”, “site1.local”, “install-app”, “erpnext”], “delta”: “0:00:02.213109”, “end”: “2019-02-08 12:11:45.903268”, “msg”: “non-zero return code”, “rc”: 1, “start”: “2019-02-08 12:11:43.690159”, “stderr”: “”, “stderr_lines”: [], “stdout”: “site1.local does not exist”, “stdout_lines”: [“site1.local does not exist”]}
to retry, use: --limit @/tmp/.bench/playbooks/site.retry

PLAY RECAP *************************************************************************************************************************************************************************************************
localhost : ok=80 changed=32 unreachable=0 failed=1

Traceback (most recent call last):
File “install.py”, line 426, in
install_bench(args)
File “install.py”, line 123, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 339, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2
`

This article/post may help…

suresh@jithendra:~$ cat sites/currentsite.txt

cat: sites/currentsite.txt: No such file or directory
suresh@jithendra:~$ bench setup nginx
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/setup.py”, line 22, in setup_nginx
make_nginx_conf(bench_path=“.”, yes=yes)
File “/home/frappe/.bench/bench/config/nginx.py”, line 13, in make_nginx_conf
sites = prepare_sites(config, bench_path)
File “/home/frappe/.bench/bench/config/nginx.py”, line 100, in prepare_sites
sites_configs = get_sites_with_config(bench_path=bench_path)
File “/home/frappe/.bench/bench/config/nginx.py”, line 185, in get_sites_with_config
sites = get_sites(bench_path=bench_path)
File “/home/frappe/.bench/bench/utils.py”, line 207, in get_sites
sites = [site for site in os.listdir(sites_dir)
OSError: [Errno 2] No such file or directory: ‘/home/suresh/sites’

you probably need to first change to the right subdir

cd ~/frappe-bench
cat sites/currentsite.txt

1 Like

suresh@jithendra:/home/frappe/frappe-bench/sites$ cat sites/currentsite.txt
cat: sites/currentsite.txt: No such file or directory
suresh@jithendra:/home/frappe/frappe-bench/sites$ ls
apps.txt assets common_site_config.json
suresh@jithendra:/home/frappe/frappe-bench/sites$

you went 1 subdir too deep. Try this way

cat ~/frappe-bench/sites/currentsite.txt

suresh@jithendra:/home/frappe/frappe-bench/sites$ cat currentsite.txt
cat: currentsite.txt: No such file or directory

Seems like your setup did not complete correctly. Maybe just check if there are ANY files there with

ls -la ~/frappe-bench/sites

suresh@jithendra:/home/frappe/frappe-bench$ ls
apps archived_sites config env logs patches.txt Procfile sites
suresh@jithendra:/home/frappe/frappe-bench$ cd sites
suresh@jithendra:/home/frappe/frappe-bench/sites$ ls
apps.txt assets common_site_config.json

Your site create did not complete successfully. You need to run that section again - I recommend a manual install so that yo9u can see each step and identify where it went wrong

1 Like