Easy installation fails on TASK [locale : Check current locale] in Ubuntu 16.04

I’m trying to install ERPnext with the “easy install” in a clean Ubuntu 16.04 for the last 76 hours, but this seems to be an impossible mission, even following step by step all instructions.

I’m working on a virtual server under OpenVZ container and the error I’m getting is follow, but if I run localectl I’m getting the same error.

TASK [locale : Check current locale] ********************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: “localectl”, “delta”: “0:00:00.026894”, “end”: “2018-01-13 22:53:33.758756”, “failed”: true, “rc”: 1, “start”: “2018-01-13 22:53:33.731862”, “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=2 unreachable=0 failed=1

Traceback (most recent call last):
File “install.py”, line 388, in
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

You found these and none offer clues?
Search results for 'subprocess.CalledProcessError: Command ‘[‘ansible-playbook’' - Frappe Forum

Thanks John, I double check all these issues and just couple has problems with localectl and none of them has been solved.

If you’re desperate you could change your locales setting? Obviously this is only useful for a demo or test …

I think this may be an issue specific to running in a openvz container.

I noticed a similar issue from a few days back where they had same type of issue with locales running on Proxmox which uses lxc containers. I found when using openvz that sometimes applications don’t install correctly very occasionally with openvz

You may want to try on a ‘normal’ Linux server or look at the locales settings on the host that get offered to the guest container

1 Like

Thanks, Julian. Yes, I’m really desperate and frustrated :frowning: I’ve installed ERPNext almost 30 times, trying different users, different OS (Ubuntu 16.04, 14.04, CentOs, even in VirtualBox) and a lot of things and always I get some kind of error. Four days and I still didn’t get any successful installation and nothing seems it can change that.

I think I need to start again from the beginning, with patience,… or maybe Linux is not for me definitely.

The ERPNext install script is extremely clever but it does rely on a number of other services and applications which themselves change in small ways due to updates on an operating system or security alerts or bugs. These can very occasionally break the script running perfectly.

EG there is a security issue with Lets Encrypt for obtaining free SSL certificates. For a time there was no automatic means to create these certs a few days back for anyone using Lets Encrypt on any system let alone ERPNext. The devs here did put together a very quick turnaround and it seems to be fixed now.

This highlights the potential for breakage due to circumstances out of their control so to speak.

I think a blank canvas approach may be a good plan.

Otherwise get yourself a cheap Virtual Private server from digital Ocean or Linode or OVH for about £10 a month to play with and you can ‘snapshot’ your entire server install so you can roll back when you get a problem and start from a clean Ubuntu 16.04 OS in a few mins at most .

demo.erpnext.com is also useful. Or a simpler bet to start with may be just to try Frappe’s free trial which i think lats 30 adsy but they may extend a bit if you ask them nicely. Or you could go on the Jobs section and post a small bounty for someone to create a working install in a VPS for you …

Hope this helps

I resolved this by first running:

apt install ntpdate
ntpdate -u 0.ubuntu.pool.ntp.org 

This resolved the localectl issue.

Should now produce a normal output in stead of the cannot connect error

Had the same problem last year