-
Notifications
You must be signed in to change notification settings - Fork 21
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
Images cannot connect to Azure DBs #35
Comments
uwsgi switches the user account Does UID/GID 29 have access to It probably shouldn't. Maybe use a file from its home directory instead, or clean out the environment before switching UID/GID |
Thanks for the pointers @wardi ! Indeed it is an issue with the user running uWSGI. Note that After some more debugging and searching I ran into this comment: psycopg/psycopg2#1535 (comment) Even when we are running How shall we proceed to fix this? We are still running uWSGI as root (but with UID/GID parameters) so maybe it is worth to switch to the It also worth noticing that we shouldn't do all the Any thoughts @kowh-ai ? |
Sorry @pdelboca - been on other things - so you are saying only when the I guess the uid and gid arguments to uwsgi creates an “effective user” change rather than a “real user”change. That makes sense given the errors you describe Wondering if there is a way to control what Could be something to try in here: https://www.postgresql.org/docs/current/libpq-envars.html |
Hello all!
I have been testing and trying this images for a deployment in Azure. However, I'm facing problems when trying to connect the instance to the Azure DB.
Steps to reproduce
a. usually something like:
postgresql://<user>:<pass>@<app>.database.azure.com/<db>?sslmode=require
sqlalchemy.url
to point to the database.You will get an error when trying to start the application. (it will fail the first time trying to connect to the database)
Mode details
After debugging for quite some hours I think the error comes from
uWSGI
(although it points to an issue reading with a certificate).Why I think this is the case? First, if I login into the container and run
ckan shell
I can access the database. If I replace thestart_ckan.sh
with a call to start CKAN usinggunicorn
it will work.This works:
This doesn't work:
Any ideas or someone else has encountered this error?
The text was updated successfully, but these errors were encountered: