RE: BUG: JDBC connection disconnected, can't reconnect
- From: evanba@xxxxxxxxxxxxxxxxxxxx (Evan T. Basalik (MSFT))
- Date: Tue, 01 Jul 2008 21:03:15 GMT
Are you seeing the same symptoms (connect fine, lose connectivity, have to restart SQL Server to recover)? If so, I would encourage you to look at the
database side. There is really nothing the driver can do that will take down SQL Server.
Evan
--------------------
Thread-Topic: BUG: JDBC connection disconnected, can't reconnect
thread-index: AcjXco8Pq53bZmYcTeqBht64HmY1Nw==
X-WBNR-Posting-Host: 207.46.19.197
From: =?Utf-8?B?TWFyY28=?= <Marco@xxxxxxxxxxxxxxxxxxxxxxxxx>
References: <E16DE076-5FDA-4DDB-9386-14F3CE2E1DFC@xxxxxxxxxxxxx>
Subject: RE: BUG: JDBC connection disconnected, can't reconnect
Date: Thu, 26 Jun 2008 02:54:00 -0700
Lines: 101
Message-ID: <73A2A143-BD20-4B76-8BAD-4C020E745B90@xxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
Newsgroups: microsoft.public.sqlserver.jdbcdriver
Path: TK2MSFTNGHUB02.phx.gbl
Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.jdbcdriver:533
NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
Hi,
we have exacty the same problem. Our environment:
Windows 2003 Standard SP2
SQL 2005 Standard
Sun JDK 1.6
SQL JDBC 1.2
Help much appreciated!
Marco
"Frank Sommers" wrote:
Hi,
Our environment is:
Windows Server 2003, Service Pack 2
SQL Server Express 2005
SQLServer JDBC driver 1.2
Sun JDK 1.6 (we tried this on JDK 1.5 as well)
There is no virus protection software on the host, and no firewall is enabled.
Our problem is that the JDBC connection running on the localhost
periodically gets disconnected, and then we can't reconnect to the database
at all, unless we physically power cycle the server.
This is a very strange situation, and to illustrate, I created the following
command-line program:
public class DBTest {
public static void main(String[] arg) throws Exception {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection conn =
DriverManager.getConnection("jdbc:sqlserver://127.0.0.1:1433;databaseName=datamart",
"username", "password");
System.out.println("Connected");
conn.close();
}
}
Essentially, this program verifies that a database connection can be made to
the SQL Server instance on the local host.
Executing this from the command line works the vast majority of the time.
However, once the Web application running on the same host encounters the
JDBC disconnection issue, executing this program from the command line
results in the following exception:
C:\Documents and Settings\frank>java -cp sqljdbc.jar;. DBTest
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException:
Software caused connect on abort: recv failed
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSChannel.read(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSReader.readPacket(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSReader.readPacket(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(Unknown
Source)
at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(Unknown
Source)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown
Source)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(Unknown Source)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown
Source)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown
Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown
Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown
Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at DBTest.main(DBTest.java:7)
The relevant line seems to be:
Software caused connect on abort: recv failed
There is no way to obtain further access to the database, except by
power-cycling the machine. Shutting down and then re-starting the SQL Server
instance does not help, nor does restarting any individual process on the
server.
Something permanently disables connection to the database server, and only a
hard reset of the OS solves that problem.
Any suggestions would be most appreciated, as this is a serious,
mission-criticial problem for us right now.
Evan T. Basalik
This posting is provided ?AS IS? with no warranties, and confers no rights.
.
- Follow-Ups:
- Next by Date: RE: BUG: JDBC connection disconnected, can't reconnect
- Next by thread: RE: BUG: JDBC connection disconnected, can't reconnect
- Index(es):
Relevant Pages
|