[
https://issues.apache.org/jira/browse/DERBY-2026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899931#action_12899931
]
Kathey Marsden commented on DERBY-2026:
---------------------------------------
Porting the patch to 10.6 I see the following timeout on a connect in a later
test. I think this is because the tests I added do not correctly reset the
login timeout on the DriverManager and various DataSources after running the
test. I will make that change and submit shortly to trunk.
1) testReplication_Encrypted_1_miniLoad_negative(org.apache.derbyTesting.functio
nTests.tests.replicationTests.ReplicationRun_Local_Encrypted_1)java.sql.SQLNonTr
ansientConnectionException: A communications error has been detected: Read timed
out.
at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(SQLE
xceptionFactory40.java:70)
at org.apache.derby.client.am.SqlException.getSQLException(SqlException.
java:358)
at org.apache.derby.jdbc.ClientDriver.connect(ClientDriver.java:149)
at java.sql.DriverManager.getConnection(DriverManager.java:322)
at java.sql.DriverManager.getConnection(DriverManager.java:273)
at org.apache.derbyTesting.functionTests.tests.replicationTests.Replicat
ionRun.bootMasterDatabase(ReplicationRun.java:863)
at org.apache.derbyTesting.functionTests.tests.replicationTests.Replicat
ionRun.makeReadyForReplication(ReplicationRun.java:2746)
at org.apache.derbyTesting.functionTests.tests.replicationTests.Replicat
ionRun_Local_Encrypted_1.testReplication_Encrypted_1_miniLoad_negative(Replicati
onRun_Local_Encrypted_1.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:
109)
at org.apache.derbyTesting.functionTests.tests.replicationTests.Replicat
ionRun.runBare(ReplicationRun.java:207)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
at junit.extensions.TestSetup.run(TestSetup.java:16)
Caused by: org.apache.derby.client.am.DisconnectException: A communications erro
r has been detected: Read timed out.
at org.apache.derby.client.net.NetAgent.throwCommunicationsFailure(NetAg
ent.java:415)
at org.apache.derby.client.net.Reply.fill(Reply.java:176)
at org.apache.derby.client.net.Reply.ensureALayerDataInBuffer(Reply.java
:218)
at org.apache.derby.client.net.Reply.readDssHeader(Reply.java:320)
at org.apache.derby.client.net.Reply.startSameIdChainParse(Reply.java:11
60)
at org.apache.derby.client.net.NetConnectionReply.readSecurityCheck(NetC
onnectionReply.java:112)
at org.apache.derby.client.net.NetConnection.readSecurityCheckAndAccessR
db(NetConnection.java:843)
at org.apache.derby.client.net.NetConnection.flowSecurityCheckAndAccessR
db(NetConnection.java:768)
at org.apache.derby.client.net.NetConnection.flowUSRIDONLconnect(NetConn
ection.java:601)
at org.apache.derby.client.net.NetConnection.flowConnect(NetConnection.j
ava:408)
at org.apache.derby.client.net.NetConnection.<init>(NetConnection.java:2
18)
at org.apache.derby.client.net.NetConnection40.<init>(NetConnection40.ja
va:77)
at org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40.newNetConne
ction(ClientJDBCObjectFactoryImpl40.java:269)
at org.apache.derby.jdbc.ClientDriver.connect(ClientDriver.java:83)
... 34 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at org.apache.derby.client.net.Reply.fill(Reply.java:174)
... 46 more
FAILURES!!!
Tests run: 12463, Failures: 0, Errors: 1
> Setting a login timeout in client driver can lead to query timeout
> ------------------------------------------------------------------
>
> Key: DERBY-2026
> URL: https://issues.apache.org/jira/browse/DERBY-2026
> Project: Derby
> Issue Type: Bug
> Components: JDBC, Network Client
> Affects Versions: 10.3.1.4
> Environment: Client driver on most platforms
> Reporter: Olav Sandstaa
> Assignee: Mamta A. Satoor
> Priority: Minor
> Attachments: derby-2026_diff.txt,
> DERBY2026_LoginTimeout_diff_patch1.txt, LoginTimeout.java,
> LoginTimeoutWithDataSource.java
>
>
> Setting the login timeout by using DriverManager.setLoginTimeout(int
> seconds) also affects the amount of time the client driver is waiting
> for a query to finish. For instance, setting the login timeout to 10
> seconds will result in any queries taking more than 10 seconds to fail
> with the following exception:
> Exception thrown: java.sql.SQLException: A communications error has been
> detected: Read timed out.
> java.sql.SQLException: A communications error has been detected: Read timed
> out.
> at
> org.apache.derby.client.am.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:46)
> at
> org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:345)
> at
> org.apache.derby.client.am.Statement.executeQuery(Statement.java:414)
> at LoginTimeout.main(LoginTimeout.java:53)
> Caused by: org.apache.derby.client.am.DisconnectException: A communications
> error has been detected: Read timed out.
> at
> org.apache.derby.client.net.NetAgent.throwCommunicationsFailure(NetAgent.java:408)
> at org.apache.derby.client.net.Reply.fill(Reply.java:176)
> at
> org.apache.derby.client.net.Reply.ensureALayerDataInBuffer(Reply.java:215)
> at org.apache.derby.client.net.Reply.readDssHeader(Reply.java:317)
> at
> org.apache.derby.client.net.Reply.startSameIdChainParse(Reply.java:1147)
> at
> org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(NetStatementReply.java:51)
> at
> org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(StatementReply.java:40)
> at
> org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(NetStatement.java:139)
> at
> org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Statement.java:1341)
> at
> org.apache.derby.client.am.Statement.flowExecute(Statement.java:1977)
> at
> org.apache.derby.client.am.Statement.executeQueryX(Statement.java:420)
> at
> org.apache.derby.client.am.Statement.executeQuery(Statement.java:405)
> ... 1 more
> Caused by: java.net.SocketTimeoutException: Read timed out
> at java.net.SocketInputStream.socketRead0(Native Method)
> at java.net.SocketInputStream.read(SocketInputStream.java:129)
> at org.apache.derby.client.net.Reply.fill(Reply.java:174)
> ... 11 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.