Connection error on External Database Connector, which works fine with the Database Connector extension.

0
Hi, Developers.Connection error on 'External Database Connector', which works fine with the 'Database Connector' extension. Can you spot something wrong with my configuration?Here are the two screenshots showing that I used the 'External Database Connector', which raises an error.<Screenshot.1> It raises an error with connection details.<Screenshot. 2> It raises an error with the JDBC connection string.Here are additional screenshots using Database Connector, which works well.<Screenshot. 3> Microflow that executes the 'Execute query' activity from the (old) Database Connector extension.<Screemshot. 4> The JDBC connection string used from the 'Execute query' activity in the microflow above.Thanks in advance :)
asked
1 answers
0

Hi Yongpyo,

Looking at your screenshots, I noticed one important difference between the two configurations.


Your working Database Connector is using:

jdbc:postgresql://tc2512:5432/demo


But in the External Database Connector, you're testing with:

jdbc:postgresql://localhost:5432/demo


If PostgreSQL is running on tc2512 and not on the same machine/container as the Mendix Runtime, localhost will point to the Mendix runtime machine itself, so the connection will fail.


I would first try changing the External Database Connector configuration to:

jdbc:postgresql://tc2512:5432/demo

with the same username and password that you use successfully with the Database Connector.


Also, the error dialog specifically says: Make sure to test your application locally with the latest External Database Connector module included.


So I would also make sure you have the latest version of External Database Connector installed, then restart the local Mendix application before testing the connection again.


In your case, I would check these in this order:

  1. Update External Database Connector to the latest version.
  2. Restart the local Mendix application.
  3. Change localhost to tc2512.
  4. Use the same credentials as the working Database Connector.
  5. Test the connection again.


Since the old Database Connector is already connecting successfully, the PostgreSQL database itself looks fine. The main differences are the host value and the External Database Connector version/configuration.


Kindly mark this as the accepted answer if it helps..

answered