-
Notifications
You must be signed in to change notification settings - Fork 217
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
Authentication failed with hostname #300
Comments
When you run the |
Same version.
|
In that case it is hardly possible. This library passes the connection string directly into the Something else must be missing that you didn't disclose. I can't think of single reason to even start looking into it. And it is certainly not reproducible. You will have to diagnose the issue on your side a little better to see what is really going on. |
OK, I will dig a little deeper. Thanks. |
I would start by adding: console.log('CONNECTION:', ctx.cn); right above this line: https://github.com/vitaly-t/pg-promise/blob/master/lib/connect.js#L11 ...to see that the library executes precisely in the same way as you do separately with the |
Oh for cry-sake... const config = {
host: 'my.database.hostname.com',
port: 5432,
database: 'mydb',
user: 'myuser',
pass: 'myuserpass',
poolSize: 10
} The config expects |
GAH! apologies. Thank you for taking a look. |
Hi,
I'm having an odd (at least to me) authentication problem.
ubuntu version: 16.04
postgres version: 9.6
node version: 6.9.4
pg-promise version: 5.6.1
pg version: 5.1
I have a user/pass which I know is correct because I
ALTER USER
'd then checked locally withpsql -U ...
(turning off local trust). However authentication fails when usingpg-promise
, but notpg
.Test code:
When I run the code as above, I get an authentication error. From the postgres logs:
And the js output:
HOWEVER, if I change
my.database.hostname.com
tolocalhost
I connect without issue and everything is happy.At first, I thought my problem might be related to brianc/node-postgres#1000, but I think I have the right package versions.
Then I thought that I just wasn't understanding postgres authentication and the
pg_hba.conf
. However, the pg_hba.conf line above really does look correct AND, when I run the test with thenode-postgres
package alone:I connect just fine with either
my.database.hostname.com
orlocalhost
Am I missing something?
The text was updated successfully, but these errors were encountered: