ERPNext Installation CentOS 7.3 error

Hi,

I followed instruction till step 3 on the below link

and then switched from step 4 to use easy install script

and i got this error at swap space, could someone please help me…

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

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

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

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

TASK [Install yum packages] ********************************************************************************************************************************************
changed: [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'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'])

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

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

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

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

TASK [locale : Set Locale] *********************************************************************************************************************************************
 [WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: (ansible_distribution == 'Centos' or ansible_distribution ==
'Ubuntu') and locale_test.stdout.find('LANG={{ locale_lang }}') == -1

skipping: [localhost]

TASK [locale : Set keymap] *********************************************************************************************************************************************
 [WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: (ansible_distribution == 'Centos' or ansible_distribution ==
'Ubuntu') and locale_test.stdout.find('Keymap: {{locale_keymap}}') == -1

skipping: [localhost]

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

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

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

TASK [swap : Add to fstab] *********************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Destination /etc/fstab does not exist !", "rc": 257}
        to retry, use: --limit @/tmp/.bench/playbooks/production/install.retry

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

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

Those guides are dated. So in the wake of for example this that you may have missed:

*SOLVED* Install.py now FAILS on Unbuntu 14.04, Debian 8, Centos 7. What happened? (also same on Ubuntu 16.04) *SOLVED*

This resource here is more current and may serve you better

I tried on a fresh CentOS 7.3 scaleway server by following the

failed at NodeJS

[root@scw-dba20e ~]# curl -sL https://rpm.nodesource.com/setup_8.x | sudo -E bash -

## Installing the NodeSource Node.js 8.x repo...


## Inspecting system...

+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release
+ uname -m

## You don't appear to be running a supported machine architecture: aarch64. Please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your architecture to be considered for support.

I ran the inspecting commands suggested

[root@scw-dba20e ~]# rpm -q --whatprovides redhat-release
centos-release-7-4.1708.el7.centos.altarch.1.aarch64
[root@scw-dba20e ~]#  rpm -q --whatprovides centos-release
centos-release-7-4.1708.el7.centos.altarch.1.aarch64
[root@scw-dba20e ~]# rpm -q --whatprovides cloudlinux-release
no package provides cloudlinux-release
[root@scw-dba20e ~]# rpm -q --whatprovides sl-release
no package provides sl-release

@James_Robertson , could you please help.

I have never heard of a scaleway server. Looks like it presents a strange architecture that the nodejs installer does not like. Can you try with a out of box CentOS or one of the ones provided by Google Compute or AWS?

1 Like

Scaleway support should be able to advise you here - these two packages appear to be missing in their environment.

1 Like

Thanks @James_Robertson and @clarkej,

The nodejs installation problem which was related to architecture was addressed by changing the server type as shown below,

image

I followed each and every step given at https://jwrober.github.io/erpnext_admin_guide/i-u-b/install

The only change i made in the first and the final command was this, since for sitename was not important

i wanted to access through ip itself,

sudo python install.py --production --user erpnext
–bench-name erpnext-prd --verbose 2>&1 | tee --append erpnext-install.log

Now, I got the error at init bench

TASK [init bench] ******************************************************************************************************************************************************
task path: /tmp/.bench/playbooks/develop/includes/setup_bench.yml:31
Using module file /usr/lib/python2.7/site-packages/ansible/modules/commands/command.py
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /tmp/ansible-tmp-1519489812.59-109579960253774 `" && echo ansible-tmp-1519489812.59-109579960253774="` echo /tmp/ansible-tmp-1519489812.59-109579960253774 `" ) && sleep 0'
<127.0.0.1> PUT /tmp/tmpZzH4Uo TO /tmp/ansible-tmp-1519489812.59-109579960253774/command.py
<127.0.0.1> EXEC /bin/sh -c 'setfacl -m u:erpnext:r-x /tmp/ansible-tmp-1519489812.59-109579960253774/ /tmp/ansible-tmp-1519489812.59-109579960253774/command.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'sudo -H -S -n -u erpnext /bin/sh -c '"'"'echo BECOME-SUCCESS-eyehemowwenfrquenwxfijtypbedrcqi; /bin/python /tmp/ansible-tmp-1519489812.59-109579960253774/command.py'"'"' && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /tmp/ansible-tmp-1519489812.59-109579960253774/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
    "changed": true,
    "cmd": [
        "bench",
        "init",
        "/home/erpnext/erpnext-prd",
        "--frappe-branch",
        "master"
    ],
    "delta": "0:03:59.965083",
    "end": "2018-02-24 16:34:12.981423",
    "failed": true,
    "invocation": {
        "module_args": {
            "_raw_params": "bench init /home/erpnext/erpnext-prd --frappe-branch master",
            "_uses_shell": false,
            "chdir": null,
            "creates": "/home/erpnext/erpnext-prd",
            "executable": null,
            "removes": null,
            "warn": true
        }
    },
    "rc": 1,
    "start": "2018-02-24 16:30:13.016340",
    "stderr": "INFO:bench.utils:virtualenv -q env -p /bin/python\nINFO:bench.utils:./env/bin/pip -q install --upgrade pip\nINFO:bench.utils:./env/bin/pip -q install wheel\nINFO:bench.utils:./env/bin/pip -q install six\nINFO:bench.utils:./env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit\nINFO:bench.app:getting app frappe\nINFO:bench.utils:git clone https://github.com/frappe/frappe.git --branch master  --origin upstream\nINFO:bench.app:installing frappe\nINFO:bench.utils:/home/erpnext/erpnext-prd/env/bin/pip install -q  -e /home/erpnext/erpnext-prd/apps/frappe --no-cache-dir\nTraceback (most recent call last):\n  File \"/bin/bench\", line 11, in <module>\n    load_entry_point('bench', 'console_scripts', 'bench')()\n  File \"/home/erpnext/.bench/bench/cli.py\", line 40, in cli\n    bench_command()\n  File \"/usr/lib64/python2.7/site-packages/click/core.py\", line 722, in __call__\n    return self.main(*args, **kwargs)\n  File \"/usr/lib64/python2.7/site-packages/click/core.py\", line 697, in main\n    rv = self.invoke(ctx)\n  File \"/usr/lib64/python2.7/site-packages/click/core.py\", line 1066, in invoke\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\n  File \"/usr/lib64/python2.7/site-packages/click/core.py\", line 895, in invoke\n    return ctx.invoke(self.callback, **ctx.params)\n  File \"/usr/lib64/python2.7/site-packages/click/core.py\", line 535, in invoke\n    return callback(*args, **kwargs)\n  File \"/home/erpnext/.bench/bench/commands/make.py\", line 28, in init\n    python \t\t = python)\n  File \"/home/erpnext/.bench/bench/utils.py\", line 75, in init\n    update_node_packages(bench_path=path)\n  File \"/home/erpnext/.bench/bench/utils.py\", line 436, in update_node_packages\n    v = semantic_version.Version(get_current_version('frappe'))\n  File \"/home/erpnext/.bench/bench/app.py\", line 257, in get_current_version\n    with open(os.path.join(repo_dir, os.path.basename(repo_dir), '__init__.py')) as f:\nIOError: [Errno 2] No such file or directory: './apps/frappe/frappe/__init__.py'",
    "stderr_lines": [
        "INFO:bench.utils:virtualenv -q env -p /bin/python",
        "INFO:bench.utils:./env/bin/pip -q install --upgrade pip",
        "INFO:bench.utils:./env/bin/pip -q install wheel",
        "INFO:bench.utils:./env/bin/pip -q install six",
        "INFO:bench.utils:./env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit",
        "INFO:bench.app:getting app frappe",
        "INFO:bench.utils:git clone https://github.com/frappe/frappe.git --branch master  --origin upstream",
        "INFO:bench.app:installing frappe",
        "INFO:bench.utils:/home/erpnext/erpnext-prd/env/bin/pip install -q  -e /home/erpnext/erpnext-prd/apps/frappe --no-cache-dir",
        "Traceback (most recent call last):",
        "  File \"/bin/bench\", line 11, in <module>",
        "    load_entry_point('bench', 'console_scripts', 'bench')()",
        "  File \"/home/erpnext/.bench/bench/cli.py\", line 40, in cli",
        "    bench_command()",
        "  File \"/usr/lib64/python2.7/site-packages/click/core.py\", line 722, in __call__",
        "    return self.main(*args, **kwargs)",
        "  File \"/usr/lib64/python2.7/site-packages/click/core.py\", line 697, in main",
        "    rv = self.invoke(ctx)",
        "  File \"/usr/lib64/python2.7/site-packages/click/core.py\", line 1066, in invoke",
        "    return _process_result(sub_ctx.command.invoke(sub_ctx))",
        "  File \"/usr/lib64/python2.7/site-packages/click/core.py\", line 895, in invoke",
        "    return ctx.invoke(self.callback, **ctx.params)",
        "  File \"/usr/lib64/python2.7/site-packages/click/core.py\", line 535, in invoke",
        "    return callback(*args, **kwargs)",
        "  File \"/home/erpnext/.bench/bench/commands/make.py\", line 28, in init",
        "    python \t\t = python)",
        "  File \"/home/erpnext/.bench/bench/utils.py\", line 75, in init",
        "    update_node_packages(bench_path=path)",
        "  File \"/home/erpnext/.bench/bench/utils.py\", line 436, in update_node_packages",
        "    v = semantic_version.Version(get_current_version('frappe'))",
        "  File \"/home/erpnext/.bench/bench/app.py\", line 257, in get_current_version",
        "    with open(os.path.join(repo_dir, os.path.basename(repo_dir), '__init__.py')) as f:",
        "IOError: [Errno 2] No such file or directory: './apps/frappe/frappe/__init__.py'"
    ],
    "stdout": "Cloning into 'frappe'...\n('installing', u'frappe')\nUpdating node packages...",
    "stdout_lines": [
        "Cloning into 'frappe'...",
        "('installing', u'frappe')",
        "Updating node packages..."
    ]
}
        to retry, use: --limit @/tmp/.bench/playbooks/production/install.retry

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

Passwords saved at ~/passwords.txt
Traceback (most recent call last):
  File "install.py", line 386, in <module>
    install_bench(args)
  File "install.py", line 112, in install_bench
    run_playbook('production/install.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 324, 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', 'production/install.yml', '-e', '@/tmp/extra_vars.json', '-vvvv', '--become', '--become-user=erpnext']' returned non-zero exit status 2

Could you please guide me ?

Thanks for your valuable inputs.

Unfortunately you and others have hit this current problem with installs 22.02 yarn errors on build in develop branch?

Stay tuned for news that it has been resolved, thanks.

1 Like