ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

Re: Install error | ‘--become-user frappe’ returned non-zero exit status 2


#1

Continuing the discussion from [Install error | ‘–become-user=frappe’]’ returned non-zero exit status 2](Install error | ‘--become-user=frappe’]’ returned non-zero exit status 2):
sorry, this was closed prematurely. Issue isn’t solved for me

@codingCoffee here u go. Does it give any hints about where to find the root cause of the problem?
just a reminder: I’m on a fresh 16.04. service inside an LXD Container.

ubuntu@erpn1809:~$ sudo python install.py --production --mysql-root-password [password] --admin-password [password]
[sudo] password for ubuntu:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  curl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 138 kB of archives.
After this operation, 339 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 curl amd64 7.47.0-1ubuntu2.9 [138 kB]
Fetched 138 kB in 0s (700 kB/s)
Selecting previously unselected package curl.
(Reading database ... 24060 files and directories currently installed.)
Preparing to unpack .../curl_7.47.0-1ubuntu2.9_amd64.deb ...
Unpacking curl (7.47.0-1ubuntu2.9) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up curl (7.47.0-1ubuntu2.9) ...
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Fetched 216 kB in 0s (331 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
python-setuptools is already the newest version (20.7.0-1).
The following additional packages will be installed:
  git-man liberror-perl libexpat1-dev libpython-dev libpython2.7 libpython2.7-dev libssl-doc python2.7-dev zlib1g-dev
Suggested packages:
  git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-cvs git-mediawiki git-svn
The following NEW packages will be installed:
  git git-man liberror-perl libexpat1-dev libffi-dev libpython-dev libpython2.7 libpython2.7-dev libssl-dev libssl-doc python-dev python2.7-dev zlib1g-dev
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
Need to get 35.9 MB of archives.
After this operation, 82.2 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 liberror-perl all 0.17-1.2 [19.6 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 git-man all 1:2.7.4-0ubuntu1.4 [736 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 git amd64 1:2.7.4-0ubuntu1.4 [3158 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libexpat1-dev amd64 2.1.0-7ubuntu0.16.04.3 [115 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7 amd64 2.7.12-1ubuntu0~16.04.3 [1070 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-dev amd64 2.7.12-1ubuntu0~16.04.3 [27.8 MB]
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython-dev amd64 2.7.12-1~16.04 [7840 B]
Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 zlib1g-dev amd64 1:1.2.8.dfsg-2ubuntu4.1 [168 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libssl-dev amd64 1.0.2g-1ubuntu4.13 [1342 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libssl-doc all 1.0.2g-1ubuntu4.13 [1079 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7-dev amd64 2.7.12-1ubuntu0~16.04.3 [276 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-dev amd64 2.7.12-1~16.04 [1186 B]
Get:13 http://archive.ubuntu.com/ubuntu xenial/main amd64 libffi-dev amd64 3.2.1-4 [161 kB]
Fetched 35.9 MB in 6s (5581 kB/s)
Selecting previously unselected package liberror-perl.
(Reading database ... 24067 files and directories currently installed.)
Preparing to unpack .../liberror-perl_0.17-1.2_all.deb ...
Unpacking liberror-perl (0.17-1.2) ...
Selecting previously unselected package git-man.
Preparing to unpack .../git-man_1%3a2.7.4-0ubuntu1.4_all.deb ...
Unpacking git-man (1:2.7.4-0ubuntu1.4) ...
Selecting previously unselected package git.
Preparing to unpack .../git_1%3a2.7.4-0ubuntu1.4_amd64.deb ...
Unpacking git (1:2.7.4-0ubuntu1.4) ...
Selecting previously unselected package libexpat1-dev:amd64.
Preparing to unpack .../libexpat1-dev_2.1.0-7ubuntu0.16.04.3_amd64.deb ...
Unpacking libexpat1-dev:amd64 (2.1.0-7ubuntu0.16.04.3) ...
Selecting previously unselected package libpython2.7:amd64.
Preparing to unpack .../libpython2.7_2.7.12-1ubuntu0~16.04.3_amd64.deb ...
Unpacking libpython2.7:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Selecting previously unselected package libpython2.7-dev:amd64.
Preparing to unpack .../libpython2.7-dev_2.7.12-1ubuntu0~16.04.3_amd64.deb ...
Unpacking libpython2.7-dev:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Selecting previously unselected package libpython-dev:amd64.
Preparing to unpack .../libpython-dev_2.7.12-1~16.04_amd64.deb ...
Unpacking libpython-dev:amd64 (2.7.12-1~16.04) ...
Selecting previously unselected package zlib1g-dev:amd64.
Preparing to unpack .../zlib1g-dev_1%3a1.2.8.dfsg-2ubuntu4.1_amd64.deb ...
Unpacking zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.1) ...
Selecting previously unselected package libssl-dev:amd64.
Preparing to unpack .../libssl-dev_1.0.2g-1ubuntu4.13_amd64.deb ...
Unpacking libssl-dev:amd64 (1.0.2g-1ubuntu4.13) ...
Selecting previously unselected package libssl-doc.
Preparing to unpack .../libssl-doc_1.0.2g-1ubuntu4.13_all.deb ...
Unpacking libssl-doc (1.0.2g-1ubuntu4.13) ...
Selecting previously unselected package python2.7-dev.
Preparing to unpack .../python2.7-dev_2.7.12-1ubuntu0~16.04.3_amd64.deb ...
Unpacking python2.7-dev (2.7.12-1ubuntu0~16.04.3) ...
Selecting previously unselected package python-dev.
Preparing to unpack .../python-dev_2.7.12-1~16.04_amd64.deb ...
Unpacking python-dev (2.7.12-1~16.04) ...
Selecting previously unselected package libffi-dev:amd64.
Preparing to unpack .../libffi-dev_3.2.1-4_amd64.deb ...
Unpacking libffi-dev:amd64 (3.2.1-4) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Setting up liberror-perl (0.17-1.2) ...
Setting up git-man (1:2.7.4-0ubuntu1.4) ...
Setting up git (1:2.7.4-0ubuntu1.4) ...
Setting up libexpat1-dev:amd64 (2.1.0-7ubuntu0.16.04.3) ...
Setting up libpython2.7:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Setting up libpython2.7-dev:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Setting up libpython-dev:amd64 (2.7.12-1~16.04) ...
Setting up zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.1) ...
Setting up libssl-dev:amd64 (1.0.2g-1ubuntu4.13) ...
Setting up libssl-doc (1.0.2g-1ubuntu4.13) ...
Setting up python2.7-dev (2.7.12-1ubuntu0~16.04.3) ...
Setting up python-dev (2.7.12-1~16.04) ...
Setting up libffi-dev:amd64 (3.2.1-4) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
--2018-10-11 07:54:22--  https://bootstrap.pypa.io/get-pip.py
Resolving bootstrap.pypa.io (bootstrap.pypa.io)... 2a04:4e42:3::175, 151.101.12.175
Connecting to bootstrap.pypa.io (bootstrap.pypa.io)|2a04:4e42:3::175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1661676 (1.6M) [text/x-python]
Saving to: 'get-pip.py'

get-pip.py                                           100%[====================================================================================================================>]   1.58M  4.60MB/s    in 0.3s

2018-10-11 07:54:23 (4.60 MB/s) - 'get-pip.py' saved [1661676/1661676]

The directory '/home/ubuntu/.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.
The directory '/home/ubuntu/.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.
Collecting pip
  Downloading https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl (1.3MB)
    100% |################################| 1.3MB 5.4MB/s
Collecting wheel
  Downloading https://files.pythonhosted.org/packages/fc/e9/05316a1eec70c2bfc1c823a259546475bd7636ba6d27ec80575da523bc34/wheel-0.32.1-py2.py3-none-any.whl
Installing collected packages: pip, wheel
Successfully installed pip-18.1 wheel-0.32.1
The directory '/home/ubuntu/.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.
The directory '/home/ubuntu/.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.
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/96/06/c8ee69628191285ddddffb277bd5abdf769166e7a14b867c2a172f0175b1/setuptools-40.4.3-py2.py3-none-any.whl (569kB)
    100% |################################| 573kB 15.5MB/s
Collecting urllib3
  Downloading https://files.pythonhosted.org/packages/bd/c9/6fdd990019071a4a32a5e7cb78a1d92c53851ef4f56f62a3486e6a7d8ffb/urllib3-1.23-py2.py3-none-any.whl (133kB)
    100% |################################| 143kB 8.2MB/s
Collecting requests
  Downloading https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl (91kB)
    100% |################################| 92kB 3.9MB/s
Collecting cryptography
  Downloading https://files.pythonhosted.org/packages/87/e6/915a482dbfef98bbdce6be1e31825f591fc67038d4ee09864c1d2c3db371/cryptography-2.3.1-cp27-cp27mu-manylinux1_x86_64.whl (2.1MB)
    100% |################################| 2.1MB 6.1MB/s
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages (18.1)
Collecting certifi>=2017.4.17 (from requests)
  Downloading https://files.pythonhosted.org/packages/df/f7/04fee6ac349e915b82171f8e23cee63644d83663b34c539f7a09aed18f9e/certifi-2018.8.24-py2.py3-none-any.whl (147kB)
    100% |################################| 153kB 2.5MB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests)
  Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
    100% |################################| 143kB 2.0MB/s
Collecting idna<2.8,>=2.5 (from requests)
  Downloading https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl (58kB)
    100% |################################| 61kB 11.5MB/s
Collecting enum34; python_version < "3" (from cryptography)
  Downloading https://files.pythonhosted.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography)
  Downloading https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)
    100% |################################| 102kB 3.9MB/s
Collecting cffi!=1.11.3,>=1.7 (from cryptography)
  Downloading https://files.pythonhosted.org/packages/14/dd/3e7a1e1280e7d767bd3fa15791759c91ec19058ebe31217fe66f3e9a8c49/cffi-1.11.5-cp27-cp27mu-manylinux1_x86_64.whl (407kB)
    100% |################################| 409kB 2.0MB/s
Collecting six>=1.4.1 (from cryptography)
  Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting ipaddress; python_version < "3" (from cryptography)
  Downloading https://files.pythonhosted.org/packages/fc/d0/7fc3a811e011d4b388be48a0e381db8d990042df54aa4ef4599a31d39853/ipaddress-1.0.22-py2.py3-none-any.whl
Collecting pycparser (from cffi!=1.11.3,>=1.7->cryptography)
  Downloading https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz (158kB)
    100% |################################| 163kB 1.9MB/s
Installing collected packages: setuptools, urllib3, certifi, chardet, idna, requests, enum34, asn1crypto, pycparser, cffi, six, ipaddress, cryptography
  Found existing installation: setuptools 20.7.0
    Uninstalling setuptools-20.7.0:
      Successfully uninstalled setuptools-20.7.0
  Running setup.py install for pycparser ... done
Successfully installed asn1crypto-0.24.0 certifi-2018.8.24 cffi-1.11.5 chardet-3.0.4 cryptography-2.3.1 enum34-1.1.6 idna-2.7 ipaddress-1.0.22 pycparser-2.19 requests-2.19.1 setuptools-40.4.3 six-1.11.0 urllib3-1.23
The directory '/home/ubuntu/.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.
The directory '/home/ubuntu/.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: urllib3 in /usr/local/lib/python2.7/dist-packages (1.23)
Requirement already up-to-date: cryptography in /usr/local/lib/python2.7/dist-packages (2.3.1)
Collecting ansible
  Downloading https://files.pythonhosted.org/packages/7c/4f/a1843687642b8e33637e312b9fb17ca7f68be0641131a92d883368dc6d1c/ansible-2.7.0.tar.gz (11.8MB)
    100% |################################| 11.8MB 964kB/s
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: asn1crypto>=0.21.0 in /usr/local/lib/python2.7/dist-packages (from cryptography) (0.24.0)
Requirement already satisfied, skipping upgrade: cffi!=1.11.3,>=1.7 in /usr/local/lib/python2.7/dist-packages (from cryptography) (1.11.5)
Requirement already satisfied, skipping upgrade: idna>=2.1 in /usr/local/lib/python2.7/dist-packages (from cryptography) (2.7)
Requirement already satisfied, skipping upgrade: six>=1.4.1 in /usr/local/lib/python2.7/dist-packages (from cryptography) (1.11.0)
Requirement already satisfied, skipping upgrade: ipaddress; python_version < "3" in /usr/local/lib/python2.7/dist-packages (from cryptography) (1.0.22)
Collecting jinja2 (from ansible)
  Downloading https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl (126kB)
    100% |################################| 133kB 1.4MB/s
Collecting PyYAML (from ansible)
  Downloading https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz (270kB)
    100% |################################| 276kB 1.8MB/s
Collecting paramiko (from ansible)
  Downloading https://files.pythonhosted.org/packages/cf/ae/94e70d49044ccc234bfdba20114fa947d7ba6eb68a2e452d89b920e62227/paramiko-2.4.2-py2.py3-none-any.whl (193kB)
    100% |################################| 194kB 845kB/s
Requirement already satisfied, skipping upgrade: setuptools in /usr/local/lib/python2.7/dist-packages (from ansible) (40.4.3)
Requirement already satisfied, skipping upgrade: pycparser in /usr/local/lib/python2.7/dist-packages (from cffi!=1.11.3,>=1.7->cryptography) (2.19)
Collecting MarkupSafe>=0.23 (from jinja2->ansible)
  Downloading https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz
Collecting pyasn1>=0.1.7 (from paramiko->ansible)
  Downloading https://files.pythonhosted.org/packages/d1/a1/7790cc85db38daa874f6a2e6308131b9953feb1367f2ae2d1123bb93a9f5/pyasn1-0.4.4-py2.py3-none-any.whl (72kB)
    100% |################################| 81kB 1.1MB/s
Collecting bcrypt>=3.1.3 (from paramiko->ansible)
  Downloading https://files.pythonhosted.org/packages/2e/5a/2abeae20ce294fe6bf63da0e0b5a885c788e1360bbd124edcc0429678a59/bcrypt-3.1.4-cp27-cp27mu-manylinux1_x86_64.whl (57kB)
    100% |################################| 61kB 1.2MB/s
Collecting pynacl>=1.0.1 (from paramiko->ansible)
  Downloading https://files.pythonhosted.org/packages/b3/25/e605574f24948a8a53b497744e93f061eb1dbe7c44b6465fc1c172d591aa/PyNaCl-1.3.0-cp27-cp27mu-manylinux1_x86_64.whl (762kB)
    100% |################################| 768kB 1.2MB/s
Installing collected packages: MarkupSafe, jinja2, PyYAML, pyasn1, bcrypt, pynacl, paramiko, ansible
  Running setup.py install for MarkupSafe ... done
  Running setup.py install for PyYAML ... done
  Running setup.py install for ansible ... done
Successfully installed MarkupSafe-1.0 PyYAML-3.13 ansible-2.7.0 bcrypt-3.1.4 jinja2-2.10 paramiko-2.4.2 pyasn1-0.4.4 pynacl-1.3.0
Cloning into '/tmp/.bench'...
remote: Enumerating objects: 260, done.
remote: Counting objects: 100% (260/260), done.
remote: Compressing objects: 100% (210/210), done.
remote: Total 260 (delta 16), reused 140 (delta 6), pack-reused 0
Receiving objects: 100% (260/260), 120.49 KiB | 0 bytes/s, done.
Resolving deltas: 100% (16/16), done.
Checking connectivity... done.
 [WARNING]: Unable to parse /etc/ansible/hosts as an inventory source

 [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] ***********************************************************************************************************************************************************************************************
changed: [localhost]

TASK [Set home folder perms] *************************************************************************************************************************************************************************************
changed: [localhost]

TASK [Set /tmp/.bench folder perms] ******************************************************************************************************************************************************************************
changed: [localhost]

TASK [Change default shell to bash] ******************************************************************************************************************************************************************************
changed: [localhost]

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

Passwords saved at ~/passwords.txt
 [WARNING]: Unable to parse /etc/ansible/hosts as an inventory source

 [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 localhost

TASK [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 specifying `pkg: {{ item }}`, please use `pkg:
[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']` 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.
changed: [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'])

TASK [common : include_tasks] ************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [common : include_tasks] ************************************************************************************************************************************************************************************
included: /tmp/.bench/playbooks/roles/common/tasks/ubuntu.yml for localhost

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 specifying `pkg: {{ item }}`, please use `pkg:
[u'libjpeg8-dev', u'libtiff4-dev', u'tcl8.5-dev', u'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` use `result 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 specifying `pkg: {{ item }}`, please use `pkg:
[u'libjpeg8-dev', u'libtiff5-dev', u'tcl8.6-dev', u'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` use `result 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.
changed: [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:25.027723", "end": "2018-10-11 07:57:51.433678", "msg": "non-zero return code", "rc": 1, "start": "2018-10-11 07:57:26.405955", "stderr": "Could not get properties: Connection timed out", "stderr_lines": ["Could not get properties: Connection timed out"], "stdout": "", "stdout_lines": []}
        to retry, use: --limit @/tmp/.bench/playbooks/site.retry

PLAY RECAP *******************************************************************************************************************************************************************************************************
localhost                  : ok=5    changed=2    unreachable=0    failed=1

Traceback (most recent call last):
  File "install.py", line 420, in <module>
    install_bench(args)
  File "install.py", line 122, in install_bench
    run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 338, 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
```

Easy Install on Ubuntu 16.04.5
#2

A search on ‘localectl timeout’ or just ‘localectl’ may give you clues to a problem with your container environment?


#3

thanks for the pointer.

  1. I have seen the same in problematic behaviour 2 different Container environments (ubuntu 18.04 server with LXD 3.5 & proxmox) though. So I am not sure whether both would misbehave in the exact same way.
  2. It has worked without any problem (ubuntu 16.04. with LXD) a while back.

I’ll look into this nevertheless and report back if there is any cure coming.


#4

So according to me this is a general problem with using the easy install script in a container based virtualization system. localectl set the locale for the system, however these settings are not covered in the container you create. The container assumes the locale of the host system it is running on. The same issue occurs when someone tries to use the install script in docker.

To talk about the fix, I’m thinking of adding a --container flag which won’t issue commands not available inside the container. I’ll add it as and when time permits. Or maybe you can contribute it… If you do choose to contribute you’ll have to modify the install.py file to include an additional --container flag and also modify the playbook/site.yml file to conditionally execute the locale role based on the container flag mentioned above. Mind you, this won’t be the final fix. This’ll just mitigate the error you’ve posted.


#5

thanks for pinking up on this issue again,

I can not find any localectl command in the install.py script so I wonder whether this is really behind all this.

in my case (a common scenario I guess) the locale (host & LXD container as you say) is LANG=en_US.utf8 so that should not be a problem for the installation? I mean I am talking here from a pretty limited understanding but it does not seem logical to me. Also I assume you could run a localctl command inside the containe and likewise get the locale u want (if that was required)

What I have noticed though is that by default the output of date differs. The container seems to be in UTC (no matter the host). In my case this is 2 hrs off the date on my host (central european summertime) could that cause a problem? (that was rubish, datetime is the same on the host and inside the container.)

I’d love to help, but unfortunately my python is = 0 I’m afraid. Let me try to go through a manual install in a container once again. But I never got this running neither thus far (maybe due to not being sufficiently stubborn)


#6

We use ansible for ths installation. Great tool for automation. So the install.py invokes the site.yml which invokes the locale role, which I presume internally uses localectl to set the locale. This is where the failure occurs.

I’m not sure on this one. But according to me it shouldn’t work. Can you try executing

localectl status

from inside the container and tell me the output.

You gotta wait then :wink: … I’ll do it when I get some free time. I for one have a limited knowledge of LXD and LXC.


#7

yea, I thougt something among those lines. Using localectl must be something that wasn’t always in play though. As mentiond I haven’t had any problems with the sctip inside containers when I tried this ealier (maybe about a year ago)

true, this doesn’t work. I’ll try to dig a little more into this