[jboss-jira] [JBoss JIRA] Created: (JBAS-4474) Connection Reset During JNDI lookup for Queues/Topics

sanjeeth s (JIRA) jira-events at lists.jboss.org
Thu Jun 7 04:24:14 EDT 2007


Connection Reset During JNDI lookup for Queues/Topics
-----------------------------------------------------

                 Key: JBAS-4474
                 URL: http://jira.jboss.com/jira/browse/JBAS-4474
             Project: JBoss Application Server
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Naming
    Affects Versions: JBossAS-4.2.0.GA
         Environment: Os is windows2003 server. JRE: 1.5
            Reporter: sanjeeth s
         Assigned To: Scott M Stark


When we try to do a look up for a Queue/Topic name, the lookup fails with error "Connection Reset". 
The stack trace:
javax.naming.CommunicationException: Failed to retrieve stub from server <ServerName>:8002 [Root exception is java.net.SocketException: Connection reset]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:263)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(Unknown Source)

Caused by : java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at java.io.ObjectInputStream$PeekInputStream.read(Unknown Source)
at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.(Unknown Source)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:250) 
....

This does not happen every time when i do the look up. This error happens for few times during a load runs for long time. 
My client code
InitialContext itc = new InitialContext(properties);
QueueConnectionFactory factory = itc.loopkup("java:/XAConnectionFactory);
Queue queue = itc.lookup("QueueName");

Always the error happens at the second lookup( Queue look up). So as a workaround i tried to have a retry mechanisum, but with the same initialContext when i do the lookup again after failure, it fails futher with the same error. Is that InitialContext gets invalid?.

Also i tried retry with new InitialContext, most of the time it worked but for some time the retry has failed with the same error. I dont know what is the cause for such a failure. 

Properties that are passed to the initalContext:
property.put(Context.INITIAL_CONTEXT_FACTORY,
				"org.jnp.interfaces.NamingContextFactory");
		property.put(Context.URL_PKG_PREFIXES,
				"jboss.naming:org.jnp.interfaces");
		property.put(Context.PROVIDER_URL, <ServerName> + ":" + 8002);

Sanjeeth S

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list