Hi Members,
I have used the exact steps before and it worked like a charm.
Today I have encountered same error 3 times using different servers. Debian 10 and Ubuntu 20.04 LTS. Please help anyone if possible. I think it is a compatibility issue with recent updates.
Error logs are below:
TASK [bench : python3 bench init for production] ***************************************************************************
task path: /tmp/.bench/bench/playbooks/roles/bench/tasks/main.yml:44
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c ‘echo ~root && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “echo /var/tmp
”&& mkdir /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342 && echo ansible-tmp-1642495545.8854184-47007-93725733107342=“echo /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342
” ) && sleep 0’
Using module file /usr/local/lib/python3.8/dist-packages/ansible/modules/commands/command.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-30352lvc4iit5/tmpngmls08j TO /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/AnsiballZ_command.py
<127.0.0.1> EXEC /bin/sh -c ‘setfacl -m u:petsmall:r-x /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/ /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/AnsiballZ_command.py && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘chmod u+x /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/ /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/AnsiballZ_command.py && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘chown petsmall /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/ /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/AnsiballZ_command.py && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘sudo -H -S -n -u petsmall /bin/sh -c ‘"’“‘echo BECOME-SUCCESS-hzejkhmxxhkufqkxrqdicuhxqelfnfxq ; /usr/bin/python3 /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/AnsiballZ_command.py’”’“’ && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘rm -f -r /var/tmp/ansible-tmp-1642495545.8854184-47007-93725733107342/ > /dev/null 2>&1 && sleep 0’
fatal: [localhost]: FAILED! => {
“changed”: true,
“cmd”: [
“bench”,
“init”,
“/home/petsmall/frappe-bench”,
“–frappe-path”,
“GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript”,
“–frappe-branch”,
“version-13”,
“–python”,
“python3”
],
“delta”: “0:00:00.199411”,
“end”: “2022-01-18 14:15:46.208080”,
“invocation”: {
“module_args”: {
“_raw_params”: “bench init /home/petsmall/frappe-bench --frappe-path GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --frappe-branch version-13 --python python3”,
“_uses_shell”: false,
“argv”: null,
“chdir”: null,
“creates”: “/home/petsmall/frappe-bench”,
“executable”: null,
“removes”: null,
“stdin”: null,
“stdin_add_newline”: true,
“strip_empty_ends”: true,
“warn”: true
}
},
“msg”: “non-zero return code”,
“rc”: 1,
“start”: “2022-01-18 14:15:46.008669”,
“stderr”: “Traceback (most recent call last):\n File "/usr/bin/bench", line 33, in \n sys.exit(load_entry_point(‘frappe-bench’, ‘console_scripts’, ‘bench’)())\n File "/usr/bin/bench", line 22, in importlib_load_entry_point\n for entry_point in distribution(dist_name).entry_points\n File "/usr/lib/python3.8/importlib/metadata.py", line 503, in distribution\n return Distribution.from_name(distribution_name)\n File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name\n raise PackageNotFoundError(name)\nimportlib.metadata.PackageNotFoundError: frappe-bench”,
“stderr_lines”: [
“Traceback (most recent call last):”,
" File "/usr/bin/bench", line 33, in ”,
" sys.exit(load_entry_point(‘frappe-bench’, ‘console_scripts’, ‘bench’)())“,
" File "/usr/bin/bench", line 22, in importlib_load_entry_point”,
" for entry_point in distribution(dist_name).entry_points",
" File "/usr/lib/python3.8/importlib/metadata.py", line 503, in distribution",
" return Distribution.from_name(distribution_name)“,
" File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name”,
" raise PackageNotFoundError(name)",
“importlib.metadata.PackageNotFoundError: frappe-bench”
],
“stdout”: “”,
“stdout_lines”: []
}
PLAY RECAP *****************************************************************************************************************
localhost : ok=67 changed=40 unreachable=0 failed=1 skipped=63 rescued=0 ignored=0
Traceback (most recent call last):
File “install.py”, line 497, in
install_bench(args)
File “install.py”, line 278, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 413, in run_playbook
success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr)
File “/usr/lib/python3.8/subprocess.py”, line 364, 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=petsmall’]’ returned non-zero exit status 2.