JDBC connection timeout

Connectivity
N/A

JDBC connection timeout

The error message is attached below.  The main issue is that I have existing code that's working locally (surprise!) but when deployed to a different machine, I'm getting these connection timeouts.  Ping is good from the same client, but I acknowledge that firewall settings may be an issue, still.  Does anyone here have any thoughts about what may be at issue?  The actual connection code used can be produced, but I don't have it in front of me.  Mainly, I'm trying to get at any driver-configurable factors that people may be aware of that will lead to inconsistent behavior across machines like this.

2015-10-13.22:17:28.333 TERAJDBC4 ERROR [main] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@3cd1f1c8 Connection to XXXXXXX.DOMAIN.COM Tue Oct 13 22:17:28 UTC 2015 socket orig=XXXXXXX.DOMAIN.COM cid=ef9296d sess=0 java.net.SocketTimeoutException: connect timed out  at java.net.PlainSocketImpl.socketConnect(Native Method)  at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)  at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)  at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)  at java.net.Socket.connect(Socket.java:589)  at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$ConnectThread.run(TDNetworkIOIF.java:1217) 

ERROR: Unable to obtain Jdbc connection from DataSource (jdbc:teradata://XXXXXX.DOMAIN.COM/database=XXX,LOGMECH=TD2,DBS_PORT=1025) for user 'USERNAME': [Teradata JDBC Driver] [TeraJDBC 15.10.00.07] [Error 1277] [SQLState 08S01] Login timeout for Connection to XXXXXX.DOMAIN.COM Tue Oct 13 22:17:28 UTC 2015 socket orig=XXXXXXX.DOMAIN.COM cid=ef9296d sess=0 java.net.SocketTimeoutException: connect timed out  at java.net.PlainSocketImpl.socketConnect(Native Method)  at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)  at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)  at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)  at java.net.Socket.connect(Socket.java:589)  at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$ConnectThread.run(TDNetworkIOIF.java:1217) 

1 REPLY
Teradata Employee

Re: JDBC connection timeout

The exception stack trace shows that the Teradata JDBC Driver was unable to connect to the Teradata Database.

If you are able to ping the Teradata Database from the client, but the Teradata JDBC Driver is unable to connect to the Teradata Database via port 1025, then Yes, your firewall may be blocking the connection.

If this is a multi-node Teradata Database, the firewall should be configured to permit connections to each Teradata Database node that is running a Gateway process.