frappe_docker: Internal Server Error straight after fresh install

Description of the issue

Fresh install following GitHub instructions here https://github.com/frappe/frappe_docker and following this video https://www.youtube.com/watch?v=IP8NpcvcIDk

Context information (for bug reports)

Followed instructions for creating the containers from clone of the github contents, waited for logs to clear and show everything is complete, access website at local.ip:port and am met with Internal Server Error.

Steps to reproduce the issue

jamie@KansaiGaijin:~/Docker/ERPNext/frappe_docker$ nano pwd.yml
jamie@KansaiGaijin:~/Docker/ERPNext/frappe_docker$ docker compose -f pwd.yml up -d
[+] Running 36/21
 ✔ configurator Pulled                                                   167.7s
 ✔ db 8 layers [⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                          94.8s
 ✔ backend Pulled                                                        167.2s
 ✔ queue-short Pulled                                                    167.0s
 ✔ create-site Pulled                                                    167.4s
 ✔ queue-long Pulled                                                     167.5s
 ✔ redis-queue Pulled                                                     71.0s
 ✔ frontend Pulled                                                       166.8s
 ✔ scheduler Pulled                                                      167.3s
 ✔ websocket 10 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled               166.9s
 ✔ redis-cache 7 layers [⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                  71.1s
[+] Running 17/17
 ✔ Network frappe_docker_default            Created                        2.3s
 ✔ Volume "frappe_docker_logs"              Created                        0.7s
 ✔ Volume "frappe_docker_redis-cache-data"  Created                        0.1s
 ✔ Volume "frappe_docker_db-data"           Created                        0.1s
 ✔ Volume "frappe_docker_redis-queue-data"  Created                        0.1s
 ✔ Volume "frappe_docker_sites"             Created                        0.1s
 ✔ Container frappe_docker-db-1             Created                       16.2s
 ✔ Container frappe_docker-redis-queue-1    Created                       17.0s
 ✔ Container frappe_docker-redis-cache-1    Created                       17.1s
 ✔ Container frappe_docker-backend-1        Created                       17.0s
 ✔ Container frappe_docker-queue-long-1     Created                       17.0s
 ✔ Container frappe_docker-websocket-1      Created                       17.0s
 ✔ Container frappe_docker-queue-short-1    Created                       17.0s
 ✔ Container frappe_docker-scheduler-1      Created                       17.0s
 ✔ Container frappe_docker-configurator-1   Created                       17.0s
 ✔ Container frappe_docker-create-site-1    Created                       17.0s
 ✔ Container frappe_docker-frontend-1       Created                        3.1s
Attaching to backend-1, configurator-1, create-site-1, db-1, frontend-1, queue-l                                                                                                                                                             ong-1, queue-short-1, redis-cache-1, redis-queue-1, scheduler-1, websocket-1

jamie@KansaiGaijin:~/Docker/ERPNext/frappe_docker$ docker logs frappe_docker-create-site-1 -f
wait-for-it: waiting 120 seconds for db:3306
wait-for-it: db:3306 is available after 101 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
sites/common_site_config.json found

Installing frappe...
Updating D
Updating DocTypes for frappe        : [========================================] 100%
Updating Dashboard for frappe

Installing erpnext...
Updating DocTypes for erpnext       : [========================================] 100%
Updating customizations for Address
Updating customizations for Contact
Updating Dashboard for erpnext
*** Scheduler is disabled ***
Current Site set to frontend
jamie@KansaiGaijin:~/Docker/ERPNext/frappe_docker$

Observed result

Navigate to 192.168.0.240:3636 and am met with Internal Server Error message in bold on white background.

Expected result

ERPNext frontend loads to login

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 22 (1 by maintainers)

Most upvoted comments

please look for common_site_config.json in backend container

sudo docker exec -it frappe_docker-backend-1 bash vim /home/frappe/frappe-bench/sites/common_site_config.json

change "redis_socketio": "redis://redis-queue:6379", to "redis_socketio": "redis://redis-socketio:6379", bench clear-cache

restart docker container

Try with docker-compose v2.29.7

Changing my redis_socketio address also did the trick for me and stopped the internal server error after fresh docker install.

In the pwd.yml under configurator container:

  1. Setting address as: redis_socketio “redis://$$REDIS_SOCKETIO”

  2. Adding a new varible in environment: REDIS_SOCKETIO: redis-socketio:6379

  3. It now looks like this instead

  configurator:
    image: frappe/erpnext:v15.64.0
    networks:
      - frappe_network
    deploy:
      restart_policy:
        condition: none
    entrypoint:
      - bash
      - -c
    command:
      - >
        ls -1 apps > sites/apps.txt;
        bench set-config -g db_host $$DB_HOST;
        bench set-config -gp db_port $$DB_PORT;
        bench set-config -g redis_cache "redis://$$REDIS_CACHE";
        bench set-config -g redis_queue "redis://$$REDIS_QUEUE";
        bench set-config -g redis_socketio "redis://$$REDIS_SOCKETIO";
        bench set-config -gp socketio_port $$SOCKETIO_PORT;
    environment:
      DB_HOST: db
      DB_PORT: "3306"
      REDIS_CACHE: redis-cache:6379
      REDIS_QUEUE: redis-queue:6379
      REDIS_SOCKETIO: redis-socketio:6379
      SOCKETIO_PORT: "9000"
    volumes:
      - sites:/home/frappe/frappe-bench/sites
      - logs:/home/frappe/frappe-bench/logs

please look for common_site_config.json in backend container

sudo docker exec -it frappe_docker-backend-1 bash vim /home/frappe/frappe-bench/sites/common_site_config.json

change "redis_socketio": "redis://redis-queue:6379", to "redis_socketio": "redis://redis-socketio:6379", bench clear-cache

restart docker container

That is the solution but why is that official docker compose not working correctly???

try docker-compose, not docker compose