-
Notifications
You must be signed in to change notification settings - Fork 5
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
FATAL: role "$POSTGRES_USER" does not exist #15
Comments
@dangernil might need to investigate further the docker image |
* update test command * comment terraform-required_providers * update cd/ci test with condition
Have been struggling with this issue. The error seems to disappear when using user provided username in the service {
...
check {
...
command = "/usr/local/bin/pg_isready"
args = ["-U", "${username}"]
...
} However for some reason it does not like using env variables in the service {
...
check {
...
command = "/usr/local/bin/pg_isready"
args = ["-U", "$POSTGRES_USER"]
...
} Problem with the latter is that I think we need to get the username from Vault, but I'm not sure how we can achieve this since the Suggestions would be dearly appreciated 🙏 @pdmthorsrud @zhenik @dangernil |
Considering the error msg EDIT: Shouldn't it be "${POSTGRES_USER}"? https://www.nomadproject.io/docs/runtime/interpolation |
If you want access env variable from host container and avoid rendering issues with terraform, you can try to use double
Also, it is important to notice the I have checked that |
Oooh, that might be it, I was thinking in the wrong context. Disregard my earlier comment, I am wrong! |
This resolves to the following error 😅 : 2020-11-13 13:49:10.371 UTC [114] FATAL: role "$$POSTGRES_USER" does not exist I will look more into the documentation you have linked 🤞 |
Eyo, just wanted to mention that this is something that has actually surfaced again. To be frank, I'm guessing it never really went away. What implications it has I'm not sure of. Postgres seems to be working fine while doing queries directly to postgres at least edit: if someone outside of Skatteetaten sees this I'm sorry, I just linked to an internal project in skatteetaten 🤷 |
Will post it here if it can help someone. I had the same error in Kubernetes livenessProbe, that how I specified the command: |
Error message in nomad Postgres service stderr saying postgress_user does not exits
Docker env does show a postgres_user
ERROR MSG:
FATAL: role "$POSTGRES_USER" does not exist
The text was updated successfully, but these errors were encountered: