chop-dbhi / sql-agent

HTTP interface for executing ad-hoc SQL queries.
BSD 2-Clause "Simplified" License
93 stars 23 forks source link

pq: unknown authentication response #20

Open xQuai opened 2 years ago

xQuai commented 2 years ago

Hello everyone,

I wanted to use the go program in combination with prometheus-sql to monitor a postgres database. However, I get an error when trying to connect to the database. following error: 503 Service Unavailable: problem connecting to database: pq: unknown authentication response: 10

Is it possible that the problem occurs due to a postgres go library that is too old in combination with a database version that is too new?

If so, could you please update the Postgres library in the program?

The Postgres go library used in this program is from 2018.

Regards, xQuai

bruth commented 2 years ago

Hi @xQuai, it certainly is possible. We are going to do a round of development shortly to get everything updated.

xQuai commented 2 years ago

Thank you. 👍

brokenintuition commented 2 years ago

Hi @xQuai,

We've pushed a new version with the updated postgres library (and a few other updates) to dbhi/sql-agent:latest. Please try out the new version. Thanks!

xQuai commented 2 years ago

Hi @brokenintuition,

its working for me now. Thank you. 🙂

VladoDemcak commented 2 years ago

looks like the issue is still there for postgres 14. however the latest dbhi/sql-agent:latest version from Jun 2022 works well with postgres 13.7.

@brokenintuition

brokenintuition commented 2 years ago

@VladoDemcak my apologies, I never actually committed the lib/pq version update in the last change and tested with a database that was old enough that I didn't catch it. I pushed a new version to dbhi/sql-agent:latest that appears to work with postgres 14