Skip to content

password authentication failed for user "postgres" under node.js 6 on windows 10. #138

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

Closed
solenovex opened this issue Apr 27, 2016 · 10 comments

Comments

@solenovex
Copy link

password authentication failed for user "postgres" under node.js 6 on windows 10.
I just install node.js 6 on my windows 10, it worked very well with node.js 5.10 on my machine before updating。
I'm pretty sure my password in datasource.json is correct.

here is the message:
`
Connection fails: { error: password authentication failed for user "postgres"
at Connection.parseE (D:\Projects\strongloop\sl-stack\server\node_modules\pg\lib\connection.js:539:11)
at Connection.parseMessage (D:\Projects\strongloop\sl-stack\server\node_modules\pg\lib\connection.js:366:17)
at Socket. (D:\Projects\strongloop\sl-stack\server\node_modules\pg\lib\connection.js:105:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:172:18)
at Socket.Readable.push (_stream_readable.js:130:10)
at TCP.onread (net.js:535:20)
at TCP.onread (D:\Projects\strongloop\sl-stack\server\node_modules\async-listener\glue.js:188:31)
name: 'error',
length: 97,
severity: 'FATAL',
code: '28P01',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'auth.c',
line: '285',
routine: 'auth_failed' }
It will be retried for the next request.
events.js:160
throw er; // Unhandled 'error' event
^

error: password authentication failed for user "postgres"
at Connection.parseE (D:\Projects\strongloop\sl-stack\server\node_modules\pg\lib\connection.js:539:11)
at Connection.parseMessage (D:\Projects\strongloop\sl-stack\server\node_modules\pg\lib\connection.js:366:17)
at Socket. (D:\Projects\strongloop\sl-stack\server\node_modules\pg\lib\connection.js:105:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:172:18)
at Socket.Readable.push (_stream_readable.js:130:10)
at TCP.onread (net.js:535:20)
at TCP.onread (D:\Projects\strongloop\sl-stack\server\node_modules\async-listener\glue.js:188:31)`

@mirow
Copy link

mirow commented Apr 28, 2016

Yup, fails on Ubuntu too, so it's not a Windows issue.
Postgres logfile says:

FATAL   password authentication failed for user "postgres"  
DETAIL  Connection matched pg_hba.conf line 82: "host all all 127.0.0.1/32 md5" 

If I switch back to node v5.10, it works fine.

@mirow
Copy link

mirow commented Apr 28, 2016

Updating the "pg" dependency to the latest version (v4.5.5) fixes this problem.

@solenovex
Copy link
Author

@mirow
yes, updating the "pg" to latest version really fixed the problem.
thanks!!!

@upupzealot
Copy link

you saved my day!!
this problem shoud be solved somehow!!

@Pavubrar
Copy link

my pg is up to date but still have this error.

@Crisfon6
Copy link

My pg is update and i have this error

@adrielav2
Copy link

Yeah got the error too, what should i do

@Crisfon6
Copy link

I share my solution to this problem here

https://stackoverflow.com/questions/62957352/connection-failed-postgres

@Salonii02
Copy link

Yeah got the error too, what should i do

my pg is up to date but still have this error.

how did you resolve it?

@YeahWeReTrying1
Copy link

please anyone help me find a solution to the this exact problem

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

8 participants