Error"java.io.IOException: Bad response message header with invalid message length of 6600541 bytes"

Connectivity
Tourist

Error"java.io.IOException: Bad response message header with invalid message length of 6600541 bytes"

Hi Team, 

 

I am receiving the following error when I read all the records of a teradata table using jdbc driver: 


2017-12-08.12:33:15.117 TERAJDBC4 ERROR [main] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@b97c004 Read message 1 failed; closing socket due to: java.io.IOException: Bad response message header with invalid message length of 6600541 bytes 
2017-12-08.12:33:15.132 TERAJDBC4 ERROR [main] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@b97c004 Packet receive Fri Dec 08 12:33:15 CET 2017 socket orig=tera16 local=0.0.0.0/0.0.0.0:57179 remote=tera16cop9:1025 keepalive=unavailable nodelay=unavailable receive=unavailable send=unavailable linger=unavailable traffic=unavailable concurrent=3 contimeout=10000 conwait=1000 connecttime=16 connecttotaltime=16 connectattempts=1 connectfailures=0 reconnectattempts=0 recoverable=false redrive=false failurecache={} cid=1d082e88 sess=246344 java.io.IOException: Bad response message header with invalid message length of 6600541 bytes at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.read(TDNetworkIOIF.java:768) at com.teradata.jdbc.jdbc_4.io.TDPacketStream.readStream(TDPacketStream.java:768) at com.teradata.jdbc.jdbc_4.statemachine.StatementReceiveState.action(StatementReceiveState.java:141) at com.teradata.jdbc.jdbc_4.statemachine.StatementController.runBody(StatementController.java:137) at com.teradata.jdbc.jdbc_4.statemachine.StatementController.run(StatementController.java:128) at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:387) at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:329) at com.teradata.jdbc.jdbc_4.TDStatement.doNonPrepExecuteQuery(TDStatement.java:317) at com.teradata.jdbc.jdbc_4.TDStatement.executeQuery(TDStatement.java:1106) at extractsid.test_lecture_0_1.test_lecture.tTeradataInput_1Process(test_lecture.java:865) at extractsid.test_lecture_0_1.test_lecture.tTeradataConnection_1Process(test_lecture.java:474) at extractsid.test_lecture_0_1.test_lecture.runJobInTOS(test_lecture.java:1455) at extractsid.test_lecture_0_1.test_lecture.main(test_lecture.java:1289) 
Exception in component tTeradataInput_1 
java.sql.SQLException: [Teradata JDBC Driver] [TeraJDBC 15.10.00.14] [Error 804] [SQLState 08S01] Socket communication failure for Packet receive Fri Dec 08 12:33:15 CET 2017 socket orig=tera16 local=0.0.0.0/0.0.0.0:57179 remote=tera16cop9:1025 keepalive=unavailable nodelay=unavailable receive=unavailable send=unavailable linger=unavailable traffic=unavailable concurrent=3 contimeout=10000 conwait=1000 connecttime=16 connecttotaltime=16 connectattempts=1 connectfailures=0 reconnectattempts=0 recoverable=false redrive=false failurecache={} cid=1d082e88 sess=246344 java.io.IOException: Bad response message header with invalid message length of 6600541 bytes at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.read(TDNetworkIOIF.java:768) at com.teradata.jdbc.jdbc_4.io.TDPacketStream.readStream(TDPacketStream.java:768) at com.teradata.jdbc.jdbc_4.statemachine.StatementReceiveState.action(StatementReceiveState.java:141) at com.teradata.jdbc.jdbc_4.statemachine.StatementController.runBody(StatementController.java:137) at com.teradata.jdbc.jdbc_4.statemachine.StatementController.run(StatementController.java:128) at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:387) at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:329) at com.teradata.jdbc.jdbc_4.TDStatement.doNonPrepExecuteQuery(TDStatement.java:317) at com.teradata.jdbc.jdbc_4.TDStatement.executeQuery(TDStatement.java:1106) at extractsid.test_lecture_0_1.test_lecture.tTeradataInput_1Process(test_lecture.java:865) at extractsid.test_lecture_0_1.test_lecture.tTeradataConnection_1Process(test_lecture.java:474) at extractsid.test_lecture_0_1.test_lecture.runJobInTOS(test_lecture.java:1455) at extractsid.test_lecture_0_1.test_lecture.main(test_lecture.java:1289) 
[FATAL]: extractsid.test_lecture_0_1.test_lecture - tTeradataInput_1 [Teradata JDBC Driver] [TeraJDBC 15.10.00.14] [Error 804] [SQLState 08S01] Socket communication failure for Packet receive Fri Dec 08 12:33:15 CET 2017 socket orig=tera16 local=0.0.0.0/0.0.0.0:57179 remote=tera16cop9:1025 keepalive=unavailable nodelay=unavailable receive=unavailable send=unavailable linger=unavailable traffic=unavailable concurrent=3 contimeout=10000 conwait=1000 connecttime=16 connecttotaltime=16 connectattempts=1 connectfailures=0 reconnectattempts=0 recoverable=false redrive=false failurecache={} cid=1d082e88 sess=246344 java.io.IOException: Bad response message header with invalid message length of 6600541 bytes at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.read(TDNetworkIOIF.java:768) at com.teradata.jdbc.jdbc_4.io.TDPacketStream.readStream(TDPacketStream.java:768) at com.teradata.jdbc.jdbc_4.statemachine.StatementReceiveState.action(StatementReceiveState.java:141) at com.teradata.jdbc.jdbc_4.statemachine.StatementController.runBody(StatementController.java:137) at com.teradata.jdbc.jdbc_4.statemachine.StatementController.run(StatementController.java:128) at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:387) at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:329) at com.teradata.jdbc.jdbc_4.TDStatement.doNonPrepExecuteQuery(TDStatement.java:317) at com.teradata.jdbc.jdbc_4.TDStatement.executeQuery(TDStatement.java:1106) at extractsid.test_lecture_0_1.test_lecture.tTeradataInput_1Process(test_lecture.java:865) at extractsid.test_lecture_0_1.test_lecture.tTeradataConnection_1Process(test_lecture.java:474) at extractsid.test_lecture_0_1.test_lecture.runJobInTOS(test_lecture.java:1455) at extractsid.test_lecture_0_1.test_lecture.main(test_lecture.java:1289) 
at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDriverJDBCException(ErrorFactory.java:94) 
at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDriverJDBCException(ErrorFactory.java:69) 
at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeIoJDBCException(ErrorFactory.java:207) 
at com.teradata.jdbc.jdbc_4.util.ErrorAnalyzer.analyzeIoError(ErrorAnalyzer.java:59) 
at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.read(TDNetworkIOIF.java:919) 
at com.teradata.jdbc.jdbc_4.io.TDPacketStream.readStream(TDPacketStream.java:768) 
at com.teradata.jdbc.jdbc_4.statemachine.StatementReceiveState.action(StatementReceiveState.java:141) 
at com.teradata.jdbc.jdbc_4.statemachine.StatementController.runBody(StatementController.java:137) 
at com.teradata.jdbc.jdbc_4.statemachine.StatementController.run(StatementController.java:128) 
at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:387) 
at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:329) 
at com.teradata.jdbc.jdbc_4.TDStatement.doNonPrepExecuteQuery(TDStatement.java:317) 
[statistics] disconnected 
at com.teradata.jdbc.jdbc_4.TDStatement.executeQuery(TDStatement.java:1106) 
at extractsid.test_lecture_0_1.test_lecture.tTeradataInput_1Process(test_lecture.java:865) 
at extractsid.test_lecture_0_1.test_lecture.tTeradataConnection_1Process(test_lecture.java:474) 
at extractsid.test_lecture_0_1.test_lecture.runJobInTOS(test_lecture.java:1455) 
at extractsid.test_lecture_0_1.test_lecture.main(test_lecture.java:1289) 
Caused by: java.io.IOException: Bad response message header with invalid message length of 6600541 bytes 
at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.read(TDNetworkIOIF.java:768) 
... 12 more 

 

 

This issue is not seen if I access only a few records using a where clause. Your inputs are appriciated.  

 

Thanks in advance. 

 

Regards,

Karthick

1 REPLY
Highlighted
Teradata Employee

Re: Error"java.io.IOException: Bad response message header with invalid message length of 66005

You are using an old version of the Teradata JDBC Driver that is not compatible with Teradata Database 16.0 or later.

 

This problem is discussed in Teradata Tech Alert NTA 4223.

 

The solution is to upgrade to a newer version of the Teradata JDBC Driver. Please upgrade to one of the Teradata JDBC Driver versions currently available for download: http://downloads.teradata.com/download/connectivity/jdbc-driver