Install Error on Ubuntu 16.04 - TASK [locale : Check current locale]

Hi Team,

Your help is needed. I’m trying to setup bench on a new server but getting the following error:

TASK [locale : Check current locale] ***************************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: “localectl”, “delta”: “0:00:00.060759”, “end”: “2017-10-22 21:00:27.960774”, “failed”: true, “rc”: 1, “start”: “2017-10-22 21:00:27.900015”, “stderr”: “Could not get properties: Connection timed out”, “stderr_lines”: [“Could not get properties: Connection timed out”], “stdout”: “”, “stdout_lines”: []}

Full log is (2nd try on same server after manually selecting the Locale):

root@pro-enterprise-9:~# sudo python install.py --production
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Fetched 204 kB in 0s (407 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).
libffi-dev is already the newest version (3.2.1-4).
python-dev is already the newest version (2.7.11-1).
python-setuptools is already the newest version (20.7.0-1).
git is already the newest version (1:2.7.4-0ubuntu1.3).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.8).
0 upgraded, 0 newly installed, 0 to remove and 93 not upgraded.
Requirement already up-to-date: setuptools in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied: ansible==2.3.1 in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied: PyYAML in /usr/lib/python2.7/dist-packages (from ansible==2.3.1)
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (from ansible==2.3.1)
Requirement already satisfied: jinja2 in /usr/local/lib/python2.7/dist-packages (from ansible==2.3.1)
Requirement already satisfied: paramiko in /usr/local/lib/python2.7/dist-packages (from ansible==2.3.1)
Requirement already satisfied: pycrypto>=2.6 in /usr/local/lib/python2.7/dist-packages (from ansible==2.3.1)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python2.7/dist-packages (from jinja2->ansible==2.3.1)
Requirement already satisfied: pynacl>=1.0.1 in /usr/local/lib/python2.7/dist-packages (from paramiko->ansible==2.3.1)
Requirement already satisfied: cryptography>=1.5 in /usr/local/lib/python2.7/dist-packages (from paramiko->ansible==2.3.1)
Requirement already satisfied: bcrypt>=3.1.3 in /usr/local/lib/python2.7/dist-packages (from paramiko->ansible==2.3.1)
Requirement already satisfied: pyasn1>=0.1.7 in /usr/local/lib/python2.7/dist-packages (from paramiko->ansible==2.3.1)
Requirement already satisfied: six in /usr/local/lib/python2.7/dist-packages (from pynacl>=1.0.1->paramiko->ansible==2.3.1)
Requirement already satisfied: cffi>=1.4.1 in /usr/local/lib/python2.7/dist-packages (from pynacl>=1.0.1->paramiko->ansible==2.3.1)
Requirement already satisfied: enum34; python_version < "3" in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.5->paramiko->ansible==2.3.1)
Requirement already satisfied: idna>=2.1 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.5->paramiko->ansible==2.3.1)
Requirement already satisfied: asn1crypto>=0.21.0 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.5->paramiko->ansible==2.3.1)
Requirement already satisfied: ipaddress; python_version < "3" in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.5->paramiko->ansible==2.3.1)
Requirement already satisfied: pycparser in /usr/local/lib/python2.7/dist-packages (from cffi>=1.4.1->pynacl>=1.0.1->paramiko->ansible==2.3.1)
Cloning into '/tmp/.bench'...
remote: Counting objects: 243, done.
remote: Compressing objects: 100% (190/190), done.
remote: Total 243 (delta 10), reused 160 (delta 7), pack-reused 0
Receiving objects: 100% (243/243), 7.07 MiB | 6.23 MiB/s, done.
Resolving deltas: 100% (10/10), done.
Checking connectivity... done.
 [WARNING]: Host file not found: /etc/ansible/hosts

 [WARNING]: provided hosts list is empty, only localhost is available


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

TASK [Gathering Facts] *****************************************************************************
ok: [localhost]

TASK [Create user] *********************************************************************************
changed: [localhost]

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

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

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

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

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
 [WARNING]: Host file not found: /etc/ansible/hosts

 [WARNING]: provided hosts list is empty, only localhost is available


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

TASK [Gathering Facts] *****************************************************************************
ok: [localhost]

PLAY [Setup prerequisites] *************************************************************************

TASK [Gathering Facts] *****************************************************************************
ok: [localhost]

TASK [Install yum packages] ************************************************************************
skipping: [localhost] => (item=[])

TASK [Install apt packages] ************************************************************************
ok: [localhost] => (item=[u'build-essential', u'software-properties-common', 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'python-pip', u'python-tk', u'redis-server', u'screen', u'vim', u'xfonts-75dpi', u'xfonts-base', u'zlib1g-dev', u'apt-transport-https', u'libsasl2-dev', u'libldap2-dev'])

TASK [install pillow prerequisites for Ubuntu < 14.04] *********************************************
skipping: [localhost] => (item=[])

TASK [install pillow prerequisites for Ubuntu >= 14.04] ********************************************
ok: [localhost] => (item=[u'libjpeg8-dev', u'libtiff5-dev', u'tcl8.6-dev', u'tk8.6-dev'])

TASK [Setup OpenSSL dependancy] ********************************************************************
skipping: [localhost]

TASK [install pillow prerequisites for Debian < 8] *************************************************
skipping: [localhost] => (item=[])

TASK [install pillow prerequisites for Debian >= 8] ************************************************
skipping: [localhost] => (item=[])

TASK [install prequisites for macos] ***************************************************************
skipping: [localhost] => (item=[])

PLAY [Apply basic roles, mariadb, wkhtmltopdf, nodejs, nginx, fail2ban and psutil] *****************

TASK [Gathering Facts] *****************************************************************************
ok: [localhost]

TASK [locale : Check current locale] ***************************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "localectl", "delta": "0:00:00.060759", "end": "2017-10-22 21:00:27.960774", "failed": true, "rc": 1, "start": "2017-10-22 21:00:27.900015", "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/production/install.retry

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

Traceback (most recent call last):
  File "install.py", line 388, in <module>
    install_bench(args)
  File "install.py", line 114, in install_bench
    run_playbook('production/install.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 326, 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', 'production/install.yml', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=frappe']' returned non-zero exit status 2

All I know is that ansible scripts the install process steps for various environments -

frappe@erpnext:~/frappe-bench$ find … -name playbooks | xargs ls -al
total 32
drwxrwxr-x 5 frappe frappe 4096 Oct 13 19:28 .
drwxrwxr-x 9 frappe frappe 4096 Sep 5 21:25 …
drwxrwxr-x 4 frappe frappe 4096 Oct 13 19:28 develop
-rw-rw-r-- 1 frappe frappe 0 Oct 12 2016 init.py
-rwxrwxr-x 1 frappe frappe 12025 Oct 13 19:28 install.py
drwxrwxr-x 4 frappe frappe 4096 Oct 13 19:28 prerequisites
drwxrwxr-x 3 frappe frappe 4096 Oct 13 19:28 production

Here is the ansible repository https://github.com/frappe/bench/tree/master/playbooks

Here’s your fatal error:

fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: “localectl”, “delta”: “0:00:00.060759”, “end”: “2017-10-22 21:00:27.960774”, “failed”: true, “rc”: 1, “start”: “2017-10-22 21:00:27.900015”, “stderr”: “Could not get properties: Connection timed out”, “stderr_lines”: [“Could not get properties: Connection timed out”], “stdout”: “”, “stdout_lines”: []}

My guess the connection timeout is to this? http://archive.ubuntu.com/ubuntu

And this is apparently the ansible step https://github.com/frappe/bench/search?utf8=✓&q=localectl&type=

Here is my local for example:

frappe@erpnext:~/frappe-bench$ localectl
System Locale: LANG=en_US.UTF-8
VC Keymap: n/a
X11 Layout: us
X11 Model: pc105

I run VM ERPNext instances so am not acquainted with the install process…

hope this helps.

1 Like

Thank you for your response @clarkej

I run localectl on got a time out

root@pe:~# localectl
Could not get properties: Connection timed out

Problem is that I’m getting the same response on my live server from the same provider. I am not sure why, maybe there’s a related issue. I’m I running it within the wrong directory? If so then there’s no way to tell on my new server because I dont yet have bench.

A ping to archive.ubuntu.com is working fine. I can also see this in my sources.

Thanks again.

@adam26d i have the same problem with scaleway i switched to linode.

regards

1 Like

Thank you @SOLOSOFT

I’ve messaged scale way and been asked to post on the community (IKR :sweat:). Lets see if they’ll acknowledge or do anything.

Any other ideas/ resolutions on scaleway?

Yep. Been there, seen those errors on Scaleway. I did a manual install on a new server and after a series of errors finally managed to make it after keeping at it relentlessly for a couple of days. I really can’t even remember all errors I got. But I got a lot, but nothing I couldn’t solve with a bit of time. But you’re probably better off switching to another service provider.

Thanks

Jay

2 Likes

I’ve just switched to Linode. Now I’ve to do data transfers :sweat:, deal with email issues, certificates.

also in scaleway they use atom processor instead of xeon which better in linode or others.

I losed 6 days in scaleway trying to figure out whats the problem no success i followed the hard way in installation but not satifid with so i switch (i already tried on linode, amazon, digitalocean works good).

regards

1 Like