Try ERPNext Buy Support Partners Foundation

Getting 404 error after starting Single Bench on docker

Hello all, hello dear dev team,

I’m trying to use docker-compose following this readme.
I’m using the standard configuration for production, just copied env-production file to .env.

When trying to connect to the site, the redirection to HTTPS is working fine, but I get a 404 error. I’m trying to access the website by simply typing localhost in firefox, or the ip address of my server if distant. Both returns 404. Maybe I’m not asking for the right URL?

There is some warning in MariaDb logs:

2020-09-07 15:13:17 0 [Warning] 'user' entry 'root@7c5f92218c23' ignored in --skip-name-resolve mode.
2020-09-07 15:13:17 0 [Warning] 'user' entry '@7c5f92218c23' ignored in --skip-name-resolve mode.
2020-09-07 15:13:17 0 [Warning] 'proxies_priv' entry '@% root@7c5f92218c23' ignored in --skip-name-resolve mode.
2020-09-07 15:13:17 0 [Note] Reading of all Master_info entries succeeded
2020-09-07 15:13:17 0 [Note] Added new Master_info '' to hash table
2020-09-07 15:13:17 0 [Note] mysqld: ready for connections.

And Mari is refusing some connections attempts:

2020-09-07 15:13:22 0 [Note] mysqld: ready for connections.
Version: '10.3.24-MariaDB-1:10.3.24+maria~focal'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
2020-09-07 15:13:27 14 [Warning] Access denied for user 'frappe'@'172.19.0.10' (using password: NO)
2020-09-07 15:13:27 15 [Warning] 'proxies_priv' entry '@% root@7c5f92218c23' ignored in --skip-name-resolve mode.
2020-09-07 15:13:28 16 [Warning] Aborted connection 16 to db: '_22835929e7d52caf' user: '_22835929e7d52caf' host: '172.19.0.10' (Got an error reading communication packets)
2020-09-07 15:14:27 19 [Warning] Access denied for user '_22835929e7d52caf'@'172.19.0.12' (using password: YES)
2020-09-07 15:15:27 20 [Warning] Access denied for user '_22835929e7d52caf'@'172.19.0.12' (using password: YES)
2020-09-07 15:16:27 21 [Warning] Access denied for user '_22835929e7d52caf'@'172.19.0.12' (using password: YES)
2020-09-07 15:17:27 22 [Warning] Access denied for user '_22835929e7d52caf'@'172.19.0.12' (using password: YES)
2020-09-07 15:18:27 23 [Warning] Access denied for user '_22835929e7d52caf'@'172.19.0.12' (using password: YES)
2020-09-07 15:18:48 24 [Warning] 'proxies_priv' entry '@% root@7c5f92218c23' ignored in --skip-name-resolve mode.
2020-09-07 15:18:48 25 [Warning] 'proxies_priv' entry '@% root@7c5f92218c23' ignored in --skip-name-resolve mode.
2020-09-07 15:18:48 26 [Warning] 'proxies_priv' entry '@% root@7c5f92218c23' ignored in --skip-name-resolve mode.
2020-09-07 15:18:48 27 [Warning] 'proxies_priv' entry '@% root@7c5f92218c23' ignored in --skip-name-resolve mode.
2020-09-07 15:18:48 18 [Warning] Aborted connection 18 to db: '_22835929e7d52caf' user: '_22835929e7d52caf' host: '172.19.0.10' (Got an error reading communication packets)

The site_creator seems to be stuck (as my guess is that this container should stop by itself once the site is created. Maybe not)

Installing erpnext...
Updating DocTypes for erpnext       : [========================================] 100%
clearing...
clearing...
clearing...
clearing...
clearing...
clearing...
clearing...
clearing...
Updating customizations for Address
Updating customizations for Contact
*** Scheduler is disabled ***

Nginx seems fine. (socketio ok on 9000)

Am I missing something?

I did a retry and catched the full docker-compose output. Here is the pastebin link:
https://pastebin.com/raw/B1VeXcgG

If you need to try localhost try using env-local instead of env-production.

Thanks Revant.
I just started back from the start, using env-local instead of production with no avail. I am a bit confuse about what exact url I should use.
I get 404 when trying to access localhost.
I get a 403 when trying to access mysite.localhost.

Site name which was used to create the first site need to be used in browser to access it.

Dns based multi tenancy is used in Docker.

I cleaned the docker volumes before making the try with the env-local to clean any trace of env-production. I didn’t changed the default, which for env-localhost is ‘mysite.localhost’.
Do I need to set a DNS or add a line in /etc/hosts on my host system?

docker ps

all containers are working?

Are you inside any VM?

Running directly on the host (archlinux, amd64).
All containers seem to be working without error or abortion.

~/frappe_docker >>> docker ps                                                                                                                                                    ±[develop]
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS                                      NAMES
38417c3110b8        frappe/erpnext-worker:edge    "docker-entrypoint.s…"   7 minutes ago       Up 7 minutes        8000/tcp                                   erptest_erpnext-worker-long_1
faf872c77b8d        frappe/erpnext-worker:edge    "docker-entrypoint.s…"   7 minutes ago       Up 7 minutes        8000/tcp                                   erptest_erpnext-worker-short_1
ec47827eca06        frappe/erpnext-worker:edge    "docker-entrypoint.s…"   7 minutes ago       Up 7 minutes        8000/tcp                                   erptest_erpnext-worker-default_1
17dece411019        frappe/erpnext-worker:edge    "docker-entrypoint.s…"   7 minutes ago       Up 7 minutes        8000/tcp                                   erptest_erpnext-schedule_1
b7f817e117db        frappe/frappe-socketio:edge   "docker-entrypoint.s…"   7 minutes ago       Up 7 minutes                                                   erptest_frappe-socketio_1
c71283b7faec        redis:latest                  "docker-entrypoint.s…"   7 minutes ago       Up 7 minutes        6379/tcp                                   erptest_redis-queue_1
f18783cc195f        traefik:v2.2                  "/entrypoint.sh --lo…"   7 minutes ago       Up 7 minutes        0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   erptest_traefik_1
aeba8777e929        mariadb:10.3                  "docker-entrypoint.s…"   7 minutes ago       Up 7 minutes        3306/tcp                                   erptest_mariadb_1
b1261a3b49f5        redis:latest                  "docker-entrypoint.s…"   7 minutes ago       Up 7 minutes        6379/tcp                                   erptest_redis-cache_1
5294a5d869c6        frappe/erpnext-nginx:edge     "/docker-entrypoint.…"   7 minutes ago       Up 7 minutes        80/tcp                                     erptest_erpnext-nginx_1
1ac87c56d0d0        frappe/erpnext-worker:edge    "docker-entrypoint.s…"   7 minutes ago       Up 7 minutes        8000/tcp                                   erptest_erpnext-python_1
507f90e20ce5        redis:latest                  "docker-entrypoint.s…"   7 minutes ago       Up 7 minutes        6379/tcp                                   erptest_redis-socketio_1

Here is the output from docker-compose (without ‘-d’)

Visiting mysite.localhost gives me a 403 forbidden.
Visiting localhost goves me a 404 not found.

I added this line to /etc/hosts:
127.0.0.1 mysite.localhost

No need to restart any service after edditing hosts. Working fine now.

1 Like