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.
Solved! Go to Solution.
It looks like you are using the control in port forwarding mode. Did you enter the needed port 5432 to forwarding list?
thank you for your reply. When setup port forwarding, the ctrlX does not boot and remains offline. The error message I get is the one attached.
The error simply means that port 8443 is already in use on your PC by another process. Please check that only one ctrlX COREvirtual in port forwarding is running with standard settings.
A bigger screenshot of the whole page is always better because of more information are available.
I have choosen the right port 8444:5432 (where 5432 is used by by Postgres). I am setting in my Postgres node that it should use localhost and the port 5432, however I still get the same error. I've tried running node-Red and is working with my DB (reading and writing), however when running Node-Red on virtual ctrlX it keeps complaining.
For e.g. 8022:22
The right port is the internal port of the ctrlX COREvirtual and the left port is the one where it is mapped to on your host operating system.
So in your case it should be 5432:5432 because your DB is expecting it on the host OS (left) and then inside of your ctrlX COREvirtual the same port number is used by your client (right).
yes, that was my initial thought. However, when I do that, the virtual ctrlX refuses to boot.
It says that it could not set up the port forwarding rule 5432:5432.
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