ERPNext Conference 2019* ERPNext.com Blog

Failed to install ERPNext using production image and also manual installation


#1

I would like to be assisted. I failed to install using the production image.

I tried the manual installation using tutorials on the web still failed.

what can I do


Installing the Latest Frappé and ERPNext Master Branches in Production Mode
#2

A little more details needed to help you. Specific error?


#3

try easy install instruction on ubuntu 16.04


#4
bench@ubuntu:~$ bench init erpnext && cd erpnext
INFO:bench.utils:virtualenv -q env -p /usr/bin/python
Already using interpreter /usr/bin/python
INFO:bench.utils:env/bin/pip -q install --upgrade pip
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 '/opt/bench/.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 '/opt/bench/.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.
INFO:bench.utils:env/bin/pip -q install wheel
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 '/opt/bench/.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 '/opt/bench/.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.
INFO:bench.utils:env/bin/pip -q install six
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 '/opt/bench/.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 '/opt/bench/.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.
INFO:bench.utils:env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit
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 '/opt/bench/.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 '/opt/bench/.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.
INFO:bench.app:getting app frappe
INFO:bench.utils:git clone https://github.com/frappe/frappe.git   --origin upstream
Cloning into 'frappe'...
remote: Enumerating objects: 27, done.
remote: Counting objects: 100% (27/27), done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 182947 (delta 10), reused 1 (delta 0), pack-reused 182920
Receiving objects: 100% (182947/182947), 203.23 MiB | 1.21 MiB/s, done.
Resolving deltas: 100% (140119/140119), done.
('installing', u'frappe')
INFO:bench.app:installing frappe
INFO:bench.utils:erpnext/env/bin/pip install -q  -e erpnext/apps/frappe 
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 '/opt/bench/.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 '/opt/bench/.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.
  WARNING: Building wheel for markdown2 failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/07'
  WARNING: Building wheel for maxminddb-geolite2 failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/94'
  WARNING: Building wheel for html2text failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/eb'
  WARNING: Building wheel for email-reply-parser failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/d1'
  WARNING: Building wheel for watchdog failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/e2'
  WARNING: Building wheel for bleach-whitelist failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/be'
  WARNING: Building wheel for zxcvbn-python failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/0d'
  WARNING: Building wheel for PyPDF2 failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/53'
  WARNING: Building wheel for openpyxl failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/82'
  WARNING: Building wheel for pyqrcode failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/54'
  WARNING: Building wheel for pypng failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/a4'
  WARNING: Building wheel for future failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/0c'
  WARNING: Building wheel for google-api-python-client failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/6c'
  WARNING: Building wheel for maxminddb failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/58'
  WARNING: Building wheel for simplegeneric failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/a9'
  WARNING: Building wheel for PyYAML failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/16'
  WARNING: Building wheel for pathtools failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/0b'
  WARNING: Building wheel for et-xmlfile failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/2a'
  WARNING: Building wheel for cssutils failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/a4'
  WARNING: Building wheel for httplib2 failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/e4'
  WARNING: Building wheel for scandir failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/91'
  WARNING: Building wheel for pycparser failed: [Errno 13] Permission denied: '/opt/bench/.cache/pip/wheels/f2'
Updating node packages...
INFO:bench.utils:yarn install
yarn install v1.16.0
warning Skipping preferred cache folder "/opt/bench/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1001".
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > bootstrap@4.3.1" has unmet peer dependency "jquery@1.9.1 - 3".
warning " > bootstrap@4.3.1" has unmet peer dependency "popper.js@^1.14.7".
[4/4] Building fresh packages...
[1/2] ⠄ cypress
error /opt/bench/erpnext/apps/frappe/node_modules/cypress: Command failed.
Exit code: 1
Command: node index.js --exec install
Arguments: 
Directory: /opt/bench/erpnext/apps/frappe/node_modules/cypress
Output:
Cypress cannot write to the cache directory due to file permissions
----------

Failed to access /opt/bench/.cache/Cypress:

EACCES: permission denied, mkdir '/opt/bench/.cache/Cypress'
----------

Platform: linux (Ubuntu Linux - 18.04)
Cypress Version: 3.1.5

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/opt/bench/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/opt/bench/bench-repo/bench/commands/make.py", line 30, in init
    python 		 = python)
  File "/opt/bench/bench-repo/bench/utils.py", line 83, in init
    update_node_packages(bench_path=path)
  File "/opt/bench/bench-repo/bench/utils.py", line 452, in update_node_packages
    update_yarn_packages(bench_path)
  File "/opt/bench/bench-repo/bench/utils.py", line 465, in update_yarn_packages
    exec_cmd('yarn install', cwd=app_path)
  File "/opt/bench/bench-repo/bench/utils.py", line 159, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: yarn install

#5

You have probably run the installation as a root user. Installation should run by bench user


#6

No I did not run the installation as root user. I run the installation using bench as be
cd /opt/bench
bench init erpnext && cd erpnext
e.g
bench@ubuntu:~$ cd /opt/bench
bench@ubuntu:~$ bench init erpnext && cd erpnext


#7

Please get me a link


#8

Either case, it looks like bench user doesn’t own /opt/bench.
You can confirm that by running ls -ld /opt/bench

You may then try to change ownership with sudo chown -R bench:bench /opt/bench


#9

#10

#11

I am almost giving up. What is the problem with this step?

HEY! USE SCREEN [tomssemwogerere@erpnext ~]$ python install.py --develop --user tomssemwogerere

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

[sudo] password for tomssemwogerere:
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile

  • base: centos.mirror.liquidtelecom.com
  • epel: mirror.omnilance.com
  • extras: centos.mirror.liquidtelecom.com
  • updates: centos.mirror.liquidtelecom.com
    Maybe run: yum groups mark install (see man yum)
    No packages in any requested group available to install or update
    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
  • base: centos.mirror.liquidtelecom.com
  • epel: ftp.plusline.net
  • extras: centos.mirror.liquidtelecom.com
  • updates: centos.mirror.liquidtelecom.com
    Package epel-release-7-11.noarch already installed and latest version
    Package redhat-lsb-core-4.1-27.el7.centos.1.x86_64 already installed and latest version
    Package git-1.8.3.1-20.el7.x86_64 already installed and latest version
    Package python-setuptools-0.9.8-7.el7.noarch already installed and latest version
    Package python-devel-2.7.5-80.el7_6.x86_64 already installed and latest version
    Package 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64 already installed and latest version
    Package libffi-devel-3.0.13-18.el7.x86_64 already installed and latest version
    Nothing to do
    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.
    Requirement already up-to-date: setuptools in /usr/lib/python2.7/site-packages (41.0.1)
    Requirement already up-to-date: cryptography in /usr/lib64/python2.7/site-packages (2.7)
    Requirement already up-to-date: pip in /usr/lib/python2.7/site-packages (19.1.1)
    Requirement already satisfied, skipping upgrade: enum34; python_version < “3” in /usr/lib/python2.7/site-packages (from cryptography) (1.1.6)
    Requirement already satisfied, skipping upgrade: asn1crypto>=0.21.0 in /usr/lib/python2.7/site-packages (from cryptography) (0.24.0)
    Requirement already satisfied, skipping upgrade: cffi!=1.11.3,>=1.8 in /usr/lib64/python2.7/site-packages (from cryptography) (1.12.3)
    Requirement already satisfied, skipping upgrade: six>=1.4.1 in /usr/lib/python2.7/site-packages (from cryptography) (1.12.0)
    Requirement already satisfied, skipping upgrade: ipaddress; python_version < “3” in /usr/lib/python2.7/site-packages (from cryptography) (1.0.22)
    Requirement already satisfied, skipping upgrade: pycparser in /usr/lib/python2.7/site-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.
    Requirement already up-to-date: setuptools in /usr/lib/python2.7/site-packages (41.0.1)
    Requirement already up-to-date: cryptography in /usr/lib64/python2.7/site-packages (2.7)
    Requirement already up-to-date: ansible in /usr/lib/python2.7/site-packages (2.8.2)
    Requirement already up-to-date: pip in /usr/lib/python2.7/site-packages (19.1.1)
    Requirement already satisfied, skipping upgrade: enum34; python_version < “3” in /usr/lib/python2.7/site-packages (from cryptography) (1.1.6)
    Requirement already satisfied, skipping upgrade: asn1crypto>=0.21.0 in /usr/lib/python2.7/site-packages (from cryptography) (0.24.0)
    Requirement already satisfied, skipping upgrade: cffi!=1.11.3,>=1.8 in /usr/lib64/python2.7/site-packages (from cryptography) (1.12.3)
    Requirement already satisfied, skipping upgrade: six>=1.4.1 in /usr/lib/python2.7/site-packages (from cryptography) (1.12.0)
    Requirement already satisfied, skipping upgrade: ipaddress; python_version < “3” in /usr/lib/python2.7/site-packages (from cryptography) (1.0.22)
    Requirement already satisfied, skipping upgrade: PyYAML in /usr/lib64/python2.7/site-packages (from ansible) (5.1.1)
    Requirement already satisfied, skipping upgrade: jinja2 in /usr/lib64/python2.7/site-packages (from ansible) (2.10.1)
    Requirement already satisfied, skipping upgrade: pycparser in /usr/lib/python2.7/site-packages (from cffi!=1.11.3,>=1.8->cryptography) (2.19)
    Requirement already satisfied, skipping upgrade: MarkupSafe>=0.23 in /usr/lib64/python2.7/site-packages (from jinja2->ansible) (1.1.1)
    Traceback (most recent call last):
    File “install.py”, line 432, in
    install_bench(args)
    File “install.py”, line 106, in install_bench
    run_playbook(‘create_user.yml’, extra_vars=extra_vars)
    File “install.py”, line 330, in run_playbook
    args.extend([’-e’, get_extra_vars_json(extra_vars)])
    File “install.py”, line 321, in get_extra_vars_json
    with open(json_path, mode=‘w’) as j:
    IOError: [Errno 13] Permission denied: ‘/tmp/extra_vars.json’

#12

Don’t give up just yet this may help sort out your CentOS issue Hint on Terminal Prompt


#13

This looks like a permission issue again. And if you followed the instructions through, your user should have sudo rights.

Can you share the output of ls -l /tmp/extra_vars.json ?


#14

[frappe@erpnext ~]$ sudo python install.py --production --user frappe
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile

  • base: centos.mirror.liquidtelecom.com
  • epel: fedora.cu.be
  • extras: centos.mirror.liquidtelecom.com
  • updates: centos.mirror.liquidtelecom.com
    Maybe run: yum groups mark install (see man yum)
    No packages in any requested group available to install or update
    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
  • base: centos.mirror.liquidtelecom.com
  • epel: mirror.karneval.cz
  • extras: centos.mirror.liquidtelecom.com
  • updates: centos.mirror.liquidtelecom.com
    Package epel-release-7-11.noarch already installed and latest version
    Package redhat-lsb-core-4.1-27.el7.centos.1.x86_64 already installed and latest version
    Package git-1.8.3.1-20.el7.x86_64 already installed and latest version
    Package python-setuptools-0.9.8-7.el7.noarch already installed and latest version
    Package python-devel-2.7.5-80.el7_6.x86_64 already installed and latest version
    Package 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64 already installed and latest version
    Package libffi-devel-3.0.13-18.el7.x86_64 already installed and latest version
    Nothing to do
    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.
    Requirement already up-to-date: setuptools in /usr/lib/python2.7/site-packages (41.0.1)
    Requirement already up-to-date: cryptography in /usr/lib64/python2.7/site-packages (2.7)
    Requirement already up-to-date: pip in /usr/lib/python2.7/site-packages (19.1.1)
    Requirement already satisfied, skipping upgrade: enum34; python_version < “3” in /usr/lib/python2.7/site-packages (from cryptography) (1.1.6)
    Requirement already satisfied, skipping upgrade: asn1crypto>=0.21.0 in /usr/lib/python2.7/site-packages (from cryptography) (0.24.0)
    Requirement already satisfied, skipping upgrade: cffi!=1.11.3,>=1.8 in /usr/lib64/python2.7/site-packages (from cryptography) (1.12.3)
    Requirement already satisfied, skipping upgrade: six>=1.4.1 in /usr/lib/python2.7/site-packages (from cryptography) (1.12.0)
    Requirement already satisfied, skipping upgrade: ipaddress; python_version < “3” in /usr/lib/python2.7/site-packages (from cryptography) (1.0.22)
    Requirement already satisfied, skipping upgrade: pycparser in /usr/lib/python2.7/site-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.
    Requirement already up-to-date: setuptools in /usr/lib/python2.7/site-packages (41.0.1)
    Requirement already up-to-date: cryptography in /usr/lib64/python2.7/site-packages (2.7)
    Requirement already up-to-date: ansible in /usr/lib/python2.7/site-packages (2.8.2)
    Requirement already up-to-date: pip in /usr/lib/python2.7/site-packages (19.1.1)
    Requirement already satisfied, skipping upgrade: enum34; python_version < “3” in /usr/lib/python2.7/site-packages (from cryptography) (1.1.6)
    Requirement already satisfied, skipping upgrade: asn1crypto>=0.21.0 in /usr/lib/python2.7/site-packages (from cryptography) (0.24.0)
    Requirement already satisfied, skipping upgrade: cffi!=1.11.3,>=1.8 in /usr/lib64/python2.7/site-packages (from cryptography) (1.12.3)
    Requirement already satisfied, skipping upgrade: six>=1.4.1 in /usr/lib/python2.7/site-packages (from cryptography) (1.12.0)
    Requirement already satisfied, skipping upgrade: ipaddress; python_version < “3” in /usr/lib/python2.7/site-packages (from cryptography) (1.0.22)
    Requirement already satisfied, skipping upgrade: PyYAML in /usr/lib64/python2.7/site-packages (from ansible) (5.1.1)
    Requirement already satisfied, skipping upgrade: jinja2 in /usr/lib64/python2.7/site-packages (from ansible) (2.10.1)
    Requirement already satisfied, skipping upgrade: pycparser in /usr/lib/python2.7/site-packages (from cffi!=1.11.3,>=1.8->cryptography) (2.19)
    Requirement already satisfied, skipping upgrade: MarkupSafe>=0.23 in /usr/lib64/python2.7/site-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=0

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

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

TASK [common : Install IUS repo for python 3.6] ********************************
ok: [localhost]

TASK [common : Setup prerequisites using yum] **********************************
[DEPRECATION WARNING]: Invoking “yum” only once while using a loop via
squash_actions is deprecated. Instead of using a loop to supply multiple items
and specifying name: "{{ item }}", please use name: ['bzip2-devel', 'cronie', 'dnsmasq', 'freetype-devel', 'git', 'htop', 'lcms2-devel', 'libjpeg- devel', 'libtiff-devel', 'libffi-devel', 'libwebp-devel', 'libXext', 'libXrender', 'libzip-devel', 'libffi-devel', 'ntp', 'openssl-devel', 'postfix', 'python36u', 'python-devel', 'python-setuptools', 'python-pip', 'redis', 'screen', 'sudo', 'tcl-devel', 'tk-devel', 'vim', 'which', 'xorg-x11 -fonts-75dpi', 'xorg-x11-fonts-Type1', 'zlib-devel', 'openssl-devel', 'openldap-devel', 'libselinux-python', 'cups-libs'] 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’bzip2-devel’, u’cronie’, u’dnsmasq’, u’freetype-devel’, u’git’, u’htop’, u’lcms2-devel’, u’libjpeg-devel’, u’libtiff-devel’, u’libffi-devel’, u’libwebp-devel’, u’libXext’, u’libXrender’, u’libzip-devel’, u’libffi-devel’, u’ntp’, u’openssl-devel’, u’postfix’, u’python36u’, u’python-devel’, u’python-setuptools’, u’python-pip’, u’redis’, u’screen’, u’sudo’, u’tcl-devel’, u’tk-devel’, u’vim’, u’which’, u’xorg-x11-fonts-75dpi’, u’xorg-x11-fonts-Type1’, u’zlib-devel’, u’openssl-devel’, u’openldap-devel’, u’libselinux-python’, u’cups-libs’])

TASK [locale : Check current locale] *******************************************
skipping: [localhost]

TASK [locale : Set Locale] *****************************************************
skipping: [localhost]

TASK [locale : Set keymap] *****************************************************
skipping: [localhost]

TASK [locale : Set Locale as en_US] ********************************************
ok: [localhost] => (item=LC_ALL=en_US.UTF-8)
ok: [localhost] => (item=LC_CTYPE=en_US.UTF-8)
ok: [localhost] => (item=LANG=en_US.UTF-8)

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

TASK [mariadb : Install MariaDB] ***********************************************
[DEPRECATION WARNING]: Invoking “yum” only once while using a loop via
squash_actions is deprecated. Instead of using a loop to supply multiple items
and specifying name: "{{ item }}", please use name: ['MariaDB-server', 'MariaDB-client'] 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’MariaDB-server’, u’MariaDB-client’])

TASK [mariadb : Install MySQLdb Python package for secure installations.] ******
ok: [localhost]

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

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

TASK [mariadb : Update apt cache] **********************************************
skipping: [localhost]

TASK [mariadb : Unattended package installation] *******************************
skipping: [localhost]

TASK [mariadb : Install MariaDB] ***********************************************
[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: ['mariadb-server', 'mariadb-client', 'libmariadbclient18'] 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.
skipping: [localhost] => (item=[])

TASK [mariadb : Install MySQLdb Python package for secure installations.] ******
skipping: [localhost]

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

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

TASK [mariadb : Update apt cache] **********************************************
skipping: [localhost]

TASK [mariadb : Unattended package installation] *******************************
skipping: [localhost]

TASK [mariadb : Install MariaDB] ***********************************************
[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: ['mariadb-server', 'mariadb-client', 'libmariadbclient18'] 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.
skipping: [localhost] => (item=[])

TASK [mariadb : Install MySQLdb Python package for secure installations.] ******
skipping: [localhost]

TASK [mariadb : Add configuration] *********************************************
ok: [localhost]

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

TASK [mariadb : Add configuration] *********************************************
skipping: [localhost]

TASK [mariadb : Add additional conf for MariaDB 10.2 in mariadb.conf.d] ********
skipping: [localhost]

TASK [mariadb : Add additional conf for MariaDB 10.2 in mariadb.conf.d] ********
skipping: [localhost]

TASK [mariadb : Start and enable service] **************************************
ok: [localhost]

TASK [mariadb : debug] *********************************************************
ok: [localhost] => {
“msg”: “ErpNext”
}

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

TASK [mariadb : debug] *********************************************************
ok: [localhost] => {
“msg”: “ErpNext”
}

TASK [mariadb : Add .my.cnf] ***************************************************
ok: [localhost]

TASK [mariadb : Set root Password] *********************************************
ok: [localhost] => (item=localhost)
ok: [localhost] => (item=127.0.0.1)
ok: [localhost] => (item=::1)

TASK [mariadb : Reload privilege tables] ***************************************
skipping: [localhost] => (item=FLUSH PRIVILEGES)

TASK [mariadb : Remove anonymous users] ****************************************
skipping: [localhost] => (item=DELETE FROM mysql.user WHERE User=’’)

TASK [mariadb : Disallow root login remotely] **********************************
skipping: [localhost] => (item=DELETE FROM mysql.user WHERE User=‘root’ AND Host NOT IN (‘localhost’, ‘127.0.0.1’, ‘::1’))

TASK [mariadb : Remove test database and access to it] *************************
skipping: [localhost] => (item=DROP DATABASE IF EXISTS test)
skipping: [localhost] => (item=DELETE FROM mysql.db WHERE Db=‘test’ OR Db=‘test\_%’)

TASK [mariadb : Reload privilege tables] ***************************************
skipping: [localhost] => (item=FLUSH PRIVILEGES)

TASK [mariadb : debug] *********************************************************
ok: [localhost] => {
“mysql_secure_installation”: true
}

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

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

TASK [nodejs : Add Node.js PPA] ************************************************
[WARNING]: Consider using the get_url or uri module rather than running
‘curl’. If you need to use command because get_url or uri is insufficient you
can add ‘warn: false’ to this command task or set ‘command_warnings=False’ in
ansible.cfg to get rid of this message.

changed: [localhost]

TASK [nodejs : Install node v8] ************************************************
ok: [localhost]

TASK [nodejs : Install yarn] ***************************************************
changed: [localhost]

TASK [swap : Create swap space] ************************************************
skipping: [localhost]

TASK [swap : Make swap] ********************************************************
skipping: [localhost]

TASK [swap : Add to fstab] *****************************************************
skipping: [localhost]

TASK [swap : Turn swap on] *****************************************************
skipping: [localhost]

TASK [swap : Set swapiness] ****************************************************
changed: [localhost]

TASK [logwatch : Install logwatch] *********************************************
ok: [localhost]

TASK [logwatch : Install logwatch on Ubuntu or Debian] *************************
skipping: [localhost]

TASK [logwatch : Copy logwatch config] *****************************************
skipping: [localhost]

TASK [bash_screen_wall : Setup bash screen wall] *******************************
changed: [localhost]

TASK [frappe_selinux : Install deps] *******************************************
[DEPRECATION WARNING]: Invoking “yum” only once while using a loop via
squash_actions is deprecated. Instead of using a loop to supply multiple items
and specifying name: "{{item}}", please use name: ['policycoreutils-python', 'selinux-policy-devel'] 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’policycoreutils-python’, u’selinux-policy-devel’])

TASK [frappe_selinux : Check enabled SELinux modules] **************************
changed: [localhost]

TASK [frappe_selinux : Copy frappe_selinux policy] *****************************
ok: [localhost]

TASK [frappe_selinux : Compile frappe_selinux policy] **************************
skipping: [localhost]

TASK [dns_caching : Check NetworkManager.conf exists] **************************
ok: [localhost]

TASK [dns_caching : Unmask NetworkManager service] *****************************
changed: [localhost]

TASK [dns_caching : Add dnsmasq to network config] *****************************
ok: [localhost]

TASK [ntpd : Install ntpd] *****************************************************
[DEPRECATION WARNING]: Invoking “yum” only once while using a loop via
squash_actions is deprecated. Instead of using a loop to supply multiple items
and specifying name: "{{item}}", please use name: ['ntp', 'ntpdate'] 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’ntp’, u’ntpdate’])

TASK [ntpd : Enable ntpd] ******************************************************
ok: [localhost]

TASK [ntpd : Install ntpd] *****************************************************
[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 name: "{{item}}", please use name: ['ntp', 'ntpdate'] 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.
skipping: [localhost] => (item=[])

TASK [ntpd : Enable ntpd] ******************************************************
skipping: [localhost]

TASK [wkhtmltopdf : install base fonts] ****************************************
[DEPRECATION WARNING]: Invoking “yum” only once while using a loop via
squash_actions is deprecated. Instead of using a loop to supply multiple items
and specifying name: "{{ item }}", please use name: ['libXrender', 'libXext', 'xorg-x11-fonts-75dpi', 'xorg-x11-fonts-Type1'] 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’libXrender’, u’libXext’, u’xorg-x11-fonts-75dpi’, u’xorg-x11-fonts-Type1’])

TASK [wkhtmltopdf : install base fonts] ****************************************
[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 name: "{{ item }}", please use name: ['libxrender1', 'libxext6', 'xfonts-75dpi', 'xfonts-base'] 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.
skipping: [localhost] => (item=[])

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

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

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

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

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

TASK [psutil : Install psutil] *************************************************
ok: [localhost]

TASK [redis : Install yum packages] ********************************************
[DEPRECATION WARNING]: Invoking “yum” only once while using a loop via
squash_actions is deprecated. Instead of using a loop to supply multiple items
and specifying name: "{{ item }}", please use name: ['redis'] 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’redis’])

TASK [redis : Install apt packages] ********************************************
[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: ['redis-server'] 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.
skipping: [localhost] => (item=[])

TASK [redis : install prequisites for macos] ***********************************
[DEPRECATION WARNING]: Invoking “homebrew” only once while using a loop via
squash_actions is deprecated. Instead of using a loop to supply multiple items
and specifying name: "{{ item }}", please use name: ['redis'] 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.
skipping: [localhost] => (item=[])

TASK [supervisor : Install supervisor on centos] *******************************
ok: [localhost]

TASK [supervisor : Install supervisor on debian] *******************************
skipping: [localhost]

TASK [nginx : Include OS-specific variables.] **********************************
ok: [localhost]

TASK [nginx : Define nginx_user.] **********************************************
ok: [localhost]

TASK [nginx : include_tasks] ***************************************************
included: /tmp/.bench/playbooks/roles/nginx/tasks/setup-RedHat.yml for localhost

TASK [nginx : Enable nginx repo.] **********************************************
ok: [localhost]

TASK [nginx : Ensure nginx is installed.] **************************************
ok: [localhost]

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

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

TASK [nginx : Copy nginx configuration in place.] ******************************
ok: [localhost]

TASK [nginx : Setup www redirect] **********************************************
skipping: [localhost]

TASK [nginx : Enable SELinux] **************************************************
ok: [localhost]

TASK [nginx : Ensure nginx is started and enabled to start at boot.] ***********
ok: [localhost]

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

TASK [nginx : Remove default nginx vhost config file (if configured).] *********
skipping: [localhost]

TASK [nginx : Add managed vhost config file (if any vhosts are configured).] ***
[DEPRECATION WARNING]: evaluating [] as a bare variable, this behaviour will go
away and you might need to add |bool to the expression in the future. Also see
CONDITIONAL_BARE_VARS configuration toggle… This feature will be removed in
version 2.12. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
skipping: [localhost]

TASK [nginx : Remove managed vhost config file (if no vhosts are configured).] ***
ok: [localhost]

TASK [fail2ban : Install fail2ban] *********************************************
ok: [localhost]

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

TASK [fail2ban : Enable fail2ban] **********************************************
ok: [localhost]

TASK [fail2ban : Create jail.d] ************************************************
ok: [localhost]

TASK [fail2ban : Setup filters] ************************************************
ok: [localhost] => (item=nginx-proxy)

TASK [fail2ban : setup jails] **************************************************
ok: [localhost] => (item=nginx-proxy)

TASK [Set hostname] ************************************************************
skipping: [localhost]

TASK [Start NTPD] **************************************************************
ok: [localhost]

TASK [Start NTPD] **************************************************************
skipping: [localhost]

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

PLAY [setup bench and dev environment] *****************************************

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

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

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

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

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

TASK [bench : Overwrite bench if required] *************************************
skipping: [localhost]

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

TASK [bench : python3 bench init for develop] **********************************
skipping: [localhost]

TASK [bench : python2 bench init for production] *******************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “init”, “/home/frappe/frappe-bench”, “–frappe-path”, “https://github.com/frappe/frappe”, “–frappe-branch”, “master”], “delta”: “0:00:00.438783”, “end”: “2019-07-05 12:15:54.400705”, “msg”: “non-zero return code”, “rc”: 1, “start”: “2019-07-05 12:15:53.961922”, “stderr”: “”, “stderr_lines”: [], “stdout”: “You should not run this command as root”, “stdout_lines”: [“You should not run this command as root”]}

PLAY RECAP *********************************************************************
localhost : ok=61 changed=7 unreachable=0 failed=1 skipped=51 rescued=0 ignored=0

Traceback (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/lib64/python2.7/subprocess.py”, line 542, 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


#15

running -l /tmp/extra_vars.json
generates this output:
ls -l /tmp/extra_vars.json
-rw-r–r--. 1 root root 722 Jul 5 12:13 /tmp/extra_vars.json


#16

With the last 2 weeks, I had used the below link, and was able to succesfully install ERPNEXT from master branch.


#17

I used the The Hitchhiker’s Guide to Installing Frappe on Linux tutorial and when I reached Getting Bench onto your system, Recommended - Install Bench from the github repository (and also install node modules needed for bench install) I encountered the error below:

ssemotom@ubuntu:~$ npm install \

    chalk \
    rollup \
    rollup-plugin-multi-entry \
    rollup-plugin-commonjs \
    rollup-plugin-node-resolve \
    rollup-plugin-uglify \
    rollup-plugin-postcss \
    rollup-plugin-buble \
    rollup-plugin-terser \
    rollup-plugin-vue \
    vue-template-compiler \
    moment \
;

Unhandled rejection Error: EACCES: permission denied, mkdir ‘/home/ssemotom/.npm/_cacache/index-v5/9a/fc’

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://npm.community

npm ERR! A complete log of this run can be found in:
npm ERR! /home/ssemotom/.npm/_logs/2019-07-08T05_15_29_741Z-debug.log


#18

I saw a hint else where for this type of error, can you try this and then proceed :
Restore ownership of the user’s npm related folders, to the current user, like this:

sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config