Issue on loading data using JDBC data source

Amitra Bhunia
Tera Expert

I have installed mid server and mySQL database in docker in 2 deferent container,

AmitraBhunia_3-1697385190563.png

 

when I am tryin to connect the data base using data source from servicenow I am getting bellow error :

MID Server reported error: SQLState: null
java.sql.SQLException: java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=127.0.0.1)(port=3306)(type=master) : Connection refused (Connection refused).

AmitraBhunia_0-1697384556971.png

 

 below is my data source configuration:

 

AmitraBhunia_1-1697384684013.png

I am able to connect the database and execute mySQL query from VS Code using below connection:

AmitraBhunia_2-1697385054663.png

Please help me on establishing the connection if anyone have worked on this.

 

 

13 REPLIES 13

Amitra Bhunia
Tera Expert

I really need help on this thread. Thanks in advance.

Amitra Bhunia
Tera Expert

Any help is appreciated.

VivekSattanatha
Mega Sage
Mega Sage

It appears that the mid server running within the Docker container is experiencing a network connectivity issue with the SQL database, resulting in the reported firewall error. The action you are attempting to perform from Visual Studio Code involves connecting to the localhost of your local device, be it a laptop, desktop, or server. However, the mid server within the Docker container does not recognize the address 127.0.0.1, leading to the problem.

Then How can I identify the ip for the database server in docker, any idea?