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

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 ‘Index of /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.

Ignore it. It’s just information. We have it on all servers. No issue faced b

Use only Ubuntu 20 or older. Doesn’t work on 21.

I change Ubuntu 20 on 21 in /tmp/.bench/playbooks/roles/wkhtmltopdf/tasks/main.yml and it was installed.

1 Like

Best to wipe the server and reinstall the OS. I tried going backwards from 20 to 18 once an found that much of the original files stayed in place. The kernel did regress but not to anything you would have found in v18 so I could never get it to work.

Best to wipe the server and start over (unless you are an Ubuntu OS guru and can reconfigure it ALL by hand).

BKM