ERPNext Conference 2019* ERPNext.com Blog

Fresh Installation error


#1

Hi all,
I am trying to install fresh copy of ERPnext on Google cloud server. Below are the last error log:

Edit: Trying on both Ubuntu 16.04 & 18.04 … no luck!

Edit-2: My user name is erp, not frappe. I update it in my below message.

Installation steps:
Frappe / ERPNext Installation 

usr: root
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python-minimal
sudo apt-get install build-essential python-setuptools


 sudo adduser erp
sudo usermod -aG sudo erp


su - erp

usr: erp

3) cd && wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
Start the installation by issuing the command below:

4) sudo python install.py --production --user erp

Error--------------------------

"INFO:bench.utils:/home/erp/frappe-bench/env/bin/pip install -q  -e /home/erp/frappe- bench/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.", "INFO:bench.utils:yarn install", "error An unexpected error occurred: \"EACCES: permission denied, scandir '/home/erp/.config/yarn/link'\".", "Traceback (most recent call last):", "  File \"/usr/local/bin/bench\", line 11, in <module>", "    load_entry_point('bench', 'console_scripts', 'bench')()", "  File \"/home/erp/.bench/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 \"/home/erp/.bench/bench/commands/make.py\", line 30, in init", "    python \t\t = python)", "  File \"/home/erp/.bench/bench/utils.py\", line 83, in init", "    update_node_packages(bench_path=path)", "  File \"/home/erp/.bench/bench/utils.py\", line 449, in update_node_packages", "    update_yarn_packages(bench_path)", "  File \"/home/erp/.bench/bench/utils.py\", line 462, in update_yarn_packages", "    exec_cmd('yarn install', cwd=app_path)", "  File \"/home/erp/.bench/bench/utils.py\", line 159, in exec_cmd", "    raise CommandFailedError(cmd)", "bench.utils.CommandFailedError: yarn install"], "stdout": "Already using interpreter /usr/bin/python\nwarning: unable to access '/home/erp/.config/git/attributes': Permission denied\nyarn install v1.13.0\ninfo If you think this is a bug, please open a bug report with the information provided in \"/home/erp/frappe-bench/apps/frappe/yarn-error.log\".\ninfo Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.\n('installing', u'frappe')\nUpdating node packages...", "stdout_lines": ["Already using interpreter /usr/bin/python", "warning: unable to access '/home/erp/.config/git/attributes': Permission denied", "yarn install v1.13.0", "info If you think this is a bug, please open a bug report with the information provided in \"/home/erp/frappe-bench/apps/frappe/yarn-error.log\".", "info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.", "('installing', u'frappe')", "Updating node packages..."]}
    to retry, use: --limit @/tmp/.bench/playbooks/site.retry

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

Traceback (most recent call last):
 File "install.py", line 425, in <module>
install_bench(args)
File "install.py", line 122, in install_bench
run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
File "install.py", line 338, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, 'playbooks'))
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=erp']' returned non-zero exit status 2

Any update in this regards,


#2

Your install path is /home/erp but your user is frappe (who would have /home/frappe as it’s home subdir unless you specifically set frappe’s homedir to /home/erp), so you probably have a permissions problem


#3

Hi,
Today I try to install fresh ERPNext several time on my Google Cloud account. Every time my installation got failed (check my first message). Although this was permission issue, but why, I do not figure it out. Below are the steps I overcome to this issue:

  1. After getting the error, I change the user (root) and provide these command
    sudo chown -R $USER:$GROUP ~/.npm
    sudo chown -R $USER:$GROUP ~/.config
  1. With normal user, I reinstall ERPNext, this time with out error but incomplete modules and with out login form.
  1. Then, bench update --reset. This time everything installed and working.

-Thanks


#4

I had the same issue in Ubuntu 18.04, I run it and it worked, let me test it.!

Thanks


#5

Follow these steps

  1. sudo python install.py --production --user erp
    2 .pip install -q -e /home/erp/frappe- bench/apps/frappe

#6

then bench update --reset?


#7

Was there any error occurred after you use the command pip install -q -e /home/erp/frappe- bench/apps/frappe ?


#9

Here is what I do and it works every time on Ubuntu 18.04 after of course using the apt-get update and apt-get upgrade.

To Install v12 on Ubuntu 18.04 (from def_user account)

sudo -H apt-get install python3-minimal
sudo -H apt-get install python3-setuptools
sudo -H apt-get install build-essential
sudo -H apt-get install redis-server
wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
sudo -H python3 install.py --production --user [def_user]
sudo nano /etc/hostname   (change hostname here to URL)
sudo nano /etc/hosts          (make sure hostname here is URL tied to ip address)
sudo nano /etc/cloud/cloud.cfg  (change line “preserve_hostname” from false to true)

after install – edit ~/.bench/bench/config/nginx.py  (change “Unicode” to “bytes”)

I installed this 2 times yesterday on 2 fresh VPS servers. I do all of this BEFORE I ever login to the Administrator and finish the setup wizard.

One of the installations was done to make an upgrade path from a v11 server. See this post to know how to also do that upgrade: (and yes, it was a success also :wink: )

Hope this helps. :grin:

BKM


ERP next installation on ubuntu system