I am currently facing an error when using install script both for production and develop branches. Here’s the error faced on production branch:
frappe@cloud:~$ sudo python install.py --production
[sudo] password for frappe:
Hit:1 Index of /ubuntu xenial-security InRelease
Hit:2 Index of /ubuntu xenial InRelease
Hit:3 Index of /ubuntu xenial InRelease
Hit:4 Index of /ubuntu xenial-updates InRelease
Reading package lists… Done
Reading package lists… Done
Building dependency tree
Reading state information… Done
build-essential is already the newest version (12.1ubuntu2).
libffi-dev is already the newest version (3.2.1-4).
python-setuptools is already the newest version (20.7.0-1).
git is already the newest version (1:2.7.4-0ubuntu1.6).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.15).
python-dev is already the newest version (2.7.12-1~16.04).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.
WARNING: The directory ‘/home/frappe/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
WARNING: The directory ‘/home/frappe/.cache/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Requirement already up-to-date: setuptools in /usr/local/lib/python2.7/dist-packages (41.0.1)
Requirement already up-to-date: cryptography in /usr/local/lib/python2.7/dist-packages (2.7)
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages (19.1.1)
Requirement already satisfied, skipping upgrade: enum34; python_version < “3” in /usr/local/lib/python2.7/dist-packages (from cryptography) (1.1.6)
Requirement already satisfied, skipping upgrade: cffi!=1.11.3,>=1.8 in /usr/local/lib/python2.7/dist-packages (from cryptography) (1.12.3)
Requirement already satisfied, skipping upgrade: six>=1.4.1 in /usr/local/lib/python2.7/dist-packages (from cryptography) (1.12.0)
Requirement already satisfied, skipping upgrade: asn1crypto>=0.21.0 in /usr/local/lib/python2.7/dist-packages (from cryptography) (0.24.0)
Requirement already satisfied, skipping upgrade: ipaddress; python_version < “3” in /usr/local/lib/python2.7/dist-packages (from cryptography) (1.0.22)
Requirement already satisfied, skipping upgrade: pycparser in /usr/local/lib/python2.7/dist-packages (from cffi!=1.11.3,>=1.8->cryptography) (2.19)
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.
WARNING: The directory ‘/home/frappe/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
WARNING: The directory ‘/home/frappe/.cache/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Requirement already up-to-date: setuptools in /usr/local/lib/python2.7/dist-packages (41.0.1)
Requirement already up-to-date: cryptography in /usr/local/lib/python2.7/dist-packages (2.7)
Requirement already up-to-date: ansible in /usr/local/lib/python2.7/dist-packages (2.8.0)
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages (19.1.1)
Requirement already satisfied, skipping upgrade: enum34; python_version < “3” in /usr/local/lib/python2.7/dist-packages (from cryptography) (1.1.6)
Requirement already satisfied, skipping upgrade: cffi!=1.11.3,>=1.8 in /usr/local/lib/python2.7/dist-packages (from cryptography) (1.12.3)
Requirement already satisfied, skipping upgrade: six>=1.4.1 in /usr/local/lib/python2.7/dist-packages (from cryptography) (1.12.0)
Requirement already satisfied, skipping upgrade: asn1crypto>=0.21.0 in /usr/local/lib/python2.7/dist-packages (from cryptography) (0.24.0)
Requirement already satisfied, skipping upgrade: ipaddress; python_version < “3” in /usr/local/lib/python2.7/dist-packages (from cryptography) (1.0.22)
Requirement already satisfied, skipping upgrade: jinja2 in /usr/local/lib/python2.7/dist-packages (from ansible) (2.10.1)
Requirement already satisfied, skipping upgrade: PyYAML in /usr/local/lib/python2.7/dist-packages (from ansible) (5.1)
Requirement already satisfied, skipping upgrade: pycparser in /usr/local/lib/python2.7/dist-packages (from cffi!=1.11.3,>=1.8->cryptography) (2.19)
Requirement already satisfied, skipping upgrade: MarkupSafe>=0.23 in /usr/local/lib/python2.7/dist-packages (from jinja2->ansible) (1.1.1)
[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’PLAY [localhost] ***************************************************************
TASK [Gathering Facts] *********************************************************
ok: [localhost]TASK [Create user] *************************************************************
ok: [localhost]TASK [Set home folder perms] ***************************************************
changed: [localhost]TASK [Set /tmp/.bench folder perms] ********************************************
ok: [localhost]TASK [Change default shell to bash] ********************************************
changed: [localhost]PLAY RECAP *********************************************************************
localhost : ok=5 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0Passwords saved at ~/passwords.txt
[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’PLAY [localhost] ***************************************************************
TASK [Gathering Facts] *********************************************************
ok: [localhost]TASK [common : include_tasks] **************************************************
included: /tmp/.bench/playbooks/roles/common/tasks/debian_family.yml for localhostTASK [common : Install prerequisites using apt-get] ****************************
[DEPRECATION WARNING]: Invoking “apt” only once while using a loop via
squash_actions is deprecated. Instead of using a loop to supply multiple items
and specifyingpkg: "{{ item }}"
, please usepkg: ['dnsmasq', 'fontconfig', 'git', 'htop', 'libcrypto++-dev', 'libfreetype6-dev', 'liblcms2-dev', 'libssl- dev', 'libwebp-dev', 'libxext6', 'libxrender1', 'libxslt1-dev', 'libxslt1.1', 'libffi-dev', 'ntp', 'postfix', 'python-dev', 'python3-dev', 'python-tk', 'screen', 'vim', 'xfonts-75dpi', 'xfonts-base', 'zlib1g-dev', 'apt-transport- https', 'libsasl2-dev', 'libldap2-dev', 'libcups2-dev', 'pv']
and remove the
loop. This feature will be removed in version 2.11. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [localhost] => (item=[u’dnsmasq’, u’fontconfig’, u’git’, u’htop’, u’libcrypto+±dev’, u’libfreetype6-dev’, u’liblcms2-dev’, u’libssl-dev’, u’libwebp-dev’, u’libxext6’, u’libxrender1’, u’libxslt1-dev’, u’libxslt1.1’, u’libffi-dev’, u’ntp’, u’postfix’, u’python-dev’, u’python3-dev’, u’python-tk’, u’screen’, u’vim’, u’xfonts-75dpi’, u’xfonts-base’, u’zlib1g-dev’, u’apt-transport-https’, u’libsasl2-dev’, u’libldap2-dev’, u’libcups2-dev’, u’pv’])
[WARNING]: Could not find aptitude. Using apt-get insteadTASK [common : include_tasks] **************************************************
skipping: [localhost]TASK [common : include_tasks] **************************************************
included: /tmp/.bench/playbooks/roles/common/tasks/ubuntu.yml for localhostTASK [common : install pillow prerequisites for Ubuntu < 14.04] ****************
[DEPRECATION WARNING]: Invoking “apt” only once while using a loop via
squash_actions is deprecated. Instead of using a loop to supply multiple items
and specifyingpkg: "{{ item }}"
, please usepkg: ['libjpeg8-dev', 'libtiff4-dev', 'tcl8.5-dev', 'tk8.5-dev']
and remove the loop. This feature
will be removed in version 2.11. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using
result|version_compare
useresult is version_compare
. This feature will be
removed in version 2.9. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
skipping: [localhost] => (item=)TASK [common : install pillow prerequisites for Ubuntu >= 14.04] ***************
[DEPRECATION WARNING]: Invoking “apt” only once while using a loop via
squash_actions is deprecated. Instead of using a loop to supply multiple items
and specifyingpkg: "{{ item }}"
, please usepkg: ['libjpeg8-dev', 'libtiff5-dev', 'tcl8.6-dev', 'tk8.6-dev']
and remove the loop. This feature
will be removed in version 2.11. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using
result|version_compare
useresult is version_compare
. This feature will be
removed in version 2.9. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
ok: [localhost] => (item=[u’libjpeg8-dev’, u’libtiff5-dev’, u’tcl8.6-dev’, u’tk8.6-dev’])TASK [common : include_tasks] **************************************************
skipping: [localhost]TASK [locale : Check current locale] *******************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: “localectl”, “delta”: “0:00:00.004173”, “end”: “2019-06-04 23:11:10.679780”, “msg”: “non-zero return code”, “rc”: 1, “start”: “2019-06-04 23:11:10.675607”, “stderr”: “Failed to create bus connection: No such file or directory”, “stderr_lines”: [“Failed to create bus connection: No such file or directory”], “stdout”: “”, “stdout_lines”: }PLAY RECAP *********************************************************************
localhost : ok=5 changed=0 unreachable=0 failed=1 skipped=3 rescued=0 ignored=0Traceback (most recent call last):
File “install.py”, line 432, in
install_bench(args)
File “install.py”, line 128, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 344, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 541, 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 also occurs when I try to install the develop branch. I see two other closed threads about this but none of the solutions proffered in those threads have helped resolve mine. So I’m hoping anyone with a more recent experience or someone who can look through the failure point and decode the issue can help.