RE: Connection Reset Error with SQLState() = 08S01



Wes,

This sounds like what would be called a general network error (GNE) in the non-JDBC world. You will likely need to take some network traces to identify the
cause. Most GNEs can be traced down to a piece of hardware inappropriately resetting a connection.

Evan
--------------------
Thread-Topic: Connection Reset Error with SQLState() = 08S01
thread-index: Acfp0g8qPEyeL9kcQKqoVf3yalbYDw==
X-WBNR-Posting-Host: 209.78.47.227
From: =?Utf-8?B?V2VzIENsYXJr?= <WesClark@xxxxxxxxxxxxxxxxxxxxxxxxx>
References: <F0F1C794-A805-4370-ACA7-4F633C460104@xxxxxxxxxxxxx> <F574478C-1843-420F-95E5-D1D6F52D4382@xxxxxxxxxxxxx> <C7A101C8-
BA90-4499-8CFA-95703A3A4A8C@xxxxxxxxxxxxx> <kd32zVb6HHA.6140@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: Connection Reset Error with SQLState() = 08S01
Date: Tue, 28 Aug 2007 17:18:01 -0700
Lines: 89
Message-ID: <4203A20E-FC68-4CD8-A81A-488ECA4286F5@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.2826
Newsgroups: microsoft.public.sqlserver.jdbcdriver
Path: TK2MSFTNGHUB02.phx.gbl
Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.jdbcdriver:279
NNTP-Posting-Host: tk2msftsbfm01.phx.gbl 10.40.244.148
X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver

I think it's the most recent production release of the MS JDBC driver:
1.1.1501.101.

We turned on a feature of DBCP to run a validation query when getting the
connection from the pool, and that eliminated the connection reset errors.
This implies the connections are going bad while idle in the pool. We saw
these errors when we started running intense batch jobs with long running
queries in the background on the same server using the same pool.

Here's the full stack trace. I had left out the lines from our code.

com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset
at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown
Source)
at com.microsoft.sqlserver.jdbc.TDSWriter.flush(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSWriter.endRequest(Unknown Source)
at
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
at
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PreparedStatementExecutionRequest.executeStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown
Source)
at
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(Unknown
Source)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
at
com.guidewire.pl.system.database.sqlhandler.AbstractPreparedSelectStatementHandler.executeQuery
(AbstractPreparedSelectStatementHandler.java:33)
at
com.guidewire.pl.system.database.query.impl.SQLDataHolderPreparedStatementHandler.executeQuery
(SQLDataHolderPreparedStatementHandler.java:33)
at
com.guidewire.pl.system.transaction.ConnectionHandlerImpl.executeQuery(ConnectionHandlerImpl.java:374)
at
com.guidewire.pl.system.transaction.ConnectionHandlerImpl.executeQueryCore(ConnectionHandlerImpl.java:310)
at
com.guidewire.pl.system.transaction.ConnectionHandlerImpl.executeQuery(ConnectionHandlerImpl.java:255)
at com.guidewire.pl.system.database.DBKernel.executeQuery(DBKernel.java:49)
at
com.guidewire.pl.system.database.StandardDatabase.read(StandardDatabase.java:514)
at
com.guidewire.pl.system.database.query.impl.QueryExecuterImpl.read(QueryExecuterImpl.java:49)
at
com.guidewire.pl.system.database.query.impl.QueryExecuterImpl.executeQuery(QueryExecuterImpl.java:151)
at
com.guidewire.pl.system.database.query.impl.QueryHelperImpl.doGetKeys(QueryHelperImpl.java:295)
at
com.guidewire.pl.system.database.query.impl.QueryHelperImpl.fetchKeys(QueryHelperImpl.java:58)
at
com.guidewire.pl.system.database.impl.QueryResultImpl.maybeLoadNextChunk(QueryResultImpl.java:103)
at
com.guidewire.pl.system.database.impl.QueryResultImpl.hasNext(QueryResultImpl.java:159)
at
com.guidewire.pl.system.util.CollectionUtil.addAllFromIterator(CollectionUtil.java:380)
at
com.guidewire.pl.system.util.CollectionUtil.buildListFromIterator(CollectionUtil.java:402)
at
com.guidewire.pl.system.database.impl.QueryProcessorBase.getResultsAsList(QueryProcessorBase.java:48)
at
com.guidewire.pl.domain.community.impl.VacationingUsersCacheImpl$VacationingUserEntry.ensureIsLoaded(VacationingUsersCacheImpl.java:47)
at
com.guidewire.pl.domain.community.impl.VacationingUsersCacheImpl$VacationingUserEntry.getVacationingUsers
(VacationingUsersCacheImpl.java:39)
at
com.guidewire.pl.domain.community.impl.VacationingUsersCacheImpl.getVacationingUsers(VacationingUsersCacheImpl.java:76)
at
com.guidewire.pl.domain.community.impl.UserBaseImpl.getVacationingUsers(UserBaseImpl.java:478)
at
com.guidewire.cc.web.vacation.VacationFinder.usersOnVacation(VacationFinder.java:31)
at
com.guidewire.cc.web.vacation.VacationFinder.getVacationActivities(VacationFinder.java:40)
at
com.guidewire.cc.domain.activity.ActivityVacationViewFinderImpl.findVacationActivities(ActivityVacationViewFinderImpl.java:19)
at sun.reflect.GeneratedMethodAccessor530.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


"Evan T. Basalik (MSFT)" wrote:

Wes,

What version of the Microsoft JDBC driver are you running? Also, can you post your full code? The stack trace in the MSDN posting doesn't seem to
match
yours. Am I missing something here?

Evah
--------------------



Evan T. Basalik
This posting is provided ?AS IS? with no warranties, and confers no rights.


.



Relevant Pages

  • Re: Repost - Unable to authenticate a VPN
    ... a network trace of the machine attempting to make the VPN connection using ... the connection manager client.. ... On the client from a command prompt ... >> Microsoft Small Business Server Support ...
    (microsoft.public.windows.server.sbs)
  • Re: Cache Issues
    ... I ended up putting trace stuff everywhere and found the offending statement: ... I was opening a connection to the database independent of getting the data ... loaded from the DB and not from the cache. ... > finished retrieving data from the cache.... ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Server Does Not Exist or Access Denied error
    ... Server service pack installed and the one that I cannot connect to from my ... the connection is opened with no problem. ... > service packs are installed on each of the remote servers as I am not sure ... >> When I click Test Connection button, the trace indicates a successful ...
    (microsoft.public.sqlserver.connect)
  • Re: Repost - Unable to authenticate a VPN
    ... Thanks I did get the trace.. ... Microsoft Small Business Server Support ... >> the connection manager client.. ...
    (microsoft.public.windows.server.sbs)
  • Client does not reconnect to SQL Server after Network interruption
    ... Our VB.NET program onnects to SQL Server SP4 via OLEDB. ... connection and then we have a network interruption of min 10secs during ... get a General Network Error when we try to execute the next query. ... The only way to reconnect to the server is to restart the VB program. ...
    (microsoft.public.sqlserver)

Loading