All Forums Connectivity
rajgo_it 1 post Joined 03/11
03 Mar 2011
Teradata JDBC Exception

Hi all, i am new to this forum. I need your help on a issue of a Java application which we are facing into production. The app is talking with teradata db (v 12) via JDBC api; It is working fine, but recently app is unable to talk with db in few instances. I have got below exception in catalina.out file. Appreciate if anyone can put light on the issue.

Exception:

INFO | jvm 1 | 2011/02/21 14:32:21 | 2011-02-21.14:32:21.306 TERAJDBC4 ERROR [pool-3-thread-2] com.teradata.jdbc.jdbc_4.TDSession@2ea70c Read message 1: Incomplete LAN message header: read 0 bytes

INFO | jvm 1 | 2011/02/21 14:32:21 | 2011-02-21.14:32:21.306 TERAJDBC4 ERROR [pool-3-thread-2] com.teradata.jdbc.jdbc_4.TDSession@2ea70c Read message 1 failed; closing socket due to: java.io.IOException: Incomplete LAN message header: read 0 bytes

INFO | jvm 1 | 2011/02/21 14:32:21 | 2011-02-21.14:32:21.307 TERAJDBC4 ERROR [pool-3-thread-2] com.teradata.jdbc.jdbc_4.TDSession@2ea70c Packet receive Mon Feb 21 14:32:21 EST 2011 socket local=0.0.0.0/0.0.0.0:54475 remote=edwprod1cop7.homedepot.com/165.130.159.12:1025 cid=d91b7d sess=20942713 java.io.IOException: Incomplete LAN message header: read 0 bytes at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.read(TDNetwo rkIOIF.java:370) at com.teradata.jdbc.jdbc_4.io.TDPacketStream.readStream( TDPacketStream.java:818) at com.teradata.jdbc.jdbc_4.statemachine.StatementReceive State.action(StatementReceiveState.java:124) at com.teradata.jdbc.jdbc_4.statemachine.StatementControl ler.runBody(StatementController.java:108) at com.teradata.jdbc.jdbc_4.statemachine.StatementControl ler.run(StatementController.java:99) at com.teradata.jdbc.jdbc_4.Statement.executeStatement(St atement.java:309) at com.teradata.jdbc.jdbc_4.Statement.executeStatement(St atement.java:254) at com.teradata.jdbc.jdbc_4.Statement.executeQuery(Statem ent.java:240) at com.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalStatement.e xecuteQuery(TeraLocalStatement.java:86) at com.teradata.jdbc.jdbc_3.ifjdbc_

tomnolan 594 posts Joined 01/08
04 Mar 2011

Those error messages typically indicate that the Teradata JDBC Driver has lost its connection to the Teradata Database.

Common causes of connectivity problems, in order from most likely to less likely:
- Session was forcibly logged off by Teradata Manager, PMON, or some other kind of script that checks for inactivity
- Teradata Database restart
- Transient network failure
- Faulty network hardware

umarfarman 8 posts Joined 07/11
16 Nov 2011

Any solution found for this problem?

Or maybe the reason it happens for?

 

Thanks

tomnolan 594 posts Joined 01/08
17 Nov 2011

I did list the common reasons.

jcllings 3 posts Joined 07/12
28 Nov 2012

We are also seeing this. Approximately 10 transactions in 60,000. Of the reasons listed:
1 Teradata Database restart
2 Transient network failure
3 Faulty network hardware
1 Is not the case since it was a performance test in the frist place and has never not happened during such.
2 and 3 seem unlikely since the net in question is designed for performance testing
What I would like to ask is if misconfigured connection pooling could cause this issue? If a pooled connection went bad and the system then tried to re-use that bad connection for example, could something like this happen?
What we've got going on is a Container (Tomcat) managed JNDI connection pool. Problem is that MyBatis also has it's own built-in connection pool that may not be playing well with our arrangement.  When the app first went in for performance testing it was discovered that we effectively had no pooling despite having set the configuration in Tomcat's JNDI configuration settings.  I have a new configuration that works according to our profiler but still hasn't been tested by the performance team.

tomnolan 594 posts Joined 01/08
29 Nov 2012

Some connection pool managers, but not all, have a feature to automatically test a connection by executing a simple query before the connection is provided to the application.
Enabling a feature like that will impact performance, but it can hide most communication failures from the application.

panlasi 3 posts Joined 12/10
29 Nov 2012

Hi all, I posted a while back about my TD connection issues.  I am on a mac platform runninf OS/X 10.8.2.  Sonce then, I had flawless connections to TD but I had to upgrade my machine and in-so doing, I also found out that SQLA Java Edition has been replaced by TD Studio Express.  I downloaded the version from this site and installed, however, I can't get any connection.  I get an unknown host error. 
 

com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata JDBC Driver] [TeraJDBC 14.00.00.21] [Error 1000] [SQLState 08S01] Login failure for Connection to EDWMKTG Thu Nov 29 10:49:47 PST 2012 socket orig=EDWMKTG cid=6af86f0e sess=0 java.net.UnknownHostException: EDWMKTG  at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)  at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:849)  at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1202)  at java.net.InetAddress.getAllByName0(InetAddress.java:1153)  at java.net.InetAddress.getAllByName(InetAddress.java:1083)  at java.net.InetAddress.getAllByName(InetAddress.java:1019)  at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$Lookup.<init>(TDNetworkIOIF.java:183)  at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.connectToHost(TDNetworkIOIF.java:282)  at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.createSocketConnection(TDNetworkIOIF.java:131)  at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.<init>(TDNetworkIOIF.java:117)  at com.teradata.jdbc.jdbc_4.TDSession.getIO(TDSession.java:585)  at com.teradata.jdbc.jdbc.GenericLogonController.run(GenericLogonController.java:95)  at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:214)  at com.teradata.jdbc.jdk6.JDK6_SQL_Connection.<init>(JDK6_SQL_Connection.java:34)  at com.teradata.jdbc.jdk6.JDK6ConnectionFactory.constructConnection(JDK6ConnectionFactory.java:22)  at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:130)  at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:120)  at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:232)  at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:158)  at com.teradata.datatools.dtp.connectivity.db.teradata.TeradataJDBCConnection.makeConnection(TeradataJDBCConnection.java:293)  at com.teradata.datatools.dtp.connectivity.db.teradata.TeradataJDBCConnection.createConnection(TeradataJDBCConnection.java:121)  at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:105)  at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54)  at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:73)  at com.teradata.datatools.dtp.connectivity.db.teradata.TeradataPingFactory.createConnection(TeradataPingFactory.java:36)  at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)  at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:359)  at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)  at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) 

at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDriverJDBCException(ErrorFactory.java:93)

at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDriverJDBCException(ErrorFactory.java:68)

at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeIoJDBCException(ErrorFactory.java:206)

at com.teradata.jdbc.jdbc_4.util.ErrorAnalyzer.analyzeIoError(ErrorAnalyzer.java:61)

at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.createSocketConnection(TDNetworkIOIF.java:138)

at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.<init>(TDNetworkIOIF.java:117)

at com.teradata.jdbc.jdbc_4.TDSession.getIO(TDSession.java:585)

at com.teradata.jdbc.jdbc.GenericLogonController.run(GenericLogonController.java:95)

at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:214)

at com.teradata.jdbc.jdk6.JDK6_SQL_Connection.<init>(JDK6_SQL_Connection.java:34)

at com.teradata.jdbc.jdk6.JDK6ConnectionFactory.constructConnection(JDK6ConnectionFactory.java:22)

at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:130)

at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:120)

at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:232)

at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:158)

at com.teradata.datatools.dtp.connectivity.db.teradata.TeradataJDBCConnection.makeConnection(TeradataJDBCConnection.java:293)

at com.teradata.datatools.dtp.connectivity.db.teradata.TeradataJDBCConnection.createConnection(TeradataJDBCConnection.java:121)

at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:105)

at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54)

at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:73)

at com.teradata.datatools.dtp.connectivity.db.teradata.TeradataPingFactory.createConnection(TeradataPingFactory.java:36)

at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)

at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:359)

at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)

at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)

at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Caused by: java.net.UnknownHostException: EDWMKTG

at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)

at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:849)

at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1202)

at java.net.InetAddress.getAllByName0(InetAddress.java:1153)

at java.net.InetAddress.getAllByName(InetAddress.java:1083)

at java.net.InetAddress.getAllByName(InetAddress.java:1019)

at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$Lookup.<init>(TDNetworkIOIF.java:183)

at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.connectToHost(TDNetworkIOIF.java:282)

at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.createSocketConnection(TDNetworkIOIF.java:131)

... 21 more

 
 While searching this forum, I noted a comment to use an ip address instead of the server name.  That too did not work; following is the error I received:
 
 

ava.lang.NullPointerException

at com.teradata.tdgss.jtdgss.TdgssConfigApi.GetMechanisms(Unknown Source)

at com.teradata.tdgss.jtdgss.TdgssManager.<init>(Unknown Source)

at com.teradata.tdgss.jtdgss.TdgssManager.getInstance(Unknown Source)

at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getGSSM(GenericTeraEncrypt.java:623)

at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getConfig(GenericTeraEncrypt.java:641)

at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getUserNameForOid(GenericTeraEncrypt.java:734)

at com.teradata.jdbc.AuthMechanism.<init>(AuthMechanism.java:50)

at com.teradata.jdbc.jdbc.GenericLogonController.run(GenericLogonController.java:122)

at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:214)

at com.teradata.jdbc.jdk6.JDK6_SQL_Connection.<init>(JDK6_SQL_Connection.java:34)

at com.teradata.jdbc.jdk6.JDK6ConnectionFactory.constructConnection(JDK6ConnectionFactory.java:22)

at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:130)

at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:120)

at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:232)

at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:158)

at com.teradata.datatools.dtp.connectivity.db.teradata.TeradataJDBCConnection.makeConnection(TeradataJDBCConnection.java:293)

at com.teradata.datatools.dtp.connectivity.db.teradata.TeradataJDBCConnection.createConnection(TeradataJDBCConnection.java:121)

at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:105)

at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54)

at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:73)

at com.teradata.datatools.dtp.connectivity.db.teradata.TeradataPingFactory.createConnection(TeradataPingFactory.java:36)

at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)

at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:359)

at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)

at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)

at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

 

tomnolan 594 posts Joined 01/08
30 Nov 2012

Please refer to the following troubleshooting information in the Teradata JDBC Driver User Guide:
http://developer.teradata.com/doc/connectivity/jdbc/reference/current/jdbcug_chapter_5.html#CHDIJJJH
That exception typically means that the classpath is not set, or set incorrectly, such that tdgssconfig.jar cannot be found.

panlasi 3 posts Joined 12/10
30 Nov 2012

Magnificent! Thanks for the info, Tom
 
 

yin_shiwei 1 post Joined 08/13
21 Aug 2013

Hi guys,
I also hit this issue recently. But this issue only happens with redhat linux OS. I can connect to teradata database from windows.
Now the teradata version is 14.00.00.01, the jdbc driver version is 14.00.00.14.
I'm not sure if this issue can be resolved by update the jdbc driver.
The problem now is I can't create connection to it. Below is the exception log:

2013-08-19.14:58:32.136 TERAJDBC4 ERROR [main] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@1fee702 Read message 1: Incomplete LAN message header: read 0 bytes
2013-08-19.14:58:32.142 TERAJDBC4 ERROR [main] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@1fee702 Read message 1 failed; closing socket due to: java.io.IOException: Incomplete LAN message header: read 0 bytes
2013-08-19.14:58:32.145 TERAJDBC4 ERROR [main] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@1fee702 Packet receive Mon Aug 19 14:58:32 HKT 2013 socket orig=192.168.70.64 local=0.0.0.0/0.0.0.0:48254 remote=/192.168.70.64:1025 keepalive=unavailable nodelay=unavailable receive=unavailable send=unavailable linger=unavailable traffic=unavailable concurrent=3 contimeout=10000 conwait=1000 connecttime=3 connecttotaltime=5 connectattempts=1 connectfailures=0 failurecache={} cid=461581 sess=2739 java.io.IOException: Incomplete LAN message header: read 0 bytes  at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.read(TDNetworkIOIF.java:673)  at com.teradata.jdbc.jdbc_4.io.TDPacketStream.readStream(TDPacketStream.java:818)  at com.teradata.jdbc.jdbc.GenericLogonController.run(GenericLogonController.java:496)  at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:215)  at com.teradata.jdbc.jdk6.JDK6_SQL_Connection.<init>(JDK6_SQL_Connection.java:30)  at com.teradata.jdbc.jdk6.JDK6ConnectionFactory.constructConnection(JDK6ConnectionFactory.java:22)  at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:130)  at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:120)  at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:228)  at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:154)  at java.sql.DriverManager.getConnection(Unknown Source)  at java.sql.DriverManager.getConnection(Unknown Source)

 

vasu6 12 posts Joined 10/12
18 Oct 2013

Hi Shiwei,
I also hit this issue from one year still ,no luck..this issue only happens with linux and windows also.can you please let me know this issue solution.Thanks in advance.my id vvdrmca@gmail.com.pls help me ?

Thanks,
Vasudeva Rao

tomnolan 594 posts Joined 01/08
18 Oct 2013

"Incomplete LAN message header: read 0 bytes" is a different problem than the classpath problem originally reported in this forum thread.
In the future, please create a new forum thread when it's a different issue; please do not reuse old forum threads.
 
If the "Incomplete LAN message header: read 0 bytes" error occurs when running on a Linux machine (you said RedHat Linux),
then the most likely cause is the "Slow Logon on Linux" problem.
The problem, and workarounds, are documented in the Teradata JDBC Driver User Guide here on Developer Exchange:
http://developer.teradata.com/doc/connectivity/jdbc/reference/current/jdbcug_chapter_5.html#CHDDACIH

vasu6 12 posts Joined 10/12
19 Dec 2013

HI Tomnolan,
Thanks for giving information.
JDBC application is running on windows.And Teradata Database is running on Linux  AND WINDOWS.Can you please help me on this ? 
And also developers are tested instead of connecting Linux Teradata DB ,they are trying to connect Teradata DB on windows.
Error is :
16-Oct-2013 09:57:01IST Unable to create a connection using the jdbc:teradata://10.65.142.204/DATABASE=rts_dev,TMODE=ANSI,CHARSET=UTF16 URL with dbc username because of the following error: [Teradata JDBC Driver] [TeraJDBC 1
16-Oct-2013 09:57:01IST 4.00.00.00] [Error 1000] [SQLState 08S01] Login failure for Packet receive Wed Oct 16 09:57:01 IST 2013 socket orig=10.65.142.204 local=0.0.0.0/0.0.0.0:33409 remote=/10.65.142.204:1025 keepalive=unava
16-Oct-2013 09:57:01IST ilable nodelay=unavailable receive=unavailable send=unavailable linger=unavailable traffic=unavailable concurrent=3 contimeout=10000 conwait=1000 connecttime=6 connecttotaltime=8 connectattempts=1 con
16-Oct-2013 09:57:01IST nectfailures=0 failurecache={} cid=10fd7411 sess=20662 java.io.IOException: Incomplete LAN message header: read 0 bytes at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.read(TDNetworkIOIF.java:659) at c
Please help me on this ?
 
 

Thanks,
Vasudeva Rao

tomnolan 594 posts Joined 01/08
19 Dec 2013

If your Java application is running on Windows and you receive an error message "Incomplete LAN message header", then you have a different problem than the "Slow Logon on Linux" problem.
 
That is too complicated to troubleshoot in a forum. If you're a customer, open an incident with Teradata Customer Support.

gustavo.ortga 1 post Joined 12/13
21 Dec 2013

Hi Tom,
I have the fallowing problem, I have read that I have to change my host file, but I dont really understand what I have to put in the host file.

Could not connect to TeradataDatabase.

Error creating SQL Model Connection connection to TeradataDatabase. (Error: [Teradata JDBC Driver] [TeraJDBC 14.10.00.18] [Error 1000] [SQLState 08S01] Login failure for Connection to Teradata Sat Dec 21 19:46:28 CST 2013 socket orig=Teradata cid=d3068be sess=0 

 

Thanks

Michael.music 3 posts Joined 05/16
22 Jun 2016

Hey mu CPU does not support VT-x i have checked in the BIOS and not able to use VM Ware so i use teradatafor the same.pls lket me know. and HOW pls it is veryurgent i have to worked on that as soon as possible. i have downloadede the teradata studio express.

dfffffffff

You must sign in to leave a comment.