Four Stars

tMYSQLConnection issue

Hi Team,

 

I'm trying to connect to MySql database via SSH Tunnel but the connection in not working and I'm getting the following error:

 

Starting job testing at 15:00 10/05/2018.

[statistics] connecting to socket on port 3951
[statistics] connected
Exception in component tMysqlConnection_1
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117)
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:668)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1078)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2412)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2445)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2230)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:813)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at aptos_digital_commerce.testing_0_1.testing.tMysqlConnection_1Process(testing.java:1021)
at aptos_digital_commerce.testing_0_1.testing.runJobInTOS(testing.java:1603)
at aptos_digital_commerce.testing_0_1.testing.main(testing.java:1141)
Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3039)
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:592)
... 18 more
[statistics] disconnected
Job testing ended at 15:24 10/05/2018. [exit code=1]

 

 

I'm using TOS DI 5.4.1 on Java7. 
Fo DB: MySqlWorkbench and Putty for SSH connection. 

 

Please suggest some solution. Thanks.

1 REPLY
Six Stars

Re: tMYSQLConnection issue

please check, if you can able to connect from backend on the server where Talend is installed.