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

[PM] usagedataurl does not work #482

Closed
calebAtIspot opened this issue Mar 25, 2024 · 2 comments
Closed

[PM] usagedataurl does not work #482

calebAtIspot opened this issue Mar 25, 2024 · 2 comments

Comments

@calebAtIspot
Copy link
Contributor

I created a AWS RDS database for posit package manager, but I got an error when posit PM in Kubernetes tried to connect to the usage data database.

2024/03/21 22:48:11 Error running services: Error: Unable to initialize a connection to the metrics database: Unable to connect to DB: failed to connect to `host=foo.prod.ispot.tv user=foo database=rstudiopmmetrics`: server error (FATAL: no pg_hba.conf entry for host "10.224.112.11", user "foo", database "rstudiopmmetrics", no encryption (SQLSTATE 28000))

I’ve confirmed that the postgres URI I supplied is correct. I can use it with psql to access the database

I contacted support (ticket #102884, logs and configuration attached) but their response didn't make sense. I can log in to the database from a kubernetes pod with the same URI and password so I know it's not a network issue. Also I can't edit the pg_hba.conf entry on the database server because RDS is a a fully AWS managed database server. I don't have ssh access to the RDS server.

@calebAtIspot
Copy link
Contributor Author

Solution:
I disabled usage data to work around the issue:

  config:
    Server:
      UsageDataEnabled: false

@colearendt
Copy link
Contributor

colearendt commented Mar 26, 2024

Howdy @calebAtIspot ! Thanks so much for submitting this issue. Sorry for the trouble you're seeing!

I have seen this issue crop up a few times. I believe this error is coming because of requirements around TLS! I believe if you add a query parameter like ?sslmode=require, that should fix your issue 😄

The hint is this , no encryption section of the error message. I believe psql and other client libraries will occasionally upgrade more directly / gracefully than our client library and thus do not hit this issue.

I hope that helps! I will send this info internally to see if we can't improve our triage process a bit! (or craft a better error message in the product!).

Quite surprising that this is not hitting your main database connection though, too!

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