nautobot-docker-compose
nautobot-docker-compose copied to clipboard
docker compose up error
nautobot-docker-compose-main-nautobot-1 | Traceback (most recent call last):
nautobot-docker-compose-main-nautobot-1 | File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
nautobot-docker-compose-main-nautobot-1 | self.connect()
nautobot-docker-compose-main-nautobot-1 | File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
nautobot-docker-compose-main-nautobot-1 | return func(*args, **kwargs)
nautobot-docker-compose-main-nautobot-1 | File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 200, in connect
nautobot-docker-compose-main-nautobot-1 | self.connection = self.get_new_connection(conn_params)
nautobot-docker-compose-main-nautobot-1 | File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
nautobot-docker-compose-main-nautobot-1 | return func(*args, **kwargs)
nautobot-docker-compose-main-nautobot-1 | File "/usr/local/lib/python3.9/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
nautobot-docker-compose-main-nautobot-1 | connection = Database.connect(**conn_params)
nautobot-docker-compose-main-nautobot-1 | File "/usr/local/lib/python3.9/site-packages/psycopg2/init.py", line 122, in connect
nautobot-docker-compose-main-nautobot-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
nautobot-docker-compose-main-nautobot-1 | psycopg2.OperationalError: could not translate host name "db" to address: Name or service not known
nautobot-docker-compose-main-nautobot-1 |
nautobot-docker-compose-main-nautobot-1 |
nautobot-docker-compose-main-nautobot-1 | The above exception was the direct cause of the following exception:
nautobot-docker-compose-main-nautobot-1 |
nautobot-docker-compose-main-nautobot-1 | Traceback (most recent call last):
nautobot-docker-compose-main-nautobot-1 | File "/usr/local/bin/nautobot-server", line 8, in
That looks like there was something with the database that happened. What does the nautobot-docker-compose-main-db-1
logs show?
@jvanderaa i got the same error:
docker-compose -f docker-compose.yaml up
[+] Building 0.0s (0/0)
[+] Running 3/3
✔ Network nautobot_default Created 0.0s
✔ Container nautobot-db-1 Created 0.1s
✔ Container nautobot-nautobot-1 Created 0.1s
Attaching to nautobot-db-1, nautobot-nautobot-1
nautobot-db-1 |
nautobot-db-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
nautobot-db-1 |
nautobot-db-1 | 2023-05-31 17:34:06.953 UTC [1] LOG: starting PostgreSQL 13.11 (Debian 13.11-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
nautobot-db-1 | 2023-05-31 17:34:06.953 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
nautobot-db-1 | 2023-05-31 17:34:06.953 UTC [1] LOG: listening on IPv6 address "::", port 5432
nautobot-db-1 | 2023-05-31 17:34:06.958 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
nautobot-db-1 | 2023-05-31 17:34:06.966 UTC [27] LOG: database system was interrupted; last known up at 2023-05-31 17:32:10 UTC
nautobot-db-1 | 2023-05-31 17:34:07.014 UTC [27] LOG: database system was not properly shut down; automatic recovery in progress
nautobot-db-1 | 2023-05-31 17:34:07.017 UTC [27] LOG: redo starts at 0/15D0158
nautobot-db-1 | 2023-05-31 17:34:07.017 UTC [27] LOG: invalid record length at 0/15D0190: wanted 24, got 0
nautobot-db-1 | 2023-05-31 17:34:07.017 UTC [27] LOG: redo done at 0/15D0158
nautobot-db-1 | 2023-05-31 17:34:07.034 UTC [1] LOG: database system is ready to accept connections
nautobot-nautobot-1 | Traceback (most recent call last):
nautobot-nautobot-1 | File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
nautobot-nautobot-1 | self.connect()
nautobot-nautobot-1 | File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
nautobot-nautobot-1 | return func(*args, **kwargs)
nautobot-nautobot-1 | File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 200, in connect
nautobot-nautobot-1 | self.connection = self.get_new_connection(conn_params)
nautobot-nautobot-1 | File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
nautobot-nautobot-1 | return func(*args, **kwargs)
nautobot-nautobot-1 | File "/usr/local/lib/python3.9/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
nautobot-nautobot-1 | connection = Database.connect(**conn_params)
nautobot-nautobot-1 | File "/usr/local/lib/python3.9/site-packages/psycopg2/init.py", line 122, in connect
nautobot-nautobot-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
nautobot-nautobot-1 | psycopg2.OperationalError: could not translate host name "db" to address: Name or service not known
nautobot-nautobot-1 |
nautobot-nautobot-1 |
nautobot-nautobot-1 | The above exception was the direct cause of the following exception:
nautobot-nautobot-1 |
nautobot-nautobot-1 | Traceback (most recent call last):
nautobot-nautobot-1 | File "/usr/local/bin/nautobot-server", line 8, in
nautobot-redis-1 | 1:C 01 Jun 2023 17:50:22.279 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo nautobot-redis-1 | 1:C 01 Jun 2023 17:50:22.279 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started nautobot-redis-1 | 1:C 01 Jun 2023 17:50:22.279 # Configuration loaded nautobot-redis-1 | 1:M 01 Jun 2023 17:50:22.279 * monotonic clock: POSIX clock_gettime nautobot-redis-1 | 1:M 01 Jun 2023 17:50:22.280 * Running mode=standalone, port=6379. nautobot-redis-1 | 1:M 01 Jun 2023 17:50:22.280 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. nautobot-redis-1 | 1:M 01 Jun 2023 17:50:22.280 # Server initialized nautobot-redis-1 | 1:M 01 Jun 2023 17:50:22.289 * Creating AOF base file appendonly.aof.1.base.rdb on server start nautobot-redis-1 | 1:M 01 Jun 2023 17:50:22.297 * Creating AOF incr file appendonly.aof.1.incr.aof on server start nautobot-redis-1 | 1:M 01 Jun 2023 17:50:22.297 * Ready to accept connections nautobot-db-1 | nautobot-db-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization nautobot-db-1 | nautobot-db-1 | 2023-06-01 17:50:22.478 UTC [1] LOG: starting PostgreSQL 13.11 (Debian 13.11-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit nautobot-db-1 | 2023-06-01 17:50:22.478 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 nautobot-db-1 | 2023-06-01 17:50:22.478 UTC [1] LOG: listening on IPv6 address "::", port 5432 nautobot-db-1 | 2023-06-01 17:50:22.498 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" nautobot-db-1 | 2023-06-01 17:50:22.509 UTC [26] LOG: database system was interrupted; last known up at 2023-06-01 17:46:33 UTC nautobot-db-1 | 2023-06-01 17:50:22.590 UTC [26] LOG: database system was not properly shut down; automatic recovery in progress nautobot-db-1 | 2023-06-01 17:50:22.593 UTC [26] LOG: redo starts at 0/15D07A0 nautobot-db-1 | 2023-06-01 17:50:22.593 UTC [26] LOG: invalid record length at 0/15D07D8: wanted 24, got 0 nautobot-db-1 | 2023-06-01 17:50:22.593 UTC [26] LOG: redo done at 0/15D07A0 nautobot-db-1 | 2023-06-01 17:50:22.613 UTC [1] LOG: database system is ready to accept connections
nautobot-celery_worker-1 | [2023-06-01 17:50:28,535: ERROR/MainProcess] consumer: Cannot connect to redis://:@redis:6379/0: Error -2 connecting to redis:6379. Name or service not known.. nautobot-celery_worker-1 | Trying again in 2.00 seconds... (1/100) nautobot-celery_worker-1 | nautobot-celery_worker-1 | [2023-06-01 17:50:30,542: ERROR/MainProcess] consumer: Cannot connect to redis://:@redis:6379/0: Error -2 connecting to redis:6379. Name or service not known.. nautobot-celery_worker-1 | Trying again in 4.00 seconds... (2/100) nautobot-celery_worker-1 | nautobot-celery_worker-1 | [2023-06-01 17:50:34,551: ERROR/MainProcess] consumer: Cannot connect to redis://:**@redis:6379/0: Error -2 connecting to redis:6379. Name or service not known..
I'm going to try to recreate this. In both cases it looks like the Docker DNS is failing to resolve the DNS names.
This is no longer relevant so closing.