You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Sridhar Jena (JIRA)" <ji...@apache.org> on 2017/12/05 06:42:01 UTC
[jira] [Comment Edited] (DERBY-6972) Delay for getting derby
connection (Connection Reset and Waiting for a connection)
[ https://issues.apache.org/jira/browse/DERBY-6972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16278085#comment-16278085 ]
Sridhar Jena edited comment on DERBY-6972 at 12/5/17 6:41 AM:
--------------------------------------------------------------
Rick,
The "Login timeout exceeded." exception is throwing exactly after 5 seconds while getting connection from the Data source.
I am using Resin-4.0.40 application server for database connection pooling inside below <database> parameter tags,
{color:#333333}*/opt/Resin-4.0.40/conf/resin.xml*{color}
*<database>*
<jndi-name>jdbc/primary-derby</jndi-name>
{color:#205081}<driver>
<type>org.apache.derby.jdbc.ClientConnectionPoolDataSource</type>
<serverName>172.XX.XXX.183</serverName>
<portNumber>1527</portNumber>
<databaseName>live</databaseName>
<loginTimeout>5</loginTimeout>
<user>AURUSPAY</user>
<password>XXXXXXX</password>
</driver>{color}
<prepared-statement-cache-size>8</prepared-statement-cache-size>
<max-connections>750</max-connections>
<max-idle-time>3s</max-idle-time>
<max-active-time>120s</max-active-time>
*</database>*
But here the 5 seconds loginTimeOut parameter tag configured under derby driver tag and if we are changing any other integer digits instead of 5 seconds it was taking only default 5 seconds and it is throwing the same exception at 5 seconds.
{color:#333333}
Below highlighted attributes have configured for Derby driver inside the resin <database> attribute.{color}
*<driver>*
<type>org.apache.derby.jdbc.ClientConnectionPoolDataSource</type>
<serverName>172.XX.XXX.183</serverName>
<portNumber>1527</portNumber>
<databaseName>live</databaseName>
<loginTimeout>5</loginTimeout>
<user>AURUSPAY</user>
<password>XXXXXXX</password>
*</driver>*
{color:#333333}Below highlighted attributes have configured for resin database data source connection pool.{color}
*<database>*
<jndi-name>jdbc/primary-embedded</jndi-name>
<driver> ---- </driver>
<prepared-statement-cache-size>8</prepared-statement-cache-size>
<max-connections>750</max-connections>
<max-idle-time>3s</max-idle-time>
<max-active-time>1200s</max-active-time>
*</database>*
I am also using the same resin connection pooling parameter for Oracle data source, but till now we didn't observed any "java.net.SocketTimeoutException: Read timed out" issue during getting connection from resin data source.
*<database>*
<jndi-name>jdbc/primary-oracle</jndi-name>
{color:#205081}<driver>
<type>oracle.jdbc.pool.OracleConnectionPoolDataSource</type>
<url>jdbc:oracle:thin:@172.31.31.76:1521:live</url>
<user>AURUSPAY</user>
<password>XXXXX</password>
<loginTimeout>10</loginTimeout>
</driver>{color}
<prepared-statement-cache-size>8</prepared-statement-cache-size>
<max-connections>1000</max-connections>
<max-idle-time>3s</max-idle-time>
<max-active-time>120s</max-active-time>
*</database>*
I was thinking there might be an issue with the old derby server version "Derby Network Server - 10.11.1.1" , but after upgrading with latest one i,e "Derby Network Server - 10.14.1.0" the same issue is still observing.
So is there any way to identify the "java.net.SocketTimeoutException: Read timed out" issue occurring with which component , i mean which components need to be debug.
*{color:#205081}# At client side application with resin data source connection pooling
# At server side (Apache Derby Server)
# At client side (JDK APIs or any version incompatible with respect to derby drivers and JDK)
# At network level communication between derby driver client and derby server
{color}*
Regards,
Sridhar Jena
was (Author: sjena):
Rick,
The "Login timeout exceeded." exception is throwing exactly after 5 seconds while getting connection from the Data source.
I am using Resin-4.0.40 application server for database connection pooling inside below <database> parameter tags,
{color:#333333}/opt/Resin-4.0.40/conf/resin.xml{color}
<database>
<jndi-name>jdbc/primary-derby</jndi-name>
{color:#205081}<driver>
<type>org.apache.derby.jdbc.ClientConnectionPoolDataSource</type>
<serverName>172.XX.XXX.183</serverName>
<portNumber>1527</portNumber>
<databaseName>live</databaseName>
<loginTimeout>5</loginTimeout>
<user>AURUSPAY</user>
<password>XXXXXXX</password>
</driver>{color}
<prepared-statement-cache-size>8</prepared-statement-cache-size>
<max-connections>750</max-connections>
<max-idle-time>3s</max-idle-time>
<max-active-time>120s</max-active-time>
</database>
But here the 5 seconds loginTimeOut parameter tag configured under derby driver tag and if we are changing any other integer digits instead of 5 seconds it was taking only default 5 seconds and it is throwing the same exception at 5 seconds.
{color:#333333}
Below highlighted attributes have configured for Derby driver inside the resin <database> attribute.{color}
<driver>
<type>org.apache.derby.jdbc.ClientConnectionPoolDataSource</type>
<serverName>172.XX.XXX.183</serverName>
<portNumber>1527</portNumber>
<databaseName>live</databaseName>
<loginTimeout>5</loginTimeout>
<user>AURUSPAY</user>
<password>XXXXXXX</password>
</driver>
{color:#333333}Below highlighted attributes have configured for resin database data source connection pool.{color}
<database>
<jndi-name>jdbc/primary-embedded</jndi-name>
<driver> ---- </driver>
<prepared-statement-cache-size>8</prepared-statement-cache-size>
<max-connections>750</max-connections>
<max-idle-time>3s</max-idle-time>
<max-active-time>1200s</max-active-time>
</database>
I am also using the same resin connection pooling parameter for Oracle data source, but till now we didn't observed any "java.net.SocketTimeoutException: Read timed out" issue during getting connection from resin data source.
<database>
<jndi-name>jdbc/primary-oracle</jndi-name>
{color:#205081}<driver>
<type>oracle.jdbc.pool.OracleConnectionPoolDataSource</type>
<url>jdbc:oracle:thin:@172.31.31.76:1521:live</url>
<user>AURUSPAY</user>
<password>XXXXX</password>
<loginTimeout>10</loginTimeout>
</driver>{color}
<prepared-statement-cache-size>8</prepared-statement-cache-size>
<max-connections>1000</max-connections>
<max-idle-time>3s</max-idle-time>
<max-active-time>120s</max-active-time>
</database>
I was thinking there might be an issue with the old derby server version "Derby Network Server - 10.11.1.1" , but after upgrading with latest one i,e "Derby Network Server - 10.14.1.0" the same issue is still observing.
So is there any way to identify the "java.net.SocketTimeoutException: Read timed out" issue occurring with which component , i mean which components need to be debug
# At client side application with resin data source connection pooling
# At server side (Apache Derby Server)
# At client side (JDK APIs or any version incompatible with respect to derby drivers and JDK)
# At network level communication between derby driver client and derby server
Regards,
Sridhar Jena
> Delay for getting derby connection (Connection Reset and Waiting for a connection)
> ----------------------------------------------------------------------------------
>
> Key: DERBY-6972
> URL: https://issues.apache.org/jira/browse/DERBY-6972
> Project: Derby
> Issue Type: Bug
> Components: Network Server
> Affects Versions: 10.11.1.1
> Reporter: Sridhar Jena
> Priority: Critical
>
> Hi Team,
> This is regarding a derby connection issue in network mode.
> We are using Apache derby in network mode. Below are the version we are using for client server communication,
> Client Jar Version : *derbyclient-10.13.1.1.jar*
> Server Version : * Apache Derby Network Server - 10.11.1.1*
> We are facing three types of connection issue while getting database connection from our java application.
> 1. A communications error has been detected: Connection reset
> 2. Waiting for a connection with a long period of time.
> 3. Error connecting to server 127.0.0.1 on port 1,527 with message connect timed out.
> At the same time if we are checking the derby.log in derby server, we found below exceptions,
> *Fri Oct 20 17:19:30 EDT 2017* Thread[DRDAConnThread_107,5,main] (DATABASE = null), (DRDAID = null), Execution failed because of a Distributed Protocol Error: DRDA_Proto_SYNTAXRM; CODPNT arg = 0; Error Code Value = 3. Plaintext connection attempt from an SSL enabled client?
> *Fri Oct 20 17:19:30 EDT 2017* : Execution failed because of a Distributed Protocol Error: DRDA_Proto_SYNTAXRM; CODPNT arg = 0; Error Code Value = 3. Plaintext connection attempt from an SSL enabled client?
> org.apache.derby.impl.drda.DRDAProtocolException: Execution failed because of a Distributed Protocol Error: DRDA_Proto_SYNTAXRM; CODPNT arg = 0; Error Code Value = 3. Plaintext connection attempt from an SSL enabled client?
> at org.apache.derby.impl.drda.DRDAConnThread.throwSyntaxrm(Unknown Source)
> at org.apache.derby.impl.drda.DDMReader.readDssHeader(Unknown Source)
> at org.apache.derby.impl.drda.DRDAConnThread.exchangeServerAttributes(Unknown Source)
> at org.apache.derby.impl.drda.DRDAConnThread.sessionInitialState(Unknown Source)
> at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> We have no idea about the above Exceptions why it is coming while getting connection in java client application.
> Could you please help us to identify the exact reason for the above problem.
> Thanks & Regards,
> Sridhar Jena
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)