Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Fails with Script and Manually #2

Open
1 of 2 tasks
RR-Helpdesk opened this issue Sep 3, 2022 · 0 comments
Open
1 of 2 tasks

Install Fails with Script and Manually #2

RR-Helpdesk opened this issue Sep 3, 2022 · 0 comments

Comments

@RR-Helpdesk
Copy link

RR-Helpdesk commented Sep 3, 2022

Issue: Easy Install

[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
[WARNING]: Skipping plugin (/usr/local/lib/python3.8/site-packages/ansible/plugins/filter/core.py) as it seems to be invalid: cannot import name 'environmentfilter' from 'jinja2.filters'
(/usr/local/lib/python3.8/site-packages/jinja2/filters.py)
[WARNING]: Skipping plugin (/usr/local/lib/python3.8/site-packages/ansible/plugins/filter/mathstuff.py) as it seems to be invalid: cannot import name 'environmentfilter' from 'jinja2.filters'
(/usr/local/lib/python3.8/site-packages/jinja2/filters.py)
Input MySQL and Frappe Administrator passwords:
Please enter mysql root password:
Re-enter mysql root password:
MySQL passwords did not match!
Please enter mysql root password:
Re-enter mysql root password:
Please enter the default Administrator user password:
Re-enter Administrator password:
Passwords saved at ~/passwords.txt
Initializing bench frappe-bench:
Frappe Branch: version-13
ERPNext Branch: version-13
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
[WARNING]: Skipping plugin (/usr/local/lib/python3.8/site-packages/ansible/plugins/filter/core.py) as it seems to be invalid: cannot import name 'environmentfilter' from 'jinja2.filters'
(/usr/local/lib/python3.8/site-packages/jinja2/filters.py)
[WARNING]: Skipping plugin (/usr/local/lib/python3.8/site-packages/ansible/plugins/filter/mathstuff.py) as it seems to be invalid: cannot import name 'environmentfilter' from 'jinja2.filters'
(/usr/local/lib/python3.8/site-packages/jinja2/filters.py)
[WARNING]: Updating cache and auto-installing missing dependency: python3-apt
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/local/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=frappe']' returned non-zero exit status 2.
erpnext%

Do the checklist before filing an issue:

  • Did you retain the logfile (path of logfile is shared while the script is run)? We definitely need the logfile to debug any easy install related issues.
  • Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome

Distro Information (Required)

Linux erpnext.revrebel.app 5.4.0-125-generic frappe/bench#141-Ubuntu SMP Wed Aug 10 13:42:03 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

erpnext% cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.5 LTS"
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Command Run (Required)
sudo python3 install.py --production (would only run as sudo, non root user

Log File (Required)

load-nvmrc:1: command not found: nvm
load-nvmrc:2: command not found: nvm_find_nvmrc
load-nvmrc:12: command not found: nvm
erpnext% python3 install.py --production --user erpnext
Please run this script as a non-root user with sudo privileges
erpnext% python3 install.py --production
Please run this script as a non-root user with sudo privileges
erpnext% sudo python3 install.py --production
Logs are saved under /tmp/logs/easy-install__2022-09-03__13-57.log
curl already installed!
wget already installed!
git already installed!
pip3 already installed!
WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
pip3 already installed!
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see pypa/pip#5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Collecting distro
Downloading distro-1.7.0-py3-none-any.whl (20 kB)
Installing collected packages: distro
Successfully installed distro-1.7.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Checking System Compatibility...
ubuntu 20 is compatible!
Bench's CLI needs these to be defined!
Run the following commands in shell:
export LC_ALL=C.UTF-8
erpnext% export LC_ALL=C.UTF-8
erpnext% sudo python3 install.py --production
Logs are saved under /tmp/logs/easy-install__2022-09-03__13-59.log
curl already installed!
wget already installed!
git already installed!
pip3 already installed!
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
pip3 already installed!
Checking System Compatibility...
ubuntu 20 is compatible!
Cloning bench repository branch develop into /tmp/.bench
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
[WARNING]: Skipping plugin (/usr/local/lib/python3.8/site-packages/ansible/plugins/filter/core.py) as it seems to be invalid: cannot import name 'environmentfilter' from 'jinja2.filters'
(/usr/local/lib/python3.8/site-packages/jinja2/filters.py)
[WARNING]: Skipping plugin (/usr/local/lib/python3.8/site-packages/ansible/plugins/filter/mathstuff.py) as it seems to be invalid: cannot import name 'environmentfilter' from 'jinja2.filters'
(/usr/local/lib/python3.8/site-packages/jinja2/filters.py)
Input MySQL and Frappe Administrator passwords:
Please enter mysql root password:
Re-enter mysql root password:
MySQL passwords did not match!
Please enter mysql root password:
Re-enter mysql root password:
Please enter the default Administrator user password:
Re-enter Administrator password:
Passwords saved at /passwords.txt
Initializing bench frappe-bench:
Frappe Branch: version-13
ERPNext Branch: version-13
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
[WARNING]: Skipping plugin (/usr/local/lib/python3.8/site-packages/ansible/plugins/filter/core.py) as it seems to be invalid: cannot import name 'environmentfilter' from 'jinja2.filters'
(/usr/local/lib/python3.8/site-packages/jinja2/filters.py)
[WARNING]: Skipping plugin (/usr/local/lib/python3.8/site-packages/ansible/plugins/filter/mathstuff.py) as it seems to be invalid: cannot import name 'environmentfilter' from 'jinja2.filters'
(/usr/local/lib/python3.8/site-packages/jinja2/filters.py)
[WARNING]: Updating cache and auto-installing missing dependency: python3-apt
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/local/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=frappe']' returned non-zero exit status 2.
erpnext% cat /tmp/logs/easy-install__2022-09-03__13-59.log
Hit:1 http://mirrors.linode.com/ubuntu focal InRelease
Hit:2 http://mirrors.linode.com/ubuntu focal-updates InRelease
Hit:3 http://mirrors.linode.com/ubuntu focal-backports InRelease
Hit:4 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:6 https://packages.redis.io/deb focal InRelease
Hit:7 http://ppa.launchpad.net/ondrej/nginx-mainline/ubuntu focal InRelease
Hit:8 https://deb.nodesource.com/node_14.x focal InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
libffi-dev is already the newest version (3.3-4).
python3-dev is already the newest version (3.8.2-0ubuntu2).
python3-setuptools is already the newest version (45.2.0-1).
build-essential is already the newest version (12.8ubuntu1.1).
git is already the newest version (1:2.25.1-1ubuntu3.5).
The following packages were automatically installed and are no longer required:
apache2-bin apache2-data apache2-utils libaprutil1-dbd-sqlite3
libaprutil1-ldap liblua5.2-0 libpython3.10-minimal libpython3.10-stdlib
python3.10-minimal
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Requirement already satisfied: pip in /usr/local/lib/python3.8/site-packages (22.2.2)
Requirement already satisfied: setuptools-rust in /usr/local/lib/python3.8/site-packages (1.5.1)
Requirement already satisfied: setuptools>=62.4 in /usr/local/lib/python3.8/site-packages (from setuptools-rust) (65.3.0)
Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.8/site-packages (from setuptools-rust) (4.3.0)
Requirement already satisfied: semantic-version<3,>=2.8.2 in /usr/local/lib/python3.8/site-packages (from setuptools-rust) (2.10.0)
Requirement already satisfied: setuptools in /usr/local/lib/python3.8/site-packages (65.3.0)
Requirement already satisfied: wheel in /usr/local/lib/python3.8/site-packages (0.37.1)
Requirement already satisfied: cryptography in /usr/local/lib/python3.8/site-packages (37.0.4)
Requirement already satisfied: ansible
=2.8.15 in /usr/local/lib/python3.8/site-packages (2.8.20)
Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.8/site-packages (from cryptography) (1.15.1)
Requirement already satisfied: jinja2 in /usr/local/lib/python3.8/site-packages (from ansible~=2.8.15) (3.1.2)
Requirement already satisfied: PyYAML in /usr/local/lib/python3.8/site-packages (from ansible~=2.8.15) (6.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.8/site-packages (from cffi>=1.12->cryptography) (2.21)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.8/site-packages (from jinja2->ansible~=2.8.15) (2.1.1)
ansible-playbook 2.8.20
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 3.8.10 (default, Sep 3 2022, 11:33:36) [GCC 9.4.0]
No config file found; using defaults
setting up inventory plugins
host_list declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
script declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
yaml declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
ini declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
toml declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python3.8/site-packages/ansible/plugins/callback/default.py

PLAYBOOK: create_user.yml **********************************************************************************************************************************************************************************
Positional arguments: create_user.yml
verbosity: 4
connection: local
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/etc/ansible/hosts',)
extra_vars: ('@/tmp/extra_vars.json',)
forks: 5
1 plays in create_user.yml

PLAY [localhost] *******************************************************************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************************************************************************
task path: /tmp/.bench/bench/playbooks/create_user.yml:3
<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 /root/.ansible/tmp"&& mkdir /root/.ansible/tmp/ansible-tmp-1662213609.8798313-5335-122663360945250 && echo ansible-tmp-1662213609.8798313-5335-122663360945250="echo /root/.ansible/tmp/ansible-tmp-1662213609.8798313-5335-122663360945250" ) && sleep 0'
Using module file /usr/local/lib/python3.8/site-packages/ansible/modules/system/setup.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-5330l9mz3hnk/tmp918or716 TO /root/.ansible/tmp/ansible-tmp-1662213609.8798313-5335-122663360945250/AnsiballZ_setup.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1662213609.8798313-5335-122663360945250/ /root/.ansible/tmp/ansible-tmp-1662213609.8798313-5335-122663360945250/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/local/bin/python3 /root/.ansible/tmp/ansible-tmp-1662213609.8798313-5335-122663360945250/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1662213609.8798313-5335-122663360945250/ > /dev/null 2>&1 && sleep 0'
ok: [localhost]
META: ran handlers

TASK [Create user] *****************************************************************************************************************************************************************************************
task path: /tmp/.bench/bench/playbooks/create_user.yml:7
<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 /root/.ansible/tmp"&& mkdir /root/.ansible/tmp/ansible-tmp-1662213613.436993-5403-273944749501038 && echo ansible-tmp-1662213613.436993-5403-273944749501038="echo /root/.ansible/tmp/ansible-tmp-1662213613.436993-5403-273944749501038" ) && sleep 0'
Using module file /usr/local/lib/python3.8/site-packages/ansible/modules/system/user.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-5330l9mz3hnk/tmpurgqmg8a TO /root/.ansible/tmp/ansible-tmp-1662213613.436993-5403-273944749501038/AnsiballZ_user.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1662213613.436993-5403-273944749501038/ /root/.ansible/tmp/ansible-tmp-1662213613.436993-5403-273944749501038/AnsiballZ_user.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/local/bin/python3 /root/.ansible/tmp/ansible-tmp-1662213613.436993-5403-273944749501038/AnsiballZ_user.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1662213613.436993-5403-273944749501038/ > /dev/null 2>&1 && sleep 0'
changed: [localhost] => {
"changed": true,
"comment": "",
"create_home": true,
"group": 1001,
"home": "/home/frappe",
"invocation": {
"module_args": {
"append": false,
"authorization": null,
"comment": null,
"create_home": true,
"expires": null,
"force": false,
"generate_ssh_key": true,
"group": null,
"groups": null,
"hidden": null,
"home": null,
"local": null,
"login_class": null,
"move_home": false,
"name": "frappe",
"non_unique": false,
"password": null,
"password_lock": null,
"profile": null,
"remove": false,
"role": null,
"seuser": null,
"shell": null,
"skeleton": null,
"ssh_key_bits": 0,
"ssh_key_comment": "ansible-generated on erpnext.revrebel.app",
"ssh_key_file": null,
"ssh_key_passphrase": null,
"ssh_key_type": "rsa",
"state": "present",
"system": false,
"uid": null,
"update_password": "always"
}
},
"name": "frappe",
"shell": "/bin/sh",
"ssh_fingerprint": "3072 SHA256:mMBu1qCfE17u/ZUqXyefkQNepK0VezegIET58kSb2lQ ansible-generated on erpnext.revrebel.app (RSA)",
"ssh_key_file": "/home/frappe/.ssh/id_rsa",
"ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDmTv0UtvITtdy5j7+AzJcvcOiWPWcnCfRfjc4tKhN8wMqmCu9Ob7Tf/LfW098sRk0oPbh8CXjZQ1tSsakZUM6DgyfN82aKO0siNZvjWomYW6u6+FVw7JpBaKXtP5jrF146+LQe/fXlLF8v0LbN0VQJi4rEdrK2yjQr70RP6U1sNguf6py9Ea8s90XD3xaYYbT01Q1ipfXpR4SxsLLh10wbdd6havbdaoTQwVY9kskTa4bz1wtx4AeIDxs6C50P2Wk+6kmSPZ6+Z2pJyBxmc/Sk4HwBAbSvX7xa7U5XWbrGZLQKHo4wHcE9Y1G03EWrDrC7go8NfIQe/LsuRNaom+t0A8i1GrONdbUkUIwhuoFJeKIfM3nviaJ0F8/dtKDIxga+7D3vf6ef95lqLU1nYz3j7ip6+niU98kF3+jq0Qphrrwx4weyqHrsxww03b1qpOdDqe7TDaZV74PgaGmwAvI5ydmaiBlzagLjWWlSMnjhjc6E/sVxQLA0ay1DLQa8rG0= ansible-generated on erpnext.revrebel.app",
"state": "present",
"system": false,
"uid": 1001
}

TASK [Set home folder perms] *******************************************************************************************************************************************************************************
task path: /tmp/.bench/bench/playbooks/create_user.yml:12
<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 /root/.ansible/tmp"&& mkdir /root/.ansible/tmp/ansible-tmp-1662213615.4794319-5440-16632946209144 && echo ansible-tmp-1662213615.4794319-5440-16632946209144="echo /root/.ansible/tmp/ansible-tmp-1662213615.4794319-5440-16632946209144" ) && sleep 0'
Using module file /usr/local/lib/python3.8/site-packages/ansible/modules/files/file.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-5330l9mz3hnk/tmpl7w_68h8 TO /root/.ansible/tmp/ansible-tmp-1662213615.4794319-5440-16632946209144/AnsiballZ_file.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1662213615.4794319-5440-16632946209144/ /root/.ansible/tmp/ansible-tmp-1662213615.4794319-5440-16632946209144/AnsiballZ_file.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/local/bin/python3 /root/.ansible/tmp/ansible-tmp-1662213615.4794319-5440-16632946209144/AnsiballZ_file.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1662213615.4794319-5440-16632946209144/ > /dev/null 2>&1 && sleep 0'
changed: [localhost] => {
"changed": true,
"diff": {
"after": {
"path": "/home/frappe"
},
"before": {
"path": "/home/frappe"
}
},
"gid": 1001,
"group": "frappe",
"invocation": {
"module_args": {
"_diff_peek": null,
"_original_basename": null,
"access_time": null,
"access_time_format": "%Y%m%d%H%M.%S",
"attributes": null,
"backup": null,
"content": null,
"delimiter": null,
"directory_mode": null,
"follow": true,
"force": false,
"group": "frappe",
"mode": "o+rx",
"modification_time": null,
"modification_time_format": "%Y%m%d%H%M.%S",
"owner": "frappe",
"path": "/home/frappe",
"recurse": true,
"regexp": null,
"remote_src": null,
"selevel": null,
"serole": null,
"setype": null,
"seuser": null,
"src": null,
"state": "directory",
"unsafe_writes": null
}
},
"mode": "0755",
"owner": "frappe",
"path": "/home/frappe",
"size": 4096,
"state": "directory",
"uid": 1001
}

TASK [Set /tmp/.bench folder perms] ************************************************************************************************************************************************************************
task path: /tmp/.bench/bench/playbooks/create_user.yml:20
<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 /root/.ansible/tmp"&& mkdir /root/.ansible/tmp/ansible-tmp-1662213616.5311637-5465-168650986630943 && echo ansible-tmp-1662213616.5311637-5465-168650986630943="echo /root/.ansible/tmp/ansible-tmp-1662213616.5311637-5465-168650986630943" ) && sleep 0'
Using module file /usr/local/lib/python3.8/site-packages/ansible/modules/files/file.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-5330l9mz3hnk/tmp40nfmt9h TO /root/.ansible/tmp/ansible-tmp-1662213616.5311637-5465-168650986630943/AnsiballZ_file.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1662213616.5311637-5465-168650986630943/ /root/.ansible/tmp/ansible-tmp-1662213616.5311637-5465-168650986630943/AnsiballZ_file.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/local/bin/python3 /root/.ansible/tmp/ansible-tmp-1662213616.5311637-5465-168650986630943/AnsiballZ_file.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1662213616.5311637-5465-168650986630943/ > /dev/null 2>&1 && sleep 0'
changed: [localhost] => {
"changed": true,
"diff": {
"after": {
"group": 1001,
"owner": 1001,
"path": "/tmp/.bench"
},
"before": {
"group": 0,
"owner": 0,
"path": "/tmp/.bench"
}
},
"gid": 1001,
"group": "frappe",
"invocation": {
"module_args": {
"_diff_peek": null,
"_original_basename": null,
"access_time": null,
"access_time_format": "%Y%m%d%H%M.%S",
"attributes": null,
"backup": null,
"content": null,
"delimiter": null,
"directory_mode": null,
"follow": true,
"force": false,
"group": "frappe",
"mode": null,
"modification_time": null,
"modification_time_format": "%Y%m%d%H%M.%S",
"owner": "frappe",
"path": "/tmp/.bench",
"recurse": true,
"regexp": null,
"remote_src": null,
"selevel": null,
"serole": null,
"setype": null,
"seuser": null,
"src": null,
"state": "directory",
"unsafe_writes": null
}
},
"mode": "0755",
"owner": "frappe",
"path": "/tmp/.bench",
"size": 4096,
"state": "directory",
"uid": 1001
}

TASK [Change default shell to bash] ************************************************************************************************************************************************************************
task path: /tmp/.bench/bench/playbooks/create_user.yml:27
<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 /root/.ansible/tmp"&& mkdir /root/.ansible/tmp/ansible-tmp-1662213617.136819-5490-122033843767987 && echo ansible-tmp-1662213617.136819-5490-122033843767987="echo /root/.ansible/tmp/ansible-tmp-1662213617.136819-5490-122033843767987" ) && sleep 0'
Using module file /usr/local/lib/python3.8/site-packages/ansible/modules/commands/command.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-5330l9mz3hnk/tmp7aajuf1m TO /root/.ansible/tmp/ansible-tmp-1662213617.136819-5490-122033843767987/AnsiballZ_command.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1662213617.136819-5490-122033843767987/ /root/.ansible/tmp/ansible-tmp-1662213617.136819-5490-122033843767987/AnsiballZ_command.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/local/bin/python3 /root/.ansible/tmp/ansible-tmp-1662213617.136819-5490-122033843767987/AnsiballZ_command.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1662213617.136819-5490-122033843767987/ > /dev/null 2>&1 && sleep 0'
changed: [localhost] => {
"changed": true,
"cmd": "chsh frappe -s $(which bash)",
"delta": "0:00:00.030640",
"end": "2022-09-03 14:00:17.984521",
"invocation": {
"module_args": {
"_raw_params": "chsh frappe -s $(which bash)",
"_uses_shell": true,
"argv": null,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true,
"warn": true
}
},
"rc": 0,
"start": "2022-09-03 14:00:17.953881",
"stderr": "",
"stderr_lines": [],
"stdout": "",
"stdout_lines": []
}
META: ran handlers
META: ran handlers

PLAY RECAP *************************************************************************************************************************************************************************************************
localhost : ok=5 changed=4 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

ansible-playbook 2.8.20
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 3.8.10 (default, Sep 3 2022, 11:33:36) [GCC 9.4.0]
No config file found; using defaults
setting up inventory plugins
host_list declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
script declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
yaml declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
ini declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
toml declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
statically imported: /tmp/.bench/bench/playbooks/roles/mariadb/tasks/centos.yml
statically imported: /tmp/.bench/bench/playbooks/roles/mariadb/tasks/ubuntu-trusty.yml
statically imported: /tmp/.bench/bench/playbooks/roles/mariadb/tasks/ubuntu-xenial_bionic.yml
Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python3.8/site-packages/ansible/plugins/callback/default.py

PLAYBOOK: site.yml *****************************************************************************************************************************************************************************************
Positional arguments: site.yml
verbosity: 4
connection: local
timeout: 10
become: True
become_method: sudo
become_user: frappe
tags: ('all',)
inventory: ('/etc/ansible/hosts',)
extra_vars: ('@/tmp/extra_vars.json',)
forks: 5
2 plays in site.yml

PLAY [localhost] *******************************************************************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************************************************************************
task path: /tmp/.bench/bench/playbooks/site.yml:4
<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 /root/.ansible/tmp"&& mkdir /root/.ansible/tmp/ansible-tmp-1662213677.3241968-5532-17590604182539 && echo ansible-tmp-1662213677.3241968-5532-17590604182539="echo /root/.ansible/tmp/ansible-tmp-1662213677.3241968-5532-17590604182539" ) && sleep 0'
Using module file /usr/local/lib/python3.8/site-packages/ansible/modules/system/setup.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-5527p2gdxwgv/tmps8m3izp0 TO /root/.ansible/tmp/ansible-tmp-1662213677.3241968-5532-17590604182539/AnsiballZ_setup.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1662213677.3241968-5532-17590604182539/ /root/.ansible/tmp/ansible-tmp-1662213677.3241968-5532-17590604182539/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/local/bin/python3 /root/.ansible/tmp/ansible-tmp-1662213677.3241968-5532-17590604182539/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1662213677.3241968-5532-17590604182539/ > /dev/null 2>&1 && sleep 0'
ok: [localhost]
META: ran handlers

TASK [common : include_tasks] ******************************************************************************************************************************************************************************
task path: /tmp/.bench/bench/playbooks/roles/common/tasks/main.yml:4
included: /tmp/.bench/bench/playbooks/roles/common/tasks/debian_family.yml for localhost

TASK [common : Install prerequisites using apt-get] ********************************************************************************************************************************************************
task path: /tmp/.bench/bench/playbooks/roles/common/tasks/debian_family.yml:3
<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 /root/.ansible/tmp"&& mkdir /root/.ansible/tmp/ansible-tmp-1662213681.4795735-5601-153383948683997 && echo ansible-tmp-1662213681.4795735-5601-153383948683997="echo /root/.ansible/tmp/ansible-tmp-1662213681.4795735-5601-153383948683997" ) && sleep 0'
Using module file /usr/local/lib/python3.8/site-packages/ansible/modules/packaging/os/apt.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-5527p2gdxwgv/tmpxds2td35 TO /root/.ansible/tmp/ansible-tmp-1662213681.4795735-5601-153383948683997/AnsiballZ_apt.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1662213681.4795735-5601-153383948683997/ /root/.ansible/tmp/ansible-tmp-1662213681.4795735-5601-153383948683997/AnsiballZ_apt.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/local/bin/python3 /root/.ansible/tmp/ansible-tmp-1662213681.4795735-5601-153383948683997/AnsiballZ_apt.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1662213681.4795735-5601-153383948683997/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
File "/tmp/ansible_apt_payload_bn1r4iar/main.py", line 1040, in main
import apt
fatal: [localhost]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"allow_unauthenticated": false,
"autoclean": false,
"autoremove": false,
"cache_valid_time": 0,
"deb": null,
"default_release": null,
"dpkg_options": "force-confdef,force-confold",
"force": true,
"force_apt_get": false,
"install_recommends": null,
"only_upgrade": false,
"package": [
"dnsmasq",
"fontconfig",
"git",
"htop",
"libcrypto++-dev",
"libfreetype6-dev",
"liblcms2-dev",
"libwebp-dev",
"libxext6",
"libxrender1",
"libxslt1-dev",
"libxslt1.1",
"libffi-dev",
"ntp",
"postfix",
"python3-dev",
"python-tk",
"screen",
"vim",
"xfonts-75dpi",
"xfonts-base",
"zlib1g-dev",
"apt-transport-https",
"libsasl2-dev",
"libldap2-dev",
"libcups2-dev",
"pv"
],
"pkg": [
"dnsmasq",
"fontconfig",
"git",
"htop",
"libcrypto++-dev",
"libfreetype6-dev",
"liblcms2-dev",
"libwebp-dev",
"libxext6",
"libxrender1",
"libxslt1-dev",
"libxslt1.1",
"libffi-dev",
"ntp",
"postfix",
"python3-dev",
"python-tk",
"screen",
"vim",
"xfonts-75dpi",
"xfonts-base",
"zlib1g-dev",
"apt-transport-https",
"libsasl2-dev",
"libldap2-dev",
"libcups2-dev",
"pv"
],
"policy_rc_d": null,
"purge": false,
"state": "present",
"update_cache": null,
"upgrade": null
}
},
"msg": "Could not import python modules: apt, apt_pkg. Please install python3-apt package."
}

PLAY RECAP *************************************************************************************************************************************************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

Install script run at 13:59 on 2022-09-03

-->

Screenshots

Additional context

@ankush ankush transferred this issue from frappe/bench Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant