[Solved] What changed in install.py today?!? Worked this morning, Fails now. (v13.1.1 & v13.2.x)

@Joseph_Marie_Alba1 @bkm Thank you, I will try what bkm suggested and I’ll post an update/results.

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

mysql_secure_installation

instead of run mysql_secure_installation.

I’ll try to configure it on my domain now, and I’ll update if successful.

2 Likes

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. :nerd_face:

Glad you got it to work for yourself.

~BKM

2 Likes

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.

BKM

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 :slight_smile:

Please I can’t get pass this stage. I kept getting this error

image

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.

BKM

**EDIT - Updated the procedure above to reflect this change as well as a few others to improve the reliability of a successful install. - BKM :sunglasses:

BTW…

For those still tracking this thread:

Easy Install method is still not working 23 days after originally reporting the problem.

BKM

Hi @bkm!

I’m not a developer. Saying that, I’m using Contabo since a couple of years and actually using easy install method. It’s having these warnings [Release Note] ERPNext and Frappe Version 13.3.0 - #9 by krnkris but is working on new installs.

VPS with 4 vCPU Cores, 8 GB RAM and 200 GB SSD, using Ubuntu v20.04

apt-get update

apt-get upgrade

adduser frappe

usermod -aG sudo frappe

su - frappe

export LC_ALL=C.UTF-8

sudo apt-get install python3-minimal git build-essential python3-setuptools python3-pip libffi-dev libssl-dev wkhtmltopdf

wget https://raw.githubusercontent.com/frappe/bench/develop/install.py

sudo apt install python3-testresources

sudo python3 install.py --production --user frappe --frappe-branch version-13 --erpnext-branch version-13

cd /home/frappe/frappe-bench/

bench update

exit

To Multitenant:

Rename folder site1.local at /home/frappe/frappe-bench/sites to whatever domain name will be used

Replace site1.local at currentsite.txt

Replace site1.local at nginx.conf at cd /home/frappe/frappe-bench/config

Add hostname at /etc/hostname

Add hostname at /etc/hosts

Add hostname at cd /home/frappe/frappe-bench/sites/[site name]/site_config.json
Should look like this:
{
          "db_name": "[site name]",
          "db_password": "*********",
          "host_name": "[domain name]"
}

sudo apt-get install certbot

sudo systemctl stop nginx

sudo certbot --standalone --agree-tos --domain [domain name] -n -m [your email] certonly

sudo systemctl start nginx

If missing, add the following to cd /home/frappe/frappe-bench/sites/[site name]/site_config.json
{
          "ssl_certificate": "/etc/letsencrypt/live/[domain name]/fullchain.pem",
          "ssl_certificate_key": "/etc/letsencrypt/live/[domain name]/privkey.pem"
}

cd /home/frappe/frappe-bench

bench setup nginx

sudo service nginx reload

sudo service nginx restart
3 Likes

@Francisco_Buendia

What OS are you using on Contabo?

BKM

Sorry, I missed to mention:

Ubuntu v20.04 on a VPS with 4 vCPU Cores, 8 GB RAM and 200 GB SSD

Thank you.

Did you get it to work @bkm?

ubuntu 20.10 2gb ram 14% 40GB storage used

I logged in my system through the browser, configured Admin user, and after a few days (not touching anything) I log in so I can find out how to setup my custom domain and the ERP system is offline. It doesn’t auto-start anymore on VPS reboot, when I use systemctl status supervisor, mariadb and nginx all are active. It says the [ip] does not exist when opening:

https://i.imgur.com/TxD2ame.png

Using the ports 8000, 80, 443, all give “Connection refused” (my supervisor config uses port 8000 but it was working just with the ip). The main error seems to be:

redis_socketio.1: Could not create server TCP listening socket 127.0.0.1:12000: bind: Address already in use


That error appears here, this is what happens when I do bench start: (sudo bench start does same thing)

click to expand
gian@vps-13eeb010:~/frappe-bench$ bench start
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
22:53:36 system           | redis_cache.1 started (pid=1375)
22:53:36 system           | redis_socketio.1 started (pid=1372)
22:53:36 system           | socketio.1 started (pid=1377)
22:53:36 system           | redis_queue.1 started (pid=1381)
22:53:36 system           | web.1 started (pid=1376)
22:53:36 system           | watch.1 started (pid=1382)
22:53:36 system           | worker_short.1 started (pid=1394)
22:53:36 worker_short.1   | /bin/sh: 1: cannot create logs/worker.log: Permission denied
22:53:36 system           | worker_short.1 stopped (rc=2)
22:53:36 system           | schedule.1 started (pid=1393)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
22:53:36 system           | worker_long.1 started (pid=1395)
22:53:36 worker_long.1    | /bin/sh: 1: cannot create logs/worker.log: Permission denied
22:53:36 system           | worker_long.1 stopped (rc=2)
22:53:36 redis_socketio.1 | 1378:C 21 May 2021 22:53:36.455 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
22:53:36 redis_socketio.1 | 1378:C 21 May 2021 22:53:36.455 # Redis version=6.0.6, bits=64, commit=00000000, modified=0, pid=1378, just started
22:53:36 redis_socketio.1 | 1378:C 21 May 2021 22:53:36.456 # Configuration loaded
22:53:36 redis_socketio.1 | 1378:M 21 May 2021 22:53:36.457 * Increased maximum number of open files to 10032 (it was originally set to 1024).
22:53:36 redis_cache.1    | 1379:C 21 May 2021 22:53:36.468 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
22:53:36 redis_cache.1    | 1379:C 21 May 2021 22:53:36.469 # Redis version=6.0.6, bits=64, commit=00000000, modified=0, pid=1379, just started
22:53:36 redis_cache.1    | 1379:C 21 May 2021 22:53:36.471 # Configuration loaded
22:53:36 redis_cache.1    | 1379:M 21 May 2021 22:53:36.472 * Increased maximum number of open files to 10032 (it was originally set to 1024).
22:53:36 system           | worker_default.1 started (pid=1401)
22:53:36 system           | sending SIGTERM to redis_cache.1 (pid 1375)
22:53:36 system           | sending SIGTERM to redis_socketio.1 (pid 1372)
22:53:36 system           | sending SIGTERM to redis_queue.1 (pid 1381)
22:53:36 system           | sending SIGTERM to web.1 (pid 1376)
22:53:36 system           | sending SIGTERM to socketio.1 (pid 1377)
22:53:36 system           | sending SIGTERM to watch.1 (pid 1382)
22:53:36 system           | sending SIGTERM to schedule.1 (pid 1393)
22:53:36 system           | sending SIGTERM to worker_default.1 (pid 1401)
22:53:36 worker_default.1 | /bin/sh: 1: cannot create logs/worker.log: Permission denied
22:53:36 system           | worker_default.1 stopped (rc=2)
22:53:36 redis_socketio.1 | 1378:signal-handler (1621637616) Received SIGTERM scheduling shutdown...
22:53:36 redis_socketio.1 | 1378:M 21 May 2021 22:53:36.477 # Could not create server TCP listening socket 127.0.0.1:12000: bind: Address already in use
22:53:36 system           | redis_socketio.1 stopped (rc=-15)
22:53:36 system           | redis_queue.1 stopped (rc=-15)
22:53:36 redis_cache.1    | 1379:signal-handler (1621637616) Received SIGTERM scheduling shutdown...
22:53:36 redis_cache.1    | 1379:M 21 May 2021 22:53:36.483 # Could not create server TCP listening socket 127.0.0.1:13000: bind: Address already in use
22:53:36 system           | web.1 stopped (rc=-15)
22:53:36 system           | redis_cache.1 stopped (rc=-15)
22:53:36 system           | socketio.1 stopped (rc=-15)
22:53:36 system           | watch.1 stopped (rc=-15)
22:53:36 system           | schedule.1 stopped (rc=-15)

I kinda feel like a noob for this, but it’s not even my fault since I didn’t even touch the system and it breaks mysteriously by itself. :laughing:


edit: found this in frappe-bench/logs/worker.error.log

frappe.exceptions.LinkValidationError: Could not find User Id: 
my-email@gmail.com [replaced cuz its my email]
click to expand
22:07:24 Traceback (most recent call last):
  File "/home/gian/frappe-bench/env/lib/python3.8/site-packages/rq/worker.py", line 1008, in perform_job
    rv = job.perform()
  File "/home/gian/frappe-bench/env/lib/python3.8/site-packages/rq/job.py", line 706, in perform
    self._result = self._execute()
  File "/home/gian/frappe-bench/env/lib/python3.8/site-packages/rq/job.py", line 729, in _execute
    result = self.func(*self.args, **self.kwargs)
  File "/home/gian/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 100, in execute_job
    method(**kwargs)
  File "/home/gian/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py", line 1177, in create_contact
    contact.insert(ignore_permissions=True, ignore_links=ignore_links, ignore_mandatory=ignore_mandatory)
  File "/home/gian/frappe-bench/apps/frappe/frappe/model/document.py", line 231, in insert
    self._validate_links()
  File "/home/gian/frappe-bench/apps/frappe/frappe/model/document.py", line 826, in _validate_links
    frappe.throw(_("Could not find {0}").format(msg),
  File "/home/gian/frappe-bench/apps/frappe/frappe/__init__.py", line 433, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable, wide=wide, as_list=as_list)
  File "/home/gian/frappe-bench/apps/frappe/frappe/__init__.py", line 412, in msgprint
    _raise_exception()
  File "/home/gian/frappe-bench/apps/frappe/frappe/__init__.py", line 366, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.LinkValidationError: Could not find User Id: my-email@gmail.com
Traceback (most recent call last):
  File "/home/gian/frappe-bench/env/lib/python3.8/site-packages/rq/worker.py", line 1008, in perform_job
    rv = job.perform()
  File "/home/gian/frappe-bench/env/lib/python3.8/site-packages/rq/job.py", line 706, in perform
    self._result = self._execute()
  File "/home/gian/frappe-bench/env/lib/python3.8/site-packages/rq/job.py", line 729, in _execute
    result = self.func(*self.args, **self.kwargs)
  File "/home/gian/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 100, in execute_job
    method(**kwargs)
  File "/home/gian/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py", line 1177, in create_contact
22:07:24 Traceback (most recent call last):
  File "/home/gian/frappe-bench/env/lib/python3.8/site-packages/rq/worker.py", line 1008, in perform_job
    rv = job.perform()
  File "/home/gian/frappe-bench/env/lib/python3.8/site-packages/rq/job.py", line 706, in perform
    self._result = self._execute()
  File "/home/gian/frappe-bench/env/lib/python3.8/site-packages/rq/job.py", line 729, in _execute
    result = self.func(*self.args, **self.kwargs)
  File "/home/gian/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 100, in execute_job
    method(**kwargs)
  File "/home/gian/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py", line 1177, in create_contact
    contact.insert(ignore_permissions=True, ignore_links=ignore_links, ignore_mandatory=ignore_mandatory)
  File "/home/gian/frappe-bench/apps/frappe/frappe/model/document.py", line 231, in insert
    self._validate_links()
  File "/home/gian/frappe-bench/apps/frappe/frappe/model/document.py", line 826, in _validate_links
    frappe.throw(_("Could not find {0}").format(msg),
  File "/home/gian/frappe-bench/apps/frappe/frappe/__init__.py", line 433, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable, wide=wide, as_list=as_list)
  File "/home/gian/frappe-bench/apps/frappe/frappe/__init__.py", line 412, in msgprint
    _raise_exception()
  File "/home/gian/frappe-bench/apps/frappe/frappe/__init__.py", line 366, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.LinkValidationError: Could not find User Id: my-email@gmail.com
Traceback (most recent call last):
  File "/home/gian/frappe-bench/env/lib/python3.8/site-packages/rq/worker.py", line 1008, in perform_job
    rv = job.perform()
  File "/home/gian/frappe-bench/env/lib/python3.8/site-packages/rq/job.py", line 706, in perform
    self._result = self._execute()
  File "/home/gian/frappe-bench/env/lib/python3.8/site-packages/rq/job.py", line 729, in _execute
    result = self.func(*self.args, **self.kwargs)
  File "/home/gian/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 100, in execute_job
    method(**kwargs)
  File "/home/gian/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py", line 1177, in create_contact
    contact.insert(ignore_permissions=True, ignore_links=ignore_links, ignore_mandatory=ignore_mandatory)
  File "/home/gian/frappe-bench/apps/frappe/frappe/model/document.py", line 231, in insert
    self._validate_links()
  File "/home/gian/frappe-bench/apps/frappe/frappe/model/document.py", line 826, in _validate_links
    frappe.throw(_("Could not find {0}").format(msg),
  File "/home/gian/frappe-bench/apps/frappe/frappe/__init__.py", line 433, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable, wide=wide, as_list=as_list)
  File "/home/gian/frappe-bench/apps/frappe/frappe/__init__.py", line 412, in msgprint
    _raise_exception()
  File "/home/gian/frappe-bench/apps/frappe/frappe/__init__.py", line 366, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.LinkValidationError: Could not find User Id: my-email@gmail.com
Traceback (most recent call last):
  File "/home/gian/frappe-bench/env/lib/python3.8/site-packages/rq/worker.py", line 1008, in perform_job
    rv = job.perform()
  File "/home/gian/frappe-bench/env/lib/python3.8/site-packages/rq/job.py", line 706, in perform
    self._result = self._execute()
  File "/home/gian/frappe-bench/env/lib/python3.8/site-packages/rq/job.py", line 729, in _execute
    result = self.func(*self.args, **self.kwargs)
  File "/home/gian/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 100, in execute_job
    method(**kwargs)
  File "/home/gian/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py", line 1177, in create_contact

Trying these steps exactly as it is but just version-12 is used and username is as per my requirement.
Contabo Ubuntu-20.04 I hope it works.

Will share the feedback soon.

First, nginx and supervisor does not have anything to do when you use bench start (you are in develop mode). Nginx and supervisor are only used on production mode.

Second, When you are in develop mode, your system will not restart automatically (when you use bench start).

If you want ERPNext to start-up automatically when VPS reboots, you must be in production mode. You use bench restart in production mode.

There are some discussions here on what is the difference between develop and production mode.

1 Like

Failed with the same error.

       "    main()",
        "  File \"/home/adliyaph/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 18, in main",
        "    click.Group(commands=commands)(prog_name='bench')",
        "  File \"/home/adliyaph/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 764, in __call__",
        "    return self.main(*args, **kwargs)",
        "  File \"/home/adliyaph/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 717, in main",
        "    rv = self.invoke(ctx)",
        "  File \"/home/adliyaph/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 1137, in invoke",
        "    return _process_result(sub_ctx.command.invoke(sub_ctx))",
        "  File \"/home/adliyaph/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 1137, in invoke",
        "    return _process_result(sub_ctx.command.invoke(sub_ctx))",
        "  File \"/home/adliyaph/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 956, in invoke",
        "    return ctx.invoke(self.callback, **ctx.params)",
        "  File \"/home/adliyaph/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 555, in invoke",
        "    return callback(*args, **kwargs)",
        "  File \"/home/adliyaph/frappe-bench/apps/frappe/frappe/commands/site.py\", line 41, in new_site",
        "    frappe.init(site=site, new_site=True)",
        "  File \"/home/adliyaph/frappe-bench/apps/frappe/frappe/__init__.py\", line 175, in init",
        "    setup_module_map()",
        "  File \"/home/adliyaph/frappe-bench/apps/frappe/frappe/__init__.py\", line 1019, in setup_module_map",
        "    for module in get_module_list(app):",
        "  File \"/home/adliyaph/frappe-bench/apps/frappe/frappe/__init__.py\", line 882, in get_module_list",
        "    return get_file_items(os.path.join(os.path.dirname(get_module(app_name).__file__), \"modules.txt\"))",
        "  File \"/home/adliyaph/frappe-bench/apps/frappe/frappe/__init__.py\", line 840, in get_module",
        "    return importlib.import_module(modulename)",
        "  File \"/usr/lib/python3.8/importlib/__init__.py\", line 127, in import_module",
        "    return _bootstrap._gcd_import(name[level:], package, level)",
        "  File \"<frozen importlib._bootstrap>\", line 1014, in _gcd_import",
        "  File \"<frozen importlib._bootstrap>\", line 991, in _find_and_load",
        "  File \"<frozen importlib._bootstrap>\", line 973, in _find_and_load_unlocked",
        "ModuleNotFoundError: No module named 'erpnext'"
    ],
    "stdout": "",
    "stdout_lines": []
}

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

Update:
I installed python3.6 and switch bench env to it and then installed all requirements for erpnext.
even did
pip install cython as it was missing still getting the same error
Error Log

It looks like you don’t have erpnext / frappe installed.