postgresql server connection using Node-red to query

Hello everybody,

I want to connect my postgresql server with ctrlx. The Idea is to use Node-red with the help of node-red-contrib-re-postgres to query my database. However when trying to connect to the database hosted on windows i get the following error:

Error: connect ECONNREFUSED 127.0.0.1:5432

Did anybody try connecting to a database from the virtual ctrlX using Node-red? If thats the case I would be realy happy if somebody can help me out.

ย 

kind regards

Best reply by FooFighter

Hello,

from the virtual control inside qemu the windows host pc always has the ip 10.0.2.2

If your db listens on your local windows on port 5432, then you should have access from the virtual control on 10.0.2.2:5432

Regards,
Oliver

View original
8 replies