Connection intermittently made, rejects connection with password authentication failure notice
See original GitHub issueOSX 10.11.4 PG 9.4.8 Using pg module.
var pg = require('pg');
var conString = "postgres://postgres:REDACTED@localhost/testDb";
pg.connect(conString, function(err, client, done) {
if(err) {
return console.error('error fetching client from pool', err);
}
client.query('SELECT $1::int AS number', ['1'], function(err, result) {
//call `done()` to release the client back to the pool
done();
if(err) {
return console.error('error running query', err);
}
console.log(result.rows[0].number);
//output: 1
});
});
I get the following error:
error fetching client from pool { error: password authentication failed for user “postgres”
Then if I run this code with node - say - 10-15 times, it’ll work once out of those attempts.
I’ve reinstalled postgres and made sure the passwords match. I tried performing an alter user for the password. I tried killing all open connections with pg_terminate_backend(pid). Still fails. Any help would be appreciated. Everything was working with this prior to upgrading to El Capitan, is El Capitan not supported?
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (7 by maintainers)
Top Results From Across the Web
You are intermittently prompted for credentials or experience ...
You are intermittently prompted for credentials or experience time-outs when you connect to Authenticated Services. Windows Server 2008 R2 Datacenter ...
Read more >WiFi Authentication error on Android【SOLVED】| updato.com
The Android Wi-Fi authentication problem manifests when you unsuccessfully try to connect to a Wi-Fi network with the correct password.
Read more >Git push results in "Authentication Failed" - Stack Overflow
If you enabled two-factor authentication in your GitHub account you won't be able to push via HTTPS using your accounts password.
Read more >Tips to fix your SSH authentication issues - ARDC Support
If it is not running, the operating system on your instance will "refuse" connection requests. Diagnosis: Login via the VNC console and use...
Read more >Resolving User Login Authentication Failure Issues
You must log in to Oracle WebLogic Server Administration Console and Fusion Middleware Control with the username and password that you specified for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
it work after adding this host all all 0.0.0.0/0 md5 in pg_hba.conf file.
@FarhanAhmad212 This is very bad. You should try more secure way.