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

FATAL: role "root" does not exist #199

Closed
signed opened this issue Mar 3, 2018 · 10 comments
Closed

FATAL: role "root" does not exist #199

signed opened this issue Mar 3, 2018 · 10 comments

Comments

@signed
Copy link
Contributor

signed commented Mar 3, 2018

I'm running a local pact_broker in docker as described here but without the nginx.

postgres: postgres:10.2
broker_app: dius/pact-broker:2.15.0-2

every ~40 seconds I get a log line like this

postgres_1 | 2018-03-03 17:45:42.031 UTC [13008] FATAL: role "root" does not exist
postgres_1 | 2018-03-03 17:46:12.108 UTC [13022] FATAL: role "root" does not exist

As far as I can tell the pact broker seems to be working fine.

@bethesque
Copy link
Member

Sorry, I don't know what's causing that. I'd recommend using the official docker image from https://hub.docker.com/r/dius/pact-broker/

@mefellows
Copy link
Member

@signed could you please provide your exact setup?

@bethesque it looks like they are using the official docker image, unless I'm missing something.

One guess, is that the environment variables could be mismatched, so that something like POSTGRES_USER=root is set, but the broker is using PACT_BROKER_DATABASE_USERNAME: postgres. But that doesn't explain how it is working!

@mefellows mefellows removed the triage label Mar 4, 2018
@mefellows
Copy link
Member

Just confirmed this FATAL: role "root" does not exist appears in my local too.

@bethesque
Copy link
Member

Sorry @signed, I misunderstood you. Thanks Matt. I'm still none the wiser!

@bethesque
Copy link
Member

It could be the connection validator here: https://github.com/DiUS/pact_broker-docker/blob/master/pact_broker/database_connection.rb#L19

You could try disabling that and see what happens.

@mefellows
Copy link
Member

I think it might actually be a healthcheck process, potentially run by Docker, as it happens regularly (every 30s) in the background, even if the app is not being used.

@mefellows
Copy link
Member

OK, so it looks like the healthcheck on the database container.

    healthcheck:
      test: psql postgres --command "select 1"

I can reproduce the error if I execute the healthcheck command:

matt ~/development/public/pact_broker-docker λ docker exec -it pactbrokerdocker_postgres_1 psql postgres --command "select 1"
psql: FATAL:  role "root" does not exist

I think we just need to update the healthcheck with a user that exists.

@mefellows
Copy link
Member

Just pushed a fix. Hope that helps!

@signed
Copy link
Contributor Author

signed commented Mar 4, 2018

Yes, this helped.
Thank you for the quick support.

@mefellows
Copy link
Member

You're welcome!

YOU54F pushed a commit to YOU54F/pact_broker that referenced this issue Jul 31, 2024
* feat: handle RFC section links in md to html respec

* chore: markdown formatting

* chore: markdown format

* chore: fix ToC generation in respec
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

3 participants