Install Failed - Ubuntu 18.04

Fresh install on fresh VPS results in the following error using install script,

python install.py --production --version 11 --user USER
File "install.py", line 35
    print("Install script run at {0} on {1}\n\n".format(execution_time, execution_day), file=log_stream)

Lines 30-35 are,

	if not args.verbose:
		if not os.path.exists(tmp_log_folder):
			os.makedirs(tmp_log_folder)
		log_stream = open(log_path, 'w')
		log("Logs are saved under {0}".format(log_path), level=3)
		print("Install script run at {0} on {1}\n\n".format(execution_time, execution_day), file=log_stream)

Please advise, Thanks

I think you need to use sudo for this (if you’re not logged in as root). You will also need to share/show more of the errors so that the community can see what’s happening

Hello @trentmu

well, the above error gone when used python3 instead of python (running as root already)

python3 install.py --production --version 11 --user USER

now, script stuck with the following,

Traceback (most recent call last):
  File "install.py", line 414, in <module>
    install_bench(args)
  File "install.py", line 230, in install_bench
    run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 351, in run_playbook
    success = subprocess.check_call(args, cwd=os.path.join(cwd, 'playbooks'), stdout=log_stream, stderr=sys.stderr)
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-vvvv', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=USER']' returned non-zero exit status 2.

Please advise.

Hello, i have the problem, with CentOS 7.

You can tray the bkm solution:

try this one
sudo python3 install.py --production --version 11 --user USER --container

I’ve got this exact error on Debian based docker container.
Full trace back here > Travis CI erpnext-docker-debian build#144

Adding sudo and change python to python3 does the trick.

Cheers!

latest versions of easy install script runs only on Python 3 and running without root fails midway if user doesn’t have privileges or script isn’t run as root. Hence, the checks were added so to minimize chance of failures.

Tried already but results in unjustified excessive CPU/RAM usage on OpenVZ VPS.
I moved already to KVM-based VPS, Thanks!