artefactual-labs / am

Development environment for Archivematica
https://archivematica.org
GNU Affero General Public License v3.0
10 stars 20 forks source link

501 Bad Gateway on http://127.0.0.1:62080 (archivematica-dashboard could not be resolved) #95

Closed lifepillar closed 4 years ago

lifepillar commented 4 years ago

I have just installed the current master following the instructions in the Readme, and I have the following containers up and running:

IMAGE                                   COMMAND                  PORTS                                            NAMES
compose_archivematica-mcp-client        "/src/MCPClient/lib/…"                                                    compose_archivematica-mcp-client_1
compose_archivematica-mcp-server        "/src/MCPServer/lib/…"                                                    compose_archivematica-mcp-server_1
compose_archivematica-storage-service   "/bin/sh -c '/usr/lo…"   8000/tcp                                         compose_archivematica-storage-service_1
artefactual/gearmand:1.1.17-alpine      "docker-entrypoint.s…"   127.0.0.1:62004->4730/tcp                        compose_gearmand_1
percona:5.6                             "/docker-entrypoint.…"   127.0.0.1:62001->3306/tcp                        compose_mysql_1
redis:3.2-alpine                        "docker-entrypoint.s…"   127.0.0.1:62003->6379/tcp                        compose_redis_1
artefactual/clamav:latest               "/run.sh"                127.0.0.1:62006->3310/tcp                        compose_clamavd_1
nginx:stable-alpine                     "nginx -g 'daemon of…"   0.0.0.0:62080->80/tcp, 0.0.0.0:62081->8000/tcp   compose_nginx_1
artefactual/fits-ngserver:0.8.4         "/usr/bin/fits-ngser…"   127.0.0.1:62005->2113/tcp                        compose_fits_1

I can access the Storage Service just fine at http://127.0.0.1:62081, but when I try to connect to the Dashboard at http://127.0.0.1:62080, I get a 501 Bad Gateway error. That is apparently due to the nginx container failing to resolve archivematica-dashboard, as docker logs reports this:

2020/06/12 12:27:14 [error] 8#8: *1 archivematica-dashboard could not be resolved (3: Host not found), client: 172.21.0.1, server: _, request: "GET / HTTP/1.1", host: "127.0.0.1:62080"

Any idea why, or any suggestions to debug that?

lifepillar commented 4 years ago

docker-compose ps shows me:

compose_archivematica-dashboard_1         /usr/local/bin/gunicorn -- ...   Exit 3 
[…]
compose_elasticsearch_1                   /usr/local/bin/docker-entr ...   Exit 78

If I try docker-compose up -d the two processes seem to get up, as docker ps now gives me:

compose_archivematica-dashboard_1         /usr/local/bin/gunicorn -- ...   Up      8000/tcp 
[…]
compose_elasticsearch_1                   /usr/local/bin/docker-entr ...   Up      127.0.0.1:62002->9200/tcp, 9300/tcp

But a few seconds after that they crash again.

lifepillar commented 4 years ago

Never mind, likely an issue with virtual memory being too low, as explained in the Readme. I wonder whether there is a way to run the development environment without Elasticsearch, though.

sevein commented 4 years ago

I wonder whether there is a way to run the development environment without Elasticsearch, though.

I've done this quite a few times. You can stop the Elasticsearch service with docker-compose down elasticsearch or even remove the service definition entirely from docker-compose.yml. Archivematica works without Elasticsearch (with limited capabilities) as long as you update the environment strings:

IIRC, when changing environment strings, you also need to rebuild the containers. Or just follow the upgrading notes.