ERROR: relation "django_content_type" does not exist at character 106 #1050
-
Current BehaviorFollowing the quickstart I:
During postgresDB initialization I see a number of errors:
and finally, Expected BehaviorI expect there to not be any errors or unhealthy warnings. Docker Compose VersionDocker Compose version v2.20.2 Docker Version
The git RevisionThe git Status
Startup Commanddocker compose up NetBox Logs
Content of docker-compose.override.ymlversion: '3.4'
services:
netbox:
ports:
- 8000:8080 |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments
-
The logs look like a normal start. Did you get the |
Beta Was this translation helpful? Give feedback.
-
I got the same error today. Did a "up" again and then it worked. Not sure if there could be a lingering error somewhere making upgrades hard in the future. |
Beta Was this translation helpful? Give feedback.
-
I am getting this same error on 3.5.6 and it appears to only happen on newly created databases: postgres-1 logs`The files belonging to this database system will be owned by user "postgres". The database cluster will be initialized with locale "en_US.utf8". Data page checksums are disabled. fixing permissions on existing directory /var/lib/postgresql/data ... ok Success. You can now start the database server using:
sh: locale: not found waiting for server to start....2023-09-22 17:18:24.664 UTC [37] LOG: starting PostgreSQL 13.12 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924, 64-bit /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/* waiting for server to shut down....2023-09-22 17:18:24.907 UTC [37] LOG: received fast shutdown request PostgreSQL init process complete; ready for start up. ` |
Beta Was this translation helpful? Give feedback.
-
Getting the same issue on b47e85a Netbox Logs
PostgreSQL Logs
|
Beta Was this translation helpful? Give feedback.
-
getting the same message. any thoughts on how to solve it? 2023-12-01 00:37:41.423 UTC [59] ERROR: relation "django_content_type" does not exist at character 106 |
Beta Was this translation helpful? Give feedback.
-
Edit: I was able to get it to work. When running creating the superuser command via the Wiki page on "Getting Started" it mentioned there were 100+ migrations remaining. It said you can run the mange.py migrate command to complete these. It took a few tries as it exited when the container was deemed unhealthy. |
Beta Was this translation helpful? Give feedback.
-
I came across same problem, but managed to run netbox. |
Beta Was this translation helpful? Give feedback.
-
This still happens with 3.2.0. Exactly the same errors and fix |
Beta Was this translation helpful? Give feedback.
-
I'm having this problem too netboxcommunity/netbox:v4.2-3.2.0
I solved the problem Run docker compose down and then run docker compose up again and it will be fixed |
Beta Was this translation helpful? Give feedback.
-
This is not a problem. When NetBox starts with an empty database it check if the tables exists. That's what you are seeing in the PostgreSQL logs. The first start takes longer because all the migrations need to be run. An explanation on how to increase the time before the container is marked as unhealthy can be found here: https://github.com/netbox-community/netbox-docker/blob/release/docker-compose.override.yml.example |
Beta Was this translation helpful? Give feedback.
-
So I was following - the guide that details "every step"... could these work arounds be added? as a new user to netbox, and this setup... without finding this bug/discussion I would have been stuck. Guide here where this info might be useful, if it's expected? https://github.com/netbox-community/netbox-docker/wiki/Getting-Started |
Beta Was this translation helpful? Give feedback.
This is not a problem. When NetBox starts with an empty database it check if the tables exists. That's what you are seeing in the PostgreSQL logs. The first start takes longer because all the migrations need to be run. An explanation on how to increase the time before the container is marked as unhealthy can be found here: https://github.com/netbox-community/netbox-docker/blob/release/docker-compose.override.yml.example