You need to delete a previous install’s artifacts before doing a fresh install Search results for 'fatal: destination path ‘erpnext’ already exists and is not an empty directory' - Frappe Forum.
Another try with the help of Home · frappe/frappe Wiki · GitHub and How to Install ERPNext on Ubuntu 18.04 - SpeedySense
Fresh ubuntu installation and then step by step:
apt update && apt upgrade -y && apt autoremove -y
ufw allow 22/tcp
ufw enable
ufw allow http
ufw allow https
ufw allow sftp
apt-get install vsftpd
systemctl restart vsftpd
systemctl enable vsftpd
nano /etc/vsftpd.conf
ssl_enable=YES
systemctl restart vsftpd
add-apt-repository ppa:nginx/stable
apt-get update
apt-get install nginx
ufw allow ‘Nginx Full’
apt -y install python-minimal
apt -y install git build-essential python-setuptools python-dev libffi-dev libssl-dev
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install --upgrade pip setuptools
pip install ansible
apt -y install curl
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo “deb https://dl.yarnpkg.com/debian/ stable main” | sudo tee /etc/apt/sources.list.d/yarn.list
apt -y update && sudo apt -y install yarn
apt -y install mariadb-server libmysqlclient-dev
nano /etc/mysql/my.cnf
[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci[mysql]
default-character-set = utf8mb4
systemctl restart mariadb
systemctl enable mariadb
mysql_secure_installation
Set root password? [Y/n] y
y
y
y
y
curl --silent --location https://deb.nodesource.com/setup_8.x | sudo bash -
sudo apt-get install -y nodejs
apt -y install nginx nodejs redis-server
systemctl start nginx
systemctl enable nginx
systemctl start redis-server
systemctl enable redis-server
apt -y install libxrender1 libxext6 xfonts-75dpi xfonts-base
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar -xf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz -C /opt
ln -s /opt/wkhtmltox/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
ln -s /opt/wkhtmltox/bin/wkhtmltoimage /usr/bin/wkhtmltoimage
adduser beck
usermod -aG sudo beck
login beck
mkdir erpnext
cd erpnext/
sudo apt install virtualenv
virtualenv .
source ./bin/activate
git clone GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps bench-repo
sudo pip install -e bench-repo
bench init --frappe-branch master --frappe-path GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript frappe-bench
cd frappe-bench/
bench get-app --branch master erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
bench config dns_multitenant on
sudo mysql -u root -p
UPDATE user SET plugin=‘mysql_native_password’ WHERE User=‘root’;
FLUSH PRIVILEGES;
exit;
bench new-site erp.domain.com
bench --site erp.domain.com install-app erpnext
bench start
bench setup nginx
sudo bench setup production beck
./env/bin/pip install werkzeug==0.16.0
reboot
login beck
sudo service supervisor stopp
sudo service supervisor start
sudo supervisorctl status
sudo systemctl enable supervisor
sudo apt install certbot
sudo -H bench setup lets-encrypt erp.domain.de
bench --site erp.domain.com set-config enable_two_factor_auth true
That worked for me, after 3 months. Maybe someone can check the guide?
Not difficult at all. Takes some time and effort. But few wish to spend that time. Or put in that effort. Therefore the installation has been garbage for years. And likely will continue to be, for a while longer.
For this reason, many of us gave up on “easy install” years ago. We either install ERPNext manually, or maintain our own forks of Bench. Or both.
Interesting thread. I watched the progress of this over the past few weeks.
An strange occurence happened to me today with the latest version installation (v12.5.1)
I went to a dormant Ubuntu server that I had running 18.04.3 and I ran the apt-get update and apt-get upgrade to get it up to v18.04.4 and then I ran the install.
It failed with the exact same error that @Curt.Beck posted.
This didn’t make any sense to me so I wiped the server and spun up an fresh ubuntu 18.04.4 image, ran the update and upgrade. Then I ran the same install script again (just like I had an hour earlier) and it worked.
Mind you this is running the Easy Install method!!
To make sure my results were consistent, I wiped another server I had and rand through the same process (on a different VPS service provider) and again ran the update and upgrade and the erpnext easy install script.
This also works perfectly.
Possible Conclusion…
There may be something amiss in the upgrade process of Ubuntu from 18.04.3 to 18.04.4.
When I tried to upgrade to 18.04.4 and run an install it failed.
When I installed a recent 180.0.4 image and then update and upgraded it to most current the ERPNext Easy Install works perfectly.
Is that definitive proof? um… NO
But it is a curious result because I am very meticulous about doing installs and I notice these things.
So that is my results today. Two successful installs when using a fresh Ubuntu image.
However, as always… Your mileage may vary.
BKM
That’s very strange. I’m struggling to think of what OS-specific changes (18.04.3 to 18.04.4), might yield these installation errors. The problems I’ve encountered during installation have been:
- Python dependency errors. Outdated PyPI packages. Python3 changes.
- Nodejs dependency errors. yarn vs. npm differences. Some headaches with Nodejs 13 and node-gyp.
- MariaDB update issues (but only once or twice; it’s usually very stable)
I’ve never encountered a situation where my OS was the problem, and had to be patched forward/backward. I’ve done installations on Ubuntu 16 through 18, Debian 9 and 10.
But of course, I’m not running easy install, and calling those Ansible playbooks.
Regardless, I agree with @Curt.Beck. It’s unfair to expect ERPNext users to know how to “unpack commands” into sub-components, hack the installation scripts, and debug the installer process. No other business software application expects its users to troubleshoot Bash, Python, and JavaScript code. Yet ERPNext appears to require it.
As I mentioned a few weeks ago: ERPNext increasingly appears to be an application -by- Python developers, -for- Python developers. If you’re not already a *nix Pythonista, you’re at a large disadvantage.
It’s something that needs to change.
WTF!?
With the step by step guide i reached the login screen two days ago. Today I wanted to create a company, but i only got a time out message. Now i burn down the house!!!
The error is shown in Setup Wizard Request Timeout - Problem Solution - #2 by revant_one or Time out error for creating new companies - #9 by Ahmed.Khater or [Solved] Setup failed >> Could not start up: Error in setup - #2 by pipech.
Unfortunately all named solutions, time out 6000 or bench update --patch or many tries didn’t work for me.
The log of Google Chrome is
request.js:274 SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse ()
at Object.frappe.request.report_error (request.js:408)
at 500 (request.js:187)
at Object. (request.js:267)
at i (jquery.min.js:2)
at Object.fireWith [as rejectWith] (jquery.min.js:2)
at z (jquery.min.js:4)
at XMLHttpRequest. (jquery.min.js:4)
(anonymous) @ request.js:274
Please, can anybody help for the last steps? Thank you.
Yeah, I have seen that every time I try to run the startup wizard on a new install. The error presents itself in a separate pop-up box. Once you acknowledge the error you get to another pop-up box that has a very tiny link near the bottom that says “Retry” that you can use to run the last steps of the wizard again. This has always allowed it to finish. Not sure why, but it has been that way for me since starting to use v12.
As for the OS patching scenario…
I am not so sure it has much to do with patching as it does with possibly something being accidentally left our of the "apt-get upgrade process from 18.04.3 to 18.04.4
This is actually the second time I have seen this. The first time I simply attributed the problem to my having installed other unrelated packages to the OS before running the apt commands to update and upgrade. I thought it may have been some odd package tripping up other important OS functions. So when I loaded a 18.04.4 image and did the apt commands again, ERPNext installed just fine. That was in mid-January.
This time I had another fresh Ubuntu server on a dormant VPS that I had created in late November of last year (about 3 months ago) and it was just a spun up 18.04.3 image that I had not done anything with it yet. So I was surprised to see the same error that I had previously attributed to something I had done now popping up when I know there had been no activity at all. Simply the act of running apt-get update and apt-get upgrade from root and creating the accounts for a ERPNext install, the install would fail. I was quite surprised.
I no longer have access to the older 18.04.03 images to spin up and investigate further, but the limited evidence is mounting that there may have been something left out of the OS upgrade service.
It would be interesting to hear from others that have encountered the error to see if they were also going from 18.04.3 to 18.04.4 before the attempted the ERPNext install.
Not trying to point fingers here, but more data would sure be nice.
BKM
Back to the basics:
Are you installed on VM?
How much RAM you have? The minimum now is 4GB.
If it is less then your mashine get slow and stuck.
Hope it helps.
Yes, cloud server at www.hetzner.de with 2 VCPU, 4 GB RAM and 40 GB disk space. Bevor I had installed multitenant WordPress und SuiteCRM, everything worked absolutely fine. For single ERPNext it should be enough power.
Is there a log or protocol where I can find the internal server error? Last year in October ERPNext worked on the server. Just because fo changes in software it does not run, I think.
Thanks.
I’m not a Linux or Python specialist, but I can choose different OS rebuilds for my cloud server:
Ubuntu 16.04
Ubuntu 18.04
Debian 9
Debian 10
CentOS 7
CentOS 8
I only have DIY experience in Ubuntu 18.04. Is there a 100% sure chance that ERPNext will run properly on another operating system mentioned?
Thanks.
I have been doing my installs over the past week using Ubuntu 18.04.4
When you select the operating system on your VPS providers site, they do not typically tell you anything beyond the “18.04” so you will not know the sub-point release versions.
At three of the VPS providers that I am using, the version of the image that I have been using has been 18.04.4
In November and early December my servers were getting an image version 18.04.3
It was the 18.04.3 that (at least form me) would fail ERPNext installs if I ran apt-get update and apt-get upgrade before running the Easy Install for ERPNext.
So, to answer your question… No, there is no guaranteed successful install. The variables are constantly changing (sometimes by the hour) and nobody has control over all of the variables.
In my case (and in my “opinion”) I ran into a possible condition where Ubuntu nay not have upgraded itself properly. Other variables that can affect a successful install also includes possible changes to the multitude of packages that frappe/erpnext depends on to build their system. All of those packages are also constantly being updated by their respective authors and foundations. We never know what is changing unless the package authors announce it publicly.
Installing ERPNext is NOT anything like installing some MS Windows program. Microsoft packages everything together into a single installation file. During their installs the large install file unpacked itself into temproary holding area and then installs everything from the contents. That means everything is all contained and controlled by the stuff in the single install file.
Microsoft also controls the operating system so they know exactly what is available to them to use during the install process.
Ubuntu is built from mainly opensource packages. The foundation that controls the OS does pull together everything together into a collection of known source versions in order to make a specific version install. This usually makes the Ubuntu OS just as stable as any Microsoft operating system.
ERPNext does NOT create a single install file for their application. They use a script that systematically reaches out to the repositories of all of the packages they depend on to build a ERPNext installation, and they do this “on-the-fly” as the actual installation is progressing on your server. The developer team does their best to try to request specific versions of the packages in the script that installs your ERPNext application. However, they sometimes forget to pin down a version or something and errors happen. We have also seen time when one of the packages the install script tries to access during the install is not available because it has been moved, altered, or even completely taken out of circulation by the original authors.
All of these variables are constantly changing and even more so with opensource projects.
Everything that makes up almost all Linux versions are opensource projects making the particular OS and opensource project itself (like Ubuntu, Debian, CentOS, Fedora, etc.).
Add to that the ERPNext project which is opensource and built from all opensource packages and the list of variables is beyond calculation.
Is our world perfect? No.
But is worth the discomfort we sometimes experience? Well, you will have to answer that for yourself.
BKM
I fully understand your point of view. If someone spends so much time creating such a program, we have to ask why? I think it’s made for users who need an ERP system that is more open and editable. But if this person have to be an absolutely professional programmer just to install the software (not to use it), I would say that the developers missed their target OR created ERPNext for their own purposes. Then it is logical that all ERPNext users can also program properly in Linux etc.
Nevertheless, what is a solution for this problem? Is there a solution for this at all? Is there a log file somewhere in which I can find the error?
PS: I checked my Ubuntu version: “Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-74-generic x86_64)”, managed with https://landscape.canonical.com.
Thanks
I don’t know that there is ever an all encompassing solution for getting a successful install of ERPNext.
I do also agree that the current process is difficult for any but the most experienced to have success.
All I can offer is what I know worked for me: (at least this week)
- spin up a fresh image of Ubuntu 18.04 (if unsure use “lsb_release -a” to see release info)
- if it is 18.04.4 then run apt-get update and apt-get upgrade as root user
As "root"user: (replace anything in [brackets] with your own information)
apt-get update
apt-get upgrade
apt-get install python3-minimal build-essential python3-setuptools
adduser [def_user]
usermod -aG sudo [def_user]
Then logout as root user and log in again as [def_user]
As [def_user] do the following:
export LC_ALL=C.UTF-8
sudo wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
sudo -H python3 install.py --production --user [def_user]
Note: I do not put any passwords in the command that starts the install.py because I want to see that the script progresses properly and asks for those during the process. Recent changes in how the script works have eliminated much of the verbose screen activity that used to keep you updated with the install progress. Forcing it to ask me for passwords lets me know at least a little bit about where it is in the process. You can do it anyway you like.
This is what has been working for me this past week. I cannot speak to anything else except to say that I have read on the forum that folks with Ubuntu 18.04.3 may have had better success by NOT running the apt-get update & upgrade commands. Your mileage may vary…
BKM
I don’t think this is correct. I installed on server with 2GB RAM a few hours ago without issues.
It tried your guide with a fresh OS without update and upgrade: same time out
Ok… maybe I am missing something here…
What timeout?
Does the install complete?
Not sure what you mean by timeout.
If you mean a timeout of startup wizard, the just accept the timeout and click on “Retry” in the next box.
BKM
@Curt.Beck Okay just to be sure that this isn’t related to your cloud host… can you try any other host to see if that’s the issue? I regularly spin up test servers on google cloud VPS while my production server is on AWS and backup on DigitalOcean. Whenever there’s an update, i spin a test server and load my backup to test the update before upgrading my production. I installed a new instance a few hours ago to test v12.5.2 without issues so maybe you should try another host just to eliminate your host as being the issue.
Ok, let me see if I can get past this confusion.
Is this the process you are having trouble with:
Step 1 - Login as Administrator to start the setup wizard
Step 2 - Answer all the questions until you get to the Complete Setup button
Step 3 - After clicking the Complete Setup button the process begins…
Step 4 - The wizars experiences a timeout error like this:
Step 5 - Click on the “Close” button of the error screen
Step 6 - The underlying error screen is now revealed
Step 7 - Just click on the “Retry” button (see red arrow)
Step 8 - You are taken back to the last step of the wizard again. Just clicl “Complete Setup” again
Finally, in just a few minutes the wizard will complete and take you to the v12 desk.
This is the same thing that I have had to do since trying to install and use v12. It happens on every install and I just click through it to get a working system.
So, @Curt.Beck are you experiencing something different?
I ran through the server install exactly as I described a few posts back, and then started the wizard exactly like in this post. It took me about 45 minutes to complete everything, but I did it again so I could take the screenshots.
Please let us know if this is where you are having problems and if you tried this solution yet.
BKM
After a lot of retrys i found following solution:
I installed ERPNext like my step by step guide Fool proof install - step by step - #50 by Curt.Beck.
After setting up the company I tried and retried 10 times with my german data inputs, also for chart of accounts. I used SK04 first. After no happy ending and 10 times no succes I changed the data. The result is: I was able to succes the setting up process, but only with “Standard with Numbers” for chart of accounts. With our german SK04 i was not possible.
So, for a full ERP use not really a solution, but I don’t use accounting in ERP. So for me it’s working, but maybe not for other german users.
So after a long journey I completed the installation!!!
No I have the next problem. I can’t use more then one email outgoing account in MS Office 365. The next WTF. So i go on to the next topic. Login with Office 365: Email not verified
ERPNext has some good parts, but just to setting it up it’s a mess and really frustrating! (for a normal user and no professional Linux and Python god).
So for all othe installers, use my guide for a manual installation. It woked for me. I don’t know how long it works, maybe until the next update
Thanks to all.