Install Frappe and ERPNext 14 on ubuntu 22.04 (Python 3.10 Fix)

I’ve followed this 3 times and each time on a fresh install i get " Sorry!
We will be back soon.

Don’t panic. It’s not you, it’s us.
Most likely, our engineers are updating the code, and it should take a minute for the new code to load into memory.

Try refreshing after a minute or two."

any ideas?

What worked for me I ran “bench start” and refreshed the browser and it worked,

bench start is for development use not production. I was able to get it to start after running

sudo bench setup production USERNAME twice but now the pages CSS is gone well at least its somthing.

Maybe try this too

sudo bench setup production [BENCH USER]

sudo supervisorctl restart all

If you are successful, your instance should be in production mode.

If this didn’t work for you, follow the following steps:

First, change the user to your bench user and install Supervisor and Nginx with the following command:

su - erpnext sudo apt-get -y install supervisor nginx

Next, install the frappe-bench add-on with the following command:

sudo pip3 install frappe-bench

Next, run the following command to configure ERPNext for a production environment:

sudo /home/erpnext/.local/bin/bench setup production erpnext

I was able to get it to start into production mode but the entire website lacks CSS of any kind. It is on its own bench user and I just wiped this machine and reinstalled as per the instructions and it gives the same result of not having any CSS.

What enviroment are you running your instance on and I also try it my end. I tested on 2 different VPS machines with;
4 vCPU Cores
8 GB RAM
50 GB NVMe and 200 GB SSD
all on Ubuntu 22.04 LTS

Nearly the exact same setup, I’m running this inside of one of my proxmox hosts,
4 vCpus
8GB RAM
32GB NVME ssd
Ubuntu 22.04 LTS downloaded it again before the last reinstall to make sure it wasn’t something weird with my ISO.

I appreciate your help with this!

1 Like

I even made a VM on my desktop with VMware and it still fails the same way.

I did alot more trouble shooting and no matter what guide I follow they all fail to install or have issues with no CSS on page etc.

EDIT
I’m going to be honest, I have no idea how I fixed it. I reinstalled it on the same instance 12 times through various methods but it could be due to these two commands being repeatedly used until it no longer created errors.

bench update --reset
bench reinstall
best of luck to those who see this in the future, hopefully it will be fixed by then!

1 Like

It will take 50 steps to install… I’m sure ERPNext is really good, but to get it working was not an easy job.

I had odoo setup in several minutes and it worked in the first go.

However, I have been trying to install ERPNext on K8s for several days. I’m getting there, but still no avail.

The helm installation looked a bit easier compared to 50 steps.

Are you using Kubernetes because single VM install takes 50 steps?

Try these steps for quick docker setup:

Download pwd.yml:

wget https://raw.githubusercontent.com/frappe/frappe_docker/main/pwd.yml

Start containers

docker compose -p pwd -f pwd.yml up -d

Check the site creation

docker logs pwd-create-site-1 -f

Output:

wait-for-it: waiting 120 seconds for db:3306
wait-for-it: db:3306 is available after 9 seconds
wait-for-it: waiting 120 seconds for redis-cache:6379
wait-for-it: redis-cache:6379 is available after 0 seconds
wait-for-it: waiting 120 seconds for redis-queue:6379
wait-for-it: redis-queue:6379 is available after 0 seconds
wait-for-it: waiting 120 seconds for redis-socketio:6379
wait-for-it: redis-socketio:6379 is available after 0 seconds
common_site_config.json found

Installing frappe...
Updating DocTypes for frappe        : [========================================] 100%
Updating country info               : [========================================] 100%

Installing erpnext...
Updating DocTypes for erpnext       : [========================================] 100%
Updating customizations for Address
Updating customizations for Contact
*** Scheduler is disabled ***
Current Site set to frontend

Visit http://127.0.0.1:8080 to access the site. Login as Administrator with password admin.

To tear down:

docker compose -p pwd -f pwd.yml stop
docker compose -p pwd -f pwd.yml rm -f
docker volume prune -f

Refer site-operations for more bench / site operations: frappe_docker/docs/site-operations.md at main · frappe/frappe_docker · GitHub

Disclaimer

  • I’m afraid of the upcoming frappe_docker questions now. Hope someone helps me answer them. My generic answer: “tests pass, pwd works, works for me, can’t reproduce issue, closing”
  • First few questions will be, bash: command not found: docker or errors related to prerequisites not installed. :man_facepalming:
  • As you feel you deserve answers from me for free, I feel I deserve help from community to manage frappe_docker for free
3 Likes

I plan to run different apps on a single VM to have the maximum cost efficiency. My applications are not mission critical so I can tolerate the single point of failure.

Using containers is a must for the resource isolation, there could be multiple applications using different versions of the same sdk.

I wanted to use K8s rather than the naked Docker because I think K8s gives better control when orchestrating multiple applications in a single cluster. ERPNext properly will have the most focus on K8s too for deployment.

Thanks for the detailed Docker tips.

I will try these.

It worked for me, thank you.

try this one

Dear @charleyarnold ,

I appreciate what you have done, it’s good to work.

But I have faced this problem:

$ supervisorctl restart frappe:
error: <class 'PermissionError'>, [Errno 13] Permission denied: file: /usr/lib/python3/dist-packages/supervisor/xmlrpc.py line: 560
ERROR:
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 8, in <module>
    sys.exit(cli())
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/cli.py", line 127, in cli
    bench_command()
  File "/home/frappe/.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/frappe/.local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/commands/make.py", line 159, in get_app
    get_app(
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/app.py", line 432, in get_app
    app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/render.py", line 126, in wrapper_fn
    return fn(*args, **kwargs)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/app.py", line 230, in install
    install_app(
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/app.py", line 577, in install_app
    bench.reload()
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/render.py", line 126, in wrapper_fn
    return fn(*args, **kwargs)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/bench.py", line 150, in reload
    restart_supervisor_processes(bench_path=self.name, web_workers=web)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/bench.py", line 304, in restart_supervisor_processes
    bench.run(f"{sudo}supervisorctl restart {group}")
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/bench.py", line 47, in run
    return exec_cmd(cmd, cwd=cwd or self.cwd)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/__init__.py", line 155, in exec_cmd
    raise CommandFailedError
bench.exceptions.CommandFailedError

Please any help, thank you in advance

@charleyarnold any update

Hi let me go through this, I have been offline lately

Hi @charleyarnold

I solved the error:

**error: <class ‘PermissionError’>, [Errno 13] Permission denied: file: /usr/lib/python3/dist-packages/supervisor/xmlrpc.py line: 560**

by going to:

sudo nano /etc/supervisor/supervisord.conf

(Add these lines under [unix_http_server])

chmod=0760
chown=frappe:frappe

than

chmod -R o+rx /home/frappe
2 Likes

Ahh great let me also try it out

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.