Error (NO MORE HOSTS LEFT) on ubuntu 16.4 LTS

hi all

I am new to erpnext.(this is my first topic )

i use this command for installation
sudo python install.py --production

after that this error genarted
please help me for installation

TASK [Check ERPNext App exists] ************************************************
ok: [localhost]

TASK [Get-app erpnext app] *****************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “get-app”, “erpnext”, “GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)”, “–branch”, “master”], “delta”: “0:08:58.066302”, “end”: “2016-12-24 21:43:08.962165”, “failed”: true, “rc”: 1, “start”: “2016-12-24 21:34:10.895863”, “stderr”: “INFO:bench.app:getting app erpnext\nCloning into ‘erpnext’…\nChecking out files: 31% (1415/4478) \rChecking out files: 32% (1433/4478) \rChecking out files: 33% (1478/4478) \rChecking out files: 34% (1523/4478) \rChecking out files: 35% (1568/4478) \rChecking out files: 36% (1613/4478) \rChecking out files: 37% (1657/4478) \rChecking out files: 38% (1702/4478) \rChecking out files: 39% (1747/4478) \rChecking out files: 40% (1792/4478) \rChecking out files: 41% (1836/4478) \rChecking out files: 42% (1881/4478) \rChecking out files: 43% (1926/4478) \rChecking out files: 44% (1971/4478) \rChecking out files: 45% (2016/4478) \rChecking out files: 46% (2060/4478) \rChecking out files: 47% (2105/4478) \rChecking out files: 48% (2150/4478) \rChecking out files: 49% (2195/4478) \rChecking out files: 50% (2239/4478) \rChecking out files: 51% (2284/4478) \rChecking out files: 52% (2329/4478) \rChecking out files: 53% (2374/4478) \rChecking out files: 54% (2419/4478) \rChecking out files: 55% (2463/4478) \rChecking out files: 56% (2508/4478) \rChecking out files: 57% (2553/4478) \rChecking out files: 58% (2598/4478) \rChecking out files: 59% (2643/4478) \rChecking out files: 60% (2687/4478) \rChecking out files: 61% (2732/4478) \rChecking out files: 62% (2777/4478) \rChecking out files: 63% (2822/4478) \rChecking out files: 64% (2866/4478) \rChecking out files: 65% (2911/4478) \rChecking out files: 66% (2956/4478) \rChecking out files: 67% (3001/4478) \rChecking out files: 68% (3046/4478) \rChecking out files: 69% (3090/4478) \rChecking out files: 70% (3135/4478) \rChecking out files: 71% (3180/4478) \rChecking out files: 72% (3225/4478) \rChecking out files: 73% (3269/4478) \rChecking out files: 74% (3314/4478) \rChecking out files: 75% (3359/4478) \rChecking out files: 76% (3404/4478) \rChecking out files: 77% (3449/4478) \rChecking out files: 78% (3493/4478) \rChecking out files: 79% (3538/4478) \rChecking out files: 80% (3583/4478) \rChecking out files: 81% (3628/4478) \rChecking out files: 82% (3672/4478) \rChecking out files: 83% (3717/4478) \rChecking out files: 84% (3762/4478) \rChecking out files: 85% (3807/4478) \rChecking out files: 86% (3852/4478) \rChecking out files: 87% (3896/4478) \rChecking out files: 88% (3941/4478) \rChecking out files: 89% (3986/4478) \rChecking out files: 90% (4031/4478) \rChecking out files: 91% (4075/4478) \rChecking out files: 92% (4120/4478) \rChecking out files: 93% (4165/4478) \rChecking out files: 94% (4210/4478) \rChecking out files: 95% (4255/4478) \rChecking out files: 96% (4299/4478) \rChecking out files: 97% (4344/4478) \rChecking out files: 98% (4389/4478) \rChecking out files: 99% (4434/4478) \rChecking out files: 100% (4478/4478) \rChecking out files: 100% (4478/4478), done.\nINFO:bench.app:installing erpnext\n/home/frappe/frappe-bench/env/bin/python: No module named _mysql”, “stdout”: “installing erpnext”, “stdout_lines”: [“installing erpnext”], “warnings”: []}

NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @production/install.retry

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

Traceback (most recent call last):
File “install.py”, line 351, in
install_bench(args)
File “install.py”, line 111, in install_bench
run_playbook(‘production/install.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 301, 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

thanks
Vinayak Patil

Try to install in Ubuntu 14.

I already install it on ubuntu 16.04lts with the same command without any error.
Can you try to try apt-get update before execute the installation command.

Thanks for reply.
I will try today

not working

tried
1.apt-get update
2.removed node and npm from your machine and then re-running the script. (I always get error from ansible: NO MORE HOSTS LEFT - #6 by shreyasp) hint by @shreyasp

traceback after execute -sudo python install.py --production

vin@vin-laptop:~$ sudo python install.py --production
[sudo] password for vin:
Hit:1 Index of /ubuntu xenial InRelease
Hit:2 http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu xenial InRelease
Get:3 Index of /ubuntu xenial-security InRelease [102 kB]
Get:4 Index of /ubuntu xenial-updates InRelease [102 kB]
Hit:5 https://deb.nodesource.com/node_6.x xenial InRelease
Get:6 Index of /ubuntu xenial-backports InRelease [102 kB]
Fetched 306 kB in 1s (170 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).
git is already the newest version (1:2.7.4-0ubuntu1).
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).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.5).
The following packages were automatically installed and are no longer required:
gyp libjs-inherits libjs-node-uuid libuv1 libuv1-dev
Use ‘sudo apt autoremove’ to remove them.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
The directory ‘/home/vin/.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/vin/.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
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages
The directory ‘/home/vin/.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/vin/.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 satisfied: ansible==2.0.2.0 in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied: PyYAML in /usr/local/lib/python2.7/dist-packages (from ansible==2.0.2.0)
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (from ansible==2.0.2.0)
Requirement already satisfied: jinja2 in /usr/local/lib/python2.7/dist-packages (from ansible==2.0.2.0)
Requirement already satisfied: paramiko in /usr/local/lib/python2.7/dist-packages (from ansible==2.0.2.0)
Requirement already satisfied: pycrypto>=2.6 in /usr/local/lib/python2.7/dist-packages (from ansible==2.0.2.0)
Requirement already satisfied: MarkupSafe in /usr/local/lib/python2.7/dist-packages (from jinja2->ansible==2.0.2.0)
Requirement already satisfied: pyasn1>=0.1.7 in /usr/local/lib/python2.7/dist-packages (from paramiko->ansible==2.0.2.0)
Requirement already satisfied: cryptography>=1.1 in /usr/local/lib/python2.7/dist-packages (from paramiko->ansible==2.0.2.0)
Requirement already satisfied: ipaddress in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied: six>=1.4.1 in /usr/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied: enum34 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied: idna>=2.0 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied: cffi>=1.4.1 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied: pycparser in /usr/local/lib/python2.7/dist-packages (from cffi>=1.4.1->cryptography>=1.1->paramiko->ansible==2.0.2.0)
[WARNING]: Host file not found: /etc/ansible/hosts

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

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

TASK [setup] *******************************************************************
ok: [localhost]

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

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

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

TASK [Set /tmp/.bench folder perms] ********************************************
changed: [localhost]
[WARNING]: Consider using file module with owner rather than running chown

PLAY RECAP *********************************************************************
localhost : ok=4 changed=1 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 [setup] *******************************************************************
ok: [localhost]

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

TASK [setup] *******************************************************************
ok: [localhost]

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

TASK [setup] *******************************************************************
ok: [localhost]

TASK [install prequisites] *****************************************************
skipping: [localhost] => (item=cmake)
skipping: [localhost] => (item=redis)
skipping: [localhost] => (item=mariadb)
skipping: [localhost] => (item=nodejs)

TASK [cask installs] ***********************************************************
skipping: [localhost] => (item=wkhtmltopdf)

TASK [include] *****************************************************************
skipping: [localhost]

TASK [include] *****************************************************************
skipping: [localhost]

TASK [include] *****************************************************************
skipping: [localhost]

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

TASK [setup] *******************************************************************
ok: [localhost]

TASK [install prequisites] *****************************************************
ok: [localhost] => (item=[u’build-essential’, u’redis-server’, u’software-properties-common’, u’libxrender1’, u’libxext6’, u’xfonts-75dpi’, u’xfonts-base’, u’libjpeg8-dev’, u’zlib1g-dev’, u’libfreetype6-dev’, u’liblcms2-dev’, u’libwebp-dev’, u’python-tk’, 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’libtiff5-dev’, u’tcl8.6-dev’, u’tk8.6-dev’])

TASK [Add apt key for node repo] ***********************************************
ok: [localhost]

TASK [Add repo] ****************************************************************
ok: [localhost]

TASK [Install nodejs 6.x] ******************************************************
changed: [localhost]

TASK [include] *****************************************************************
included: /tmp/.bench/playbooks/develop/includes/mariadb_ubuntu.yml for localhost

TASK [Add apt key for mariadb for Ubuntu < 16.04] ******************************
skipping: [localhost]

TASK [Add apt key for mariadb for Ubuntu >= 16.04] *****************************
ok: [localhost]

TASK [Add apt repository] ******************************************************
ok: [localhost]

TASK [Unattended package installation] *****************************************
changed: [localhost]

TASK [apt-get install] *********************************************************
ok: [localhost] => (item=[u’mariadb-server’, u’mariadb-client’, u’mariadb-common’, u’libmariadbclient-dev’])

TASK [include] *****************************************************************
included: /tmp/.bench/playbooks/develop/includes/wkhtmltopdf.yml for localhost

TASK [download wkthmltox linux] ************************************************
ok: [localhost]

TASK [Creates directory] *******************************************************
ok: [localhost]

TASK [unarchive wkhtmltopdf] ***************************************************
changed: [localhost]

TASK [copy to /usr/local/bin] **************************************************
ok: [localhost]

TASK [make wkhtmltopdf executable] *********************************************
ok: [localhost]

TASK [include] *****************************************************************
included: /tmp/.bench/playbooks/develop/includes/setup_mariadb.yml for localhost

TASK [Install MySQLdb in global env] *******************************************
ok: [localhost]

TASK [Add configuration] *******************************************************
changed: [localhost]

TASK [restart mysql linux] *****************************************************
changed: [localhost]

TASK [Set root Password] *******************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“mysqladmin”, “-u”, “root”, “password”, “vgvg@2020”], “delta”: “0:00:00.008655”, “end”: “2016-12-27 20:15:24.433145”, “failed”: true, “rc”: 1, “start”: “2016-12-27 20:15:24.424490”, “stderr”: “\u0007mysqladmin: connect to server at ‘localhost’ failed\nerror: ‘Access denied for user ‘root’@‘localhost’ (using password: NO)’”, “stdout”: “”, “stdout_lines”: [], “warnings”: []}
…ignoring

TASK [add launchagents folder mac] *********************************************
skipping: [localhost]

TASK [add mysql to mac startup] ************************************************
skipping: [localhost]

TASK [stop mysql mac] **********************************************************
skipping: [localhost]

TASK [start mysql mac] *********************************************************
skipping: [localhost]

TASK [debug] *******************************************************************
ok: [localhost] => {
“run_travis”: false
}

TASK [include] *****************************************************************
included: /tmp/.bench/playbooks/develop/includes/setup_bench.yml for localhost

TASK [Check if /tmp/.bench exists] *********************************************
ok: [localhost]

TASK [Check if bench_repo_path exists] *****************************************
ok: [localhost]

TASK [move /tmp/.bench if it exists] *******************************************
skipping: [localhost]

TASK [install bench] ***********************************************************
changed: [localhost]

TASK [Check whether bench exists] **********************************************
ok: [localhost]

TASK [init bench] **************************************************************
skipping: [localhost]

TASK [setup config] ************************************************************
ok: [localhost]

TASK [install frappe app] ******************************************************
ok: [localhost]

TASK [include] *****************************************************************
skipping: [localhost]

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

TASK [setup] *******************************************************************
ok: [localhost]

TASK [development tools package] ***********************************************
skipping: [localhost]

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

TASK [Import Node source RPM key] **********************************************
skipping: [localhost]

TASK [Add Node Repo] ***********************************************************
skipping: [localhost]

TASK [Install nodejs] **********************************************************
skipping: [localhost]

TASK [include] *****************************************************************
skipping: [localhost]

TASK [include] *****************************************************************
skipping: [localhost]

TASK [include] *****************************************************************
skipping: [localhost]

TASK [include] *****************************************************************
skipping: [localhost]

TASK [include] *****************************************************************
skipping: [localhost]

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

TASK [setup] *******************************************************************
ok: [localhost]

TASK [Add dotdeb apt repository key for Debian < 8] ****************************
skipping: [localhost]

TASK [Add dotdeb apt repository for redis-server for Debian < 8] ***************
skipping: [localhost]

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

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

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

TASK [Add apt key for node repo] ***********************************************
skipping: [localhost]

TASK [Add repo] ****************************************************************
skipping: [localhost]

TASK [Install nodejs 6.x] ******************************************************
skipping: [localhost]

TASK [include] *****************************************************************
skipping: [localhost]

TASK [include] *****************************************************************
skipping: [localhost]

TASK [include] *****************************************************************
skipping: [localhost]

TASK [debug] *******************************************************************
skipping: [localhost]

TASK [include] *****************************************************************
skipping: [localhost]

TASK [include] *****************************************************************
skipping: [localhost]

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

TASK [setup] *******************************************************************
ok: [localhost]

TASK [Add nginx apt repository key for Debian < 8] *****************************
skipping: [localhost]

TASK [Add nginx apt repository for Debian < 8] *********************************
skipping: [localhost]

TASK [Install production pre-requisites] ***************************************
ok: [localhost] => (item=[u’nginx’, u’screen’, u’vim’, u’htop’, u’git’, u’postfix’, u’supervisor’])

TASK [Install production pre-requisites] ***************************************
skipping: [localhost] => (item=[])

TASK [Install supervisor using yum for Centos 7] *******************************
skipping: [localhost]

TASK [Rename default nginx.conf to nginx.conf.old] *****************************
changed: [localhost]

TASK [Copy the nginx_config template] ******************************************
changed: [localhost]

TASK [Reload the nginx service] ************************************************
changed: [localhost]

TASK [Set InnoDB buffer pool] **************************************************
skipping: [localhost]

TASK [Set InnoDB buffer pool] **************************************************
changed: [localhost]

TASK [Enable nginx, mysql, and redis] ******************************************
ok: [localhost] => (item=nginx)
ok: [localhost] => (item=mysql)

TASK [Enable redis.service on centos] ******************************************
skipping: [localhost]

TASK [Enable redis-server.service on ubuntu] ***********************************
ok: [localhost]

TASK [Check whether default supervisor.conf exists] ****************************
skipping: [localhost]

TASK [Check whether default supervisor.conf exists] ****************************
ok: [localhost]

TASK [insert/update inputrc for history] ***************************************
ok: [localhost]

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

TASK [setup] *******************************************************************
ok: [localhost]

TASK [Check whether a site exists] *********************************************
ok: [localhost]

TASK [Create new site] *********************************************************
skipping: [localhost]

TASK [Check ERPNext App exists] ************************************************
ok: [localhost]

TASK [Get-app erpnext app] *****************************************************
skipping: [localhost]

TASK [Install erpnext app] *****************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “–site”, “site1.local”, “install-app”, “erpnext”], “delta”: “0:00:00.760885”, “end”: “2016-12-27 20:15:41.792564”, “failed”: true, “rc”: 1, “start”: “2016-12-27 20:15:41.031679”, “stderr”: “/home/frappe/frappe-bench/env/bin/python: No module named _mysql”, “stdout”: “”, “stdout_lines”: [], “warnings”: []}

NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @production/install.retry

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

Traceback (most recent call last):
File “install.py”, line 351, in
install_bench(args)
File “install.py”, line 111, in install_bench
run_playbook(‘production/install.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 301, 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 may remove the mariadb-server and try again

Thank you @lukptr

1 Like