Install v13 Production on Ubuntu 20.04 VPS - This is how I did it "Easy Install" script

just change --production to --develop. Rest all same

Failed, unfortunately don’t know why.

Sorry but dont have any idea about develop. Maybe you can set production completely and then migrate to develop.

1 Like

worked once like a charm. then i tried to create another droplet, following the exact steps but fails, tried more than 4 time now. Digital ocean droplet - Ubuntu 20.04 LTS , 1vCPU 2GB ram 50GB SSD

TASK [bench : Setup Procfile] ****************************************************************************************
task path: /tmp/.bench/bench/playbooks/roles/bench/tasks/main.yml:60
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /var/tmp `"&& mkdir /var/tmp/ansible-tmp-1624372529.164145-42719-56623924971094 && echo ansible-tmp-1624372529.164145-42719-56623924971094="` echo /var/tmp/ansible-tmp-1624372529.164145-42719-56623924971094 `" ) && sleep 0'
Using module file /usr/local/lib/python3.8/dist-packages/ansible/modules/commands/command.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-275201gw0qoy8/tmpddzhdowa TO /var/tmp/ansible-tmp-1624372529.164145-42719-56623924971094/AnsiballZ_command.py
<127.0.0.1> EXEC /bin/sh -c 'setfacl -m '"'"'u:[USER]:r-x'"'"' /var/tmp/ansible-tmp-1624372529.164145-42719-56623924971094/ /var/tmp/ansible-tmp-1624372529.164145-42719-56623924971094/AnsiballZ_command.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'sudo -H -S -n  -u [USER] /bin/sh -c '"'"'echo BECOME-SUCCESS-uyvaboicpersjjsurhzpqbmhpfmnpqml ; /usr/bin/python3 /var/tmp/ansible-tmp-1624372529.164145-42719-56623924971094/AnsiballZ_command.py'"'"' && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /var/tmp/ansible-tmp-1624372529.164145-42719-56623924971094/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
    "changed": true,
    "cmd": [
        "bench",
        "setup",
        "procfile"
    ],
    "delta": "0:00:00.480597",
    "end": "2021-06-22 14:35:29.921658",
    "invocation": {
        "module_args": {
            "_raw_params": "bench setup procfile",
            "_uses_shell": false,
            "argv": null,
            "chdir": "/home/[USER]/frappe-bench",
            "creates": "/home/[USER]/frappe-bench/Procfile",
            "executable": null,
            "removes": null,
            "stdin": null,
            "stdin_add_newline": true,
            "strip_empty_ends": true,
            "warn": true
        }
    },
    "msg": "non-zero return code",
    "rc": 1,
    "start": "2021-06-22 14:35:29.441061",
    "stderr": "Aborted!",
    "stderr_lines": [
        "Aborted!"
    ],
    "stdout": "\u001b[93mWARN: bench is installed in editable mode!\n\nThis is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`\n\u001b[0m\nA Procfile already exists and this will overwrite it. Do you want to continue? [y/N]: ",
    "stdout_lines": [
        "\u001b[93mWARN: bench is installed in editable mode!",
        "",
        "This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`",
        "\u001b[0m",
        "A Procfile already exists and this will overwrite it. Do you want to continue? [y/N]: "
    ]
}

No idea why it fails with exact same config.

I see the same errors on other systems now as well. When I created this in April it was working well, but as you can see in other posts in this thread, the Ubuntu image has been changing and becomes unfit for installing ERPNext without a great deal of work (which also seems to change every week as well).

To that end, I have stopped using Ubuntu as my OS and started using Debian 10 because it tends to be a bit more stripped down and less stuff that you don’t need built into it. Here is my steps for getting Debian 10 running:

However…
If you insist on using Ubuntu, there is one other method you can try. I used these step for a while before I turned away from Ubuntu. You might find this to be working better:

Hope this helps.

BKM

2 Likes

Tried v13 debian10 as per your suggestion. works well. restored my prod db from v12 and with minimal effort, its up and running now. only faced minor hiccups due to invalid data field options in my custom apps.

Thanks.

2 Likes

This failed for me, I think…? Not sure how to interpret the results. I’m on a physical machine (8 core 2.6 Ghz with 16GB Ram) running 20.04.

PLAY RECAP ********************************************************************************************
localhost : ok=14 changed=9 unreachable=0 failed=1 skipped=13 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 500, in
install_bench(args)
File “install.py”, line 281, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 416, in run_playbook
success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr)
File “/usr/lib/python3.8/subprocess.py”, line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=jlherpnext’]’ returned non-zero exit status 2.

Had wrong version of Maria…upgraded to 10.5 and thought I had made a little progress as the script seemed to run longer but…hmm, looks the same. :frowning:

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

Traceback (most recent call last):
File “install.py”, line 500, in
install_bench(args)
File “install.py”, line 281, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 416, in run_playbook
success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr)
File “/usr/lib/python3.8/subprocess.py”, line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=jlherpnext’]’ returned non-zero exit status 2.

Lately I had given up installing in Ubuntu :slight_smile:. I don’t know why but it always failed (manual and easy install).
Now I only manually install on CentOS 8. And as CentOS is deprecated, I tried to install in AlmaLinux (the CentOS alternative) and always succeed.

several versions ago, there are no difficulties installing in Ubuntu 18/20 using cake & bakery document. But several days ago when trying installing in 20 then 18, errors are popping, and @bkm post of Debian 10 became my permanent solution!

Hmm, well, I don’t want to be overly negative but…give up on Ubuntu doesn’t seem to be the best solution. :frowning:

I’ve tried every option I could think of and/or find on forums but nothing works so I guess I’ll wipe my system, install Debian or some other variety that apparently (fingers crossed) works and give that a try. Sigh…

Hello, I installed ERPnext. And this run on my localhost through browser, but I can’t complete installation. Https://127.0.0.1/app/setup-wizard/0 I press button “Next” but nothing to happen. What should I do?

In the last one month I have spun and killed my test instance several times and I have not faced any issue running the Easy Install Script for fresh installs. My OS of choice is Ubuntu 20.04 and the python version installed every time is python 3.8.10. However, I haven’t faced any issue installing or running ERPNext. I only kill the instance every time because it is my test bench so I run a lot of crazy stuff in it just to see how they work.

goldenscrew,

I managed to get everything up and running and sort of documented the process here.

I’m not sure how helpful the information there will be but…maybe worth a quick run through.

Cheers

Would you mind recording a video and share?

Not working !

fatal: [localhost]: FAILED! => {
“changed”: false,
“invocation”: {
“module_args”: {
“allow_unauthenticated”: false,
“autoclean”: false,
“autoremove”: false,
“cache_valid_time”: 0,
“deb”: “/tmp/wkhtmltox.deb”,
“default_release”: null,
“dpkg_options”: “force-confdef,force-confold”,
“force”: false,
“force_apt_get”: false,
“install_recommends”: null,
“only_upgrade”: false,
“package”: null,
“policy_rc_d”: null,
“purge”: false,
“state”: “present”,
“update_cache”: null,
“upgrade”: null
}
},
“msg”: “Breaks existing package ‘wkhtmltopdf’ that conflict: ‘wkhtmltopdf’. But the ‘/tmp/wkhtmltox.deb’ provides it via: ‘wkhtmltopdf’”
}

RUNNING HANDLER [mariadb : restart mysql] **************************************
task path: /tmp/.bench/bench/playbooks/roles/mariadb/handlers/main.yml:2

PLAY RECAP *********************************************************************
localhost : ok=38 changed=24 unreachable=0 failed=1 skipped=47 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 500, in
install_bench(args)
File “install.py”, line 281, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 416, in run_playbook
success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr)
File “/usr/lib/python3.6/subprocess.py”, line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2.

I installed in Ubuntu 18 in around 20 minutes using the following;
UPDATE: 16/09/2021 Now you need to configure redis. (Steps given below as per @bkm )

sudo apt-get update
sudo apt-get upgrade

adduser frappe
usermod -aG sudo frappe

export LC_ALL=C.UTF-8

sudo apt install git libffi-dev python3-minimal build-essential python3-distutils python3-setuptools python3-pip python3-testresources libssl-dev wkhtmltopdf redis

Nest we need to fix a potential problem in the redis config file:

sudo nano /etc/redis/redis.conf

When the editor is open, search for: “port 6379” and edit to to “port 13000” then (ctrl+o and ctrl+x) to save and exit

sudo systemctl restart redis

wget https://raw.githubusercontent.com/frappe/bench/develop/install.py
sudo python3 install.py --verbose --production --user frappe --frappe-branch version-13 --erpnext-branch version-13
3 Likes

try to install it on Ubuntu Server 21.04 when I use last command

sudo python3 install.py --verbose --production --user [USER] --mariadb-version 10.5 --frappe-branch version-13 --erpnext-branch version-13

I have error:
The repository ‘http://ams2.mirrors.digitalocean.com/mariadb/repo/10.4/ubuntu/ hirsute Release’ does not have a Release file.

Installation works fine… but it says

WARN: bench is installed in editable mode!

How to correct this?

now i reinstall my ubuntu server 21.04 and now I have next error, please see screnshot.