[solved] Easy Install Script Not Working Ubuntu 16.04 LTS in GCP

I notice that the errors @codingCoffee tried to fixed in this post *SOLVED* Install.py now FAILS on Unbuntu 14.04, Debian 8, Centos 7. What happened? (also same on Ubuntu 16.04) *SOLVED* seems to persist.I have been trying to install erpnext using easy install script for the past two days without success.@BKM kindly help because i am using GCP which i believe you use to confirm the workability of the easy install script after CodingCoffee created a solution.
Any other friend should pleasehelp.
Here is the error message
base.py", line 707, in get_global", " return self.get_default(key, user)“, " File "/hom
e/frappe/frappe-bench/apps/frappe/frappe/database.py", line 719, in get_default”, " d = s
elf.get_defaults(key, parent)“, " File "/home/frappe/frappe-bench/apps/frappe/frappe/databa
se.py", line 725, in get_defaults”, " defaults = frappe.defaults.get_defaults(parent)“, "
File "/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py", line 57, in get_defaults
“, " globald = get_defaults_for()”, " File "/home/frappe/frappe-bench/apps/frappe/frappe
/defaults.py", line 177, in get_defaults_for”, " where parent = %s order by creation""
“, (parent,), as_dict=1)”, " File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py
", line 121, in sql", " self.connect()“, " File "/home/frappe/frappe-bench/apps/frappe/
frappe/database.py", line 67, in connect”, " use_unicode=True, charset=‘utf8mb4’)“, " Fi
le "/home/frappe/frappe-bench/env/src/mysqlclient/MySQLdb/init.py", line 86, in Connect
“, " return Connection(*args, **kwargs)”, " File "/home/frappe/frappe-bench/env/src/mysq
lclient/MySQLdb/connections.py", line 204, in init”, " super(Connection, self).__init
__(*args, **kwargs2)", “_mysql_exceptions.OperationalError: (1045, "Access denied for user ’
1bd3e0294da19198’@‘localhost’ (using password: YES)")”], “stdout”: “”, “stdout_lines”: []}
to retry, use: --limit @/tmp/.bench/playbooks/production/install.retry
PLAY RECAP **********************************************************************************
localhost : ok=67 changed=11 unreachable=0 failed=1
Traceback (most recent call last):
File “install.py”, line 386, in
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/lib/python2.7/subprocess.py”, line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘production/insta
ll.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zer
o exit status 2

seems an issue mysql!

On which OS distribution you are getting this error?

@saurabh6790 Thanks for your prompt response.Ubuntu 16.04 LTS in GCP

@Fred1

I am currently in my GCP account trying to replicate your error. I will get back to you in a few min.

Are you using the “ubuntu-1604-xenial-v20180126” image as your Ubuntu starting point?

BKM

Yes.Thanks for your quick response

@Fred1

I used “ubuntu-1604-xenial-v20180126” as the starting image. I selected it from the list of standard images and created an instance called:

ubu16-install-test

Once the instance was up and running I entered the following commands to start the install:

wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py

This loaded the latest version of the install.py script into my default user home folder. I then issued the following command:

sudo python install.py --production --user erp_jmi

Notice the user switch is implemented here. It is important when doing this in GCP that you add the user switch and make the user your default account user. In my case it is erp_jmi. Yours would be whatever shows up in your command prompt to the left of the @ symbol.

I did not issue any update or upgrade commands and my install just completed successfully. I answered the admin user and mysql password prompts during the install and had no errors.

Hope this helps. Completed 10-30-2018 @ 8:31AM EST

BKM

@bkm thanks .It successfully installed using the user name of the VM.But happens to user frappe in the this script: python install.py --production --user frappe? I have used the user to install erpnext many times in GCP.But whatever happens you have saved me from the nightmare.Thanks you so much for your passion to help.

Ahh… yeah. That doesn’t work so well on GCP. You can make it work with the frappe user if you know in advance to actually create that user first then switch to that user before you start the install script. Even then you still should use the --user switch in the install command.

The nice thing about GCP is that you can delete it and try it several times until you get it exactly the way you want.

Good luck to you! Glad to be of help.

BKM

Please mark this thread as SOLVED.

BKM