Connection error with nodejs while connecting to postgres.

16 views
Skip to first unread message

sank...@gmail.com

unread,
Feb 18, 2019, 12:05:13 PM2/18/19
to nodejs
I'm able to connect to postgre database in my local machine and postgre database with public ip using nodejs. But im unable to connect to postgre  instance in other machines on different network.Im getting error  


Error: connect ETIMEDOUT ip:port
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1117:14)

What could be the reason.I configured the pg_hba.conf to listen to all ips.But even though im getting the error.What could the reason.Im unable to figure it out.Please help me.

DaneiL

unread,
Feb 18, 2019, 8:42:45 PM2/18/19
to nod...@googlegroups.com
if you can connect via psql command, you should connect via nodejs instance.
psql -U <user> -h <ip>

--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/88730842-d584-4b2d-873f-d52b935a9b0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
[]'s
Reply all
Reply to author
Forward
0 new messages