Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

psycopg connection issue #1178

Closed
sergey-kalikin-adjust opened this issue Mar 19, 2024 · 2 comments
Closed

psycopg connection issue #1178

sergey-kalikin-adjust opened this issue Mar 19, 2024 · 2 comments

Comments

@sergey-kalikin-adjust
Copy link

sergey-kalikin-adjust commented Mar 19, 2024

Desired Behavior

My test stand has postgresql and redis running as Docker containers (docker.io/postgres:16-alpine and docker.io/redis:7-alpine). Netbox is installed in k8s via helm chart that is using netboxcommunity/netbox images.
Netbox containers connect to external redis and postgresql fine. Migrations are working. App is running.

Contrast to Current Behavior

In my case when trying to start a container migration check fails:

django.db.utils.OperationalError: connection failed: %IP%), port 5432 failed: server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.

At the same time if I telnet or psql to db from the same host (or even ./manage.py dbshell) it is working fine.

Required Changes

If going inside the container, activating venv and upgrading psycopg from 3.1.16 to 3.1.18 only then ./manage migrate start's working.
Please bump the version in requirements-container.txt

Discussion: Benefits and Drawbacks

Why is it different from requirements.txt anyway?

@tobiasge
Copy link
Member

We changed the dependency because Netbox uses the binary install and not the compiled version. But there is a PR to change that: netbox-community/netbox#15468
Then we will remove the extra dependency from the image. The next release will contain version 3.1.18 (it's already in the develop branch).

@sergey-kalikin-adjust
Copy link
Author

@tobiasge thanks!
Are you talking about the next release of Netbox, that is v4.0? Or you are talking about the next netbox-docker release that might be before that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants