My attempts have been stymied, although upgrading the python3 stack to 3.9 makes some things behave differently. A work in progress that I can’t devote alot of time to.
This is exactly the same error that I get on Ubuntu 18.04, Ubuntu 20.04, and Debian 10.
If anyone is actually installing fresh ERPNext v13.x production instances on fresh VPS servers like the ones I mention, PLEASE share how you are doing it.
I need 3 more servers to finish off the project that started this thread, and I have demand for at least 4 more after that.
Here I am a full WEEK after the first failure and still no way to get an installation working!!!
- install.py does not work
- Hitchhikers Guide does not work
What else is there?
How is anyone actually installing new PRODUCTION servers now?
Sometimes it is really frustrating.
Last time I’ve used this one https://www.digitalocean.com/community/tutorials/how-to-install-an-erpnext-stack-on-ubuntu-20-04
You may need to change
bench init /home/sammy/frappe-bench --frappe-path https://github.com/frappe/frappe --frappe-branch version-12 --python python3
bench init /home/sammy/frappe-bench --frappe-path https://github.com/frappe/frappe --frappe-branch version-13 --python python3
Or you can install v12 and then swith-to-branch.
Also this one seems promising but never tried https://gist.github.com/daif/f356ee4a40b1ca083ec8de9cb45ba174 .
PS: I’ve installed just one fresh new server on my new VPS and I’ve told my support guy to create a template for my server. So when I need a brand new server, they just create from my template. I don’t spend time with installations anymore.
I used to do that as well, but started running into trouble when having to use the template 2 or 3 months later because I cannot remember what changes I had made after the server was running the first time.
At this point I would just be happy to have a clean fresh install. I don;t even have anything I can make a template from right now.
Try This :
Let me know if it works …
Not working. I use the same process but on servers other than GCP. I spin-up Ubuntu 20.04 servers and run the same script and it always fails with:
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=erpnxtadmin’]’ returned non-zero exit status 2.
Doing it on GCP wouldn’t make any difference. I am already using Ubuntu servers on at least 3 other service providers and all fail with the same error.
Try This manual Install :
New user here, I’ve been trying to install ERPNext on my fresh new VPS (2GB ram) and have yet to succeed. I first tried on ubuntu 20, then centOS 7 and 8, now I’m trying with ubuntu 18. Tried manual before, and docker install now. Nothing works
I’ll try the completely manual guide again tomorrow. If it doesn’t work I think I’ll be forced to switch to another software for a while.
Do you know any alternative and up to date guides?
I use hitchhiker, but it has some dated commands.
It is good that when asking assistance on the forum, the community knows the sequence of what you did. In my experience, you get faster and more accurate assistance.
**EDIT - 05/21/2021
This has been updated today to compensate for Ubuntu 20.04 server images that are more stripped down and missing packages. Particularly ‘curl’ and ‘git’ needed to be installed during the process to get everything working. Also there was a missing step of adding some important stuff into the $PATH. ~BKM
I have not published it yet, but I have worked out a revision of the 22 step guide that has been working for the past 2 days (I added 2 additional steps to get to 24). It was originally put out by @adals back in January while v13 was still in beta. I have modified it for my purposes and had some success. Here it is in it’s raw form. There are none of my normal explanations of each step, etc. that I would normally do. So take it for what it is. Just follow the steps and don;t ask why. You should wind up with a working system on Ubuntu 20.04 (if your VPS has an up-to-date image). Just remember… anywhere you see [USER] use your own server username. If you follow the instructions exactly you end up with a server nearly identical to the one the easy install would make.
choose any cloud you trust
enter to your system via ssh with root user
apt update && apt upgrade -y && shutdown -r now
log back in as root and continue (the shutdown command forces the server to restart if not then reboot it manually) then type:
(Watch carefully that this command completes properly. I have recently encountered a Ubuntu 20.04 image that did not include the curl or git commands and it had to be installed. It is simple enough to do and if it is missing, the command line response will tell you to install it and even gives you the syntax to use. Then you can continue with the command again)
apt-get install curl git
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
apt install -y nodejs mariadb-server redis-server python3-pip nginx python3-testresources
usermod -aG sudo [USER]
when the editor opens, scroll to the bottom of the file and add these lines:
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
default-character-set = utf8mb4
service mysql restart
press enter for password then answer the questions as follows:
Set root password? [Y/n] y
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] n
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
mysql -u root -p
Immediately after the -p type the password you assigned to mariadb in the last step. Remember there is to be NO space between the -p and the first character of the password. Then at the database prompt type the following commands (case sensitive & press enter after each line)
USE mysql; UPDATE user SET plugin=' ' WHERE user = 'root'; FLUSH PRIVILEGES; exit
close the terminal (logout of root) and open new one and login with ssh [USER]
sudo npm install -g yarn
node -v && npm -v && python3 -V && pip3 -V && yarn -v
pip3 install frappe-bench
sudo pip3 install frappe-bench
bench init --frappe-branch version-13 frappe-bench
bench new-site site1.local
(Now that we are up to v13.3.x expect a lot of deprication warnings with this step)
bench get-app --branch version-13 erpnext
bench --site site1.local install-app erpnext
sudo bench setup production [USER]
bench --site site1.local enable-scheduler
Now reboot the server. Once it has rebooted you should be able to open a web browser and type in the ip address of your server to get the ERPNext login screen. Login as administrator and go through the setup wizard before attempting to do any further work on the server. Once that is done you can find plenty of sources on the forum to help you with things like setting the URL (using the bench add-domain command) and setting up the SSL certificates.
Hope this helps… and no I am not taking time to explain everything right now. That may be in a future tutorial.
This does NOT solve the problem of the easy install method failing. That STILL needs to be FIXED!!
Update: thanks, following your whole updated guide worked, Ubuntu 20.10 ! It already had curl installed. Only correction on your guide is on step 10 the command should be
I’ll try to configure it on my domain now, and I’ll update if successful.
Ahh… you are correct. (fixed it in the post above so others do not trip over it)
When I copied it from my document on my desktop PC I forgot to eliminate the word run which was both a note to myself and is was actually part of the original notes from @adals when it was first created back in January. I knew what it meant but I didn’t structure it for a layman to understand. That was my fault. But it was just my raw dump.
Glad you got it to work for yourself.
What kind of user should be created here. What is its function?
same question about “site1.local”. How is this value used afterwards or how do I have to adjust it?
This would be a linux user (other than the ROOT user).
The “site1.local” site is the site name that is created when you use the “Easy Install” method from the frappe/bench github repo. It is used here to make the manual method of installing the system look and feel just like the resulting installation if the Easy Install script were used.
The easy install script creates the “site1.local” site during the install process and then there are ways to change that name built into the system.
At this point I think you need to do a lot more reading in the forum to understand how the install process works. Here is an article I wrote several years ago that describes the entire process. It was written for version 10 of ERPNext but the concepts are still the same even if the steps may not work the same any longer. Please read this for a better understanding of how it all ties together.
ok, installed with the user “erpadmin” and “erp01.mydomain.local” (this is the FQH of the VM) and can look at the system.
Yes, I will read the article. I have also already read something in the forum.
It’s a bit confusing because there are different methods to install.
But now it’s up and running and I can test
Please I can’t get pass this stage. I kept getting this error
What can I do to continue the installation?
Yup! I ran into that myself this morning on a new VPS service provider. It turns out this provider has a very stripped down version of the Ubuntu 20.04 image in their catalog and when I spin it up it is missing two important packages: git and curl
First of all answer Y to rollback the changes, then to get past this particular error you need to run:
apt-get install git
After this is done the “
bench init --frappe-branch version-13 frappe-bench” command will work properly. I will update the posting above later today to show this. I want to get some more testing done over the next few hours before I commit it to the list though.
Do not let my delay in updating the steps get in the way of you using the fix I described here. It will solve your problem.
**EDIT - Updated the procedure above to reflect this change as well as a few others to improve the reliability of a successful install. - BKM