Issue connecting to Azure Postgres DataBase Netbox v3.6.2 #1088
Replies: 4 comments 2 replies
-
Hey @AzRe3aL This error... "django.db.utils.OperationalError: connection failed: could not open certificate file "/root/.postgresql/postgresql.crt": Permission denied" Try setting your certificates to somewhere that Netbox can access them. Or set the persions on the directory
That would be my guess. |
Beta Was this translation helpful? Give feedback.
-
Did you find how to fix the issue or any workaround? Thanks. |
Beta Was this translation helpful? Give feedback.
-
Here is my workaround. My Dockerfile `` FROM netboxcommunity/netbox:v3.7.6-2.8.0
USER root
RUN curl -LJO https://truststore.pki.rds.amazonaws.com/eu-west-1/eu-west-1-bundle.pem -o /tmp/eu-west-1-bundle.pem
RUN mkdir -p /root/.postgresql
RUN curl https://truststore.pki.rds.amazonaws.com/eu-west-1/eu-west-1-bundle.pem -o /root/.postgresql/postgresql.crt
RUN chmod -R 777 /root For PEM files in other regions, https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html#UsingWithRDS.SSL.RegionCertificates |
Beta Was this translation helpful? Give feedback.
-
I am wondering about this issue as well. |
Beta Was this translation helpful? Give feedback.
-
Updated from v3.5 > 3.6.3
The container starts up and runs through start-up scripts. when attempting to connect to netbox webUI (Error 503) when looking at the logs I see
django.db.utils.OperationalError: connection failed: could not open certificate file "/root/.postgresql/postgresql.crt": Permission denied
connection to server at "MY AZURE DATABASE" (x.x.x.x), port 5432 failed: FATAL: no pg_hba.conf entry for host "x.x.x.x", user "xxxxxxxxxxx", database "xxxxxxxxxxx", SSL off
x.x.x.x - - [21/Sep/2023:14:32:03 +0000] "GET / HTTP/1.1" 503 54 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
2023/09/21 14:34:04 [notice] 20#20 app process 21 exited with code 0
Any help would be greatly appreciated
Beta Was this translation helpful? Give feedback.
All reactions