Something broke in Production Setup last in past 24hrs!

Yesterday I set up 2 new testing servers on Debian 8 VM instances and they worked wonderfully for the testing we performed. This morning I attempted to setup 2 more new test servers using the same Debian 8 images and the install script fails!!

Here is the traceback from the GCP devian server:



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] *************************************************************************************
changed: [localhost]
TASK [Change permissions for frappe home folder] ***************************************************************
changed: [localhost]
TASK [Setup production] ****************************************************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “setup”, “production”, “erp_jmi”], “delta”: “0
:00:00.794218”, “end”: “2017-11-16 13:26:20.444804”, “failed”: true, “rc”: 1, “start”: “2017-11-16 13:26:19.6505
86”, “stderr”: “Aborted!”, “stderr_lines”: [“Aborted!”], “stdout”: "supervisor.conf already exists and this will
overwrite it. Do you want to continue? [y/N]: ", “stdout_lines”: ["supervisor.conf already exists and this will
overwrite it. Do you want to continue? [y/N]: "]}
to retry, use: --limit @/tmp/.bench/playbooks/production/install.retry
PLAY RECAP *****************************************************************************************************
localhost : ok=65 changed=12 unreachable=0 failed=1
Traceback (most recent call last):
File “install.py”, line 388, in
install_bench(args)
File “install.py”, line 114, in install_bench
run_playbook(‘production/install.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 326, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘production/install.yml’, ‘-e’, ‘@/t
mp/extra_vars.json’, ‘–become’, ‘–become-user=erp_jmi’]’ returned non-zero exit status 2
erp_jmi@erp9-15nov-fresh:~$



.
.
Is there anything I can do to salvage this? I need to setup production testing servers again today and the script keeps failing.

The starting point is Debian v8 server images from October 26 2017. These same server images worked well for the erpnext install yesterday. This morning I cannot generate ERPNext production servers with the install.py script even though I am using the same Debian images as yesterday. That tells me something either changed in the install script or something has been corrupted in the repository.

After loading the script, I used the following command to build the server:

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

Any help would be greatly appreciated.

BKM

Tried to reproduce this on a vanilla Debian 8 (Linux version 3.16.0-4-amd64, Debian 4.8.4-1) with

$ wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
$ sudo python install.py --production

It worked fine…

Can you try and make sure supervisor is removed/purged?

Ok, it appears something has changed over at GitHub. I found the instructions have changed recently. You can see the new ones here:

https://github.com/frappe/bench

Up until this morning, you could use the install.py script on a blank Debian8 server and everything would work just fine. However, now you need to take 2 extra steps BEFORE using the install script.


Note to Devs… can we get these extra steps put into the install script? It would really make it easier for non-developers to setup their own servers. Thanks. :grin:


Anyway, the 2 extra steps are not really very intuitive so please pay attention. The first one is to run the following command:

sudo apt-get install python-minimal

even though running this on a Debian8 server does not seem to produce anything significant, the install script does not appear to work without doing this anyway. Here is what it looks like when you run it:
.

As you can see, it didn’t appear to really do anything, but when I tried the install without doing this step it failed.

The second step is to run the following command:

sudo apt-get install build-essential python-setuptools

This command will check to see if it is already loaded and post a question at the bottom of the screen asking if you want to continue. Just hit Y for yes and press the enter key to let it finish installing the tool set the install script needs. When you get the bash prompt back it is finished and you can then run the install script.

Using this method, I was able to get the servers up and running, but hopefully we can get the attention of the developers to add these steps to the install.py script and save the extra work for those not comfortable using the command line prompts.

BKM

Ok. I have tried to run the install.py script over a dozen times this morning using the same Debian 8 image since October 26th. It failed many times until I went back to github and found the new changes to the instructions. The VM Debian 8 images I use are completely blank debian servers (which is recommended by the instructions).

Evidently something has changed recently and the new instructions seem to take care of the issue. I tried multiple combinations of the steps and it only works if you use both extra steps.

BKM

Hi @bkm,

I cannot comment on your image, and trust that you did not change that. All I did is try to confirm the observation on an independent, clean Debian. Yet, there the install script was successful.

So in case you take Debian Netinst or a comparable image and run the install.py, it seems to work.

Yup, nothing changed since October 26th. I have been using the same Debian image since that time and it was working until today. However, the new “extra” steps in the github instructions seemed to fix the problem. That makes me think the devs made some changes that suddenly required these extra steps.

As long as it works. :grin:

BKM

@lasalesi

The versions are as follows:

Linux - 3.16.0-4-amd64 GNU/Linux
Debian - v8.9

BKM