JDBC Connectivity - broken pipe received when SQL server resets the connect

Hi,

We have downloaded MICROSOFT SQL SERVER 2000 DRIVER for UNIX boxes

when i try to connect using JDBC , with all parameters

user id, driver, password etc

at the sniffer(TCPIP) level when the jdbc connection is attempted

i see a

1) SYN packet to the SQL server from unix box

2) ACK SYN from the SQL server to unix box

3) ACK from unix box to server

4) no activity for about a minute

5) a RST( reset ) from SQL server to unix box.

at this point i get the following

stack trace

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Broken pipe or

no reader on socket

at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source

)

at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)

at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)

at com.microsoft.jdbc.sqlserver.tds.TDSLoginRequest.submitRequest(Unknow

n Source)

at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Sou

rce)

at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown S

ource)

at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)

at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)

at java.sql.DriverManager.getConnection(DriverManager.java, Compiled Cod

e)

at java.sql.DriverManager.getConnection(DriverManager.java, Compiled Cod

e)

at wu.database.WUDBAccess.getGiftGramConnection(WUDBAccess.java, Compile

d Code)

at wu.util.GiftMailClient.ConnectToDB(GiftMailClient.java, Compiled Code

)

at wu.util.GiftMailClient.ProcessEmail(GiftMailClient.java, Compile

the sniffer trace

Frame source = (Network)

Length = 66

Time received = 09/24/2002 21:19:42.543

Frame Relay

Header = 1041

0001 00.. 0100 .... = DLCI 68

.... ..0. .... 000. = (Command)

EtherType = 0800 IP

Internet Protocol (IP)

Source address= unix_server

Destination address = SQL_server

Type of service = 00

Length = 60

Identification = 58024

Flags = 0000 (May fragment, Last fragment)

Time to live = 28

Protocol = 6 TCP

Transmission Control Protocol (TCP)

Source Port= 2175

Destination Port = 8072

Sequence = 2690569244

Acknowledgement = 0

Flags = 02 (SYN)

Window size = 8192

******************************

============================= Frame Number 7 =============================

Frame source = (User)

Length = 66

Time received = 09/24/2002 21:19:42.544

Frame Relay

Header = 1041

0001 00.. 0100 .... = DLCI 68

.... ..0. .... 000. = (Command)

EtherType = 0800 IP

Internet Protocol (IP)

Source address= SQL_server

Destination address = unix_server

Type of service = 00

Length = 60

Identification = 47302

Flags = 4000 (Don't fragment, Last fragment)

Time to live = 126

Protocol = 6 TCP

Transmission Control Protocol (TCP)

Source Port= 8072

Destination Port = 2175

Sequence = 60776554

Acknowledgement = 2690569245

Flags = 12 (ACK, SYN)

Window size = 17520

**************************************************

============================= Frame Number 8 =============================

Frame source = (Network)

Length = 58

Time received = 09/24/2002 21:19:42.607

Frame Relay

Header = 1041

0001 00.. 0100 .... = DLCI 68

.... ..0. .... 000. = (Command)

EtherType = 0800 IP

Internet Protocol (IP)

Source address= unix_server

Destination address = SQL_server

Type of service = 00

Length = 52

Identification = 58025

Flags = 0000 (May fragment, Last fragment)

Time to live = 28

Protocol = 6 TCP

Transmission Control Protocol (TCP)

Source Port= 2175

Destination Port = 8072

Sequence = 2690569245

Acknowledgement = 60776555

Flags = 10 (ACK)

Window size = 8192

****************************************************8

============================= Frame Number 9 =============================

Frame source = (User)

Length = 52

Time received = 09/24/2002 21:21:35.137

Frame Relay

Header = 1041

0001 00.. 0100 .... = DLCI 68

.... ..0. .... 000. = (Command)

EtherType = 0800 IP

Internet Protocol (IP)

Source address= SQL_server

Destination address = unix_server

Type of service = 00

Length = 40

Identification = 47451

Flags = 4000 (Don't fragment, Last fragment)

Time to live = 126

Protocol = 6 TCP

Transmission Control Protocol (TCP)

Source Port= 8072

Destination Port = 2175

Sequence = 60776555

Acknowledgement = 623322721

Flags = 04 (RST)

Window size = 0

Data (ASCII)

0000 = 00 00 00 00 00 00 ......

********************************************************

any help is welcome

Regards,

Sunil

[5201 byte] By [sunil1769] at [2007-9-27 20:12:20]
# 1
It looks like the driver is getting no response from the SQL Server (it sends the login packet and nothing happens). Try using another type 4 driver to see if this is a server or driver issue.Alin.
Ace169 at 2007-7-7 0:20:11 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
Hi Alin,We have elminated the server because tha lab unix boxis able to connect to the SQL server and extract information.Only the production unix box is behaving this way.the build version of JVM is sameSunil
sunil1769 at 2007-7-7 0:20:11 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3
Hi,If you say you have a (somewhat) similar unix box from which it works, then it really doesn't look like a JDBC issue. You can still try using a different driver, but I don't think this is going to help. Looks more like some network problem.Alin.
Ace169 at 2007-7-7 0:20:11 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 4
Hi Alin, We have eliminated the network also. The SQL server is locked down for security only a few ports are open to talk to. I was able to send data from SQL server to UNIX box and the otherway round from unix box to SQL server without JDBCSunil
sunil1769 at 2007-7-7 0:20:11 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 5

Well then, it beats me. I don't see what the problem could be in this case. :o(

Get another driver and see what happens. I would recommend jTDS, because I'm one of the developers and I can help you debug it. It only supports basic things (such as forward-only result sets, prepared statements and callable statements) but it should be enough to see if you can connect to SQL Server. The address is http://jtds.sourceforge.net

Alin.

Ace169 at 2007-7-7 0:20:11 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 6
Hi Alin, We will down load it and test it in the lab. Thanks for all the information. we will get back to you.Regards,Sunil
sunil1769 at 2007-7-7 0:20:11 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...