FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
01-31-2022 03:02 PM
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
Solved! Go to Solution.
02-02-2022 10:52 AM
It looks like you are using the control in port forwarding mode. Did you enter the needed port 5432 to forwarding list?
02-04-2022 02:21 PM
02-04-2022 02:55 PM
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.
02-04-2022 05:28 PM
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.
02-09-2022 09:42 AM
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).
02-09-2022 09:54 AM
02-09-2022 03:14 PM
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
02-14-2022 10:45 AM
Hello Oliver,
thank you for your reply. Your solution worked 😀 !!
kind regards,
Mohamed