I am running a version-12 instance inside an LXD container.
Installed with the install.py
script run with the --container
option.
now The instance runs fine but bench update
(as well as i.e. bench restart
) fails with the following error
sudo: no tty present and no askpass program specified
Traceback (most recent call last):
File "/usr/local/bin/bench", line 11, in <module>
load_entry_point('bench', 'console_scripts', 'bench')()
File "/home/franch/.bench/bench/cli.py", line 40, in cli
bench_command()
File "/usr/lib/python3/dist-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/franch/.bench/bench/commands/update.py", line 61, in update
_update(pull, patch, build, bench, auto, restart_supervisor, restart_systemd, requirements, no_backup, force=force, reset=reset)
File "/home/franch/.bench/bench/commands/update.py", line 107, in _update
restart_supervisor_processes(bench_path=bench_path)
File "/home/franch/.bench/bench/utils.py", line 396, in restart_supervisor_processes
supervisor_status = subprocess.check_output(['sudo', 'supervisorctl', 'status'], cwd=bench_path)
File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['sudo', 'supervisorctl', 'status']' returned non-zero exit status 1.
I am quite familiar with the sudo: no tty present and no askpass program specified
issue inside LXD containers which you can get around by using a sudo -S ...
. So I wonder whether the current bench used ‘sudo’ somehow and fails due to this. I have not seen those issues with v11.
alternatively … how can I update erpnext/frappe without bench commands?
tries git pull origin version-12
in each apps folder. This works well but the instance is not available afterwards with an Internal Server Error
in the browser (and I can not run bench restart
as I mentioned.
any ideas how to get past this?