0 Replies Latest reply on Nov 12, 2008 11:28 AM by Mohit Anchlia

    Exception in JNDI lookup based on partition and Udp group

    Mohit Anchlia Novice

      Here is the lookup code:

      
       properties.put("jnp.partitionName", getSystemConfig().getBackendPartition());
       properties.put("jnp.discoveryGroup", getSystemConfig().getBackendUdpGroup());
       try {
       this.backEndCtx = new InitialContext(properties);
       this.backEndCtx.lookup(jndiName);
       ......
      


      Exception

      javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
      ....
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
      at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:381)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1319)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1436)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:596)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
      at javax.naming.InitialContext.lookup(InitialContext.java:351)
      at com.intuit.engine.efp.efe.util.ServiceLocator.lookupBackEndJndi(ServiceLocator.java:469)
      ... 24 more
      Caused by: java.net.SocketTimeoutException: Receive timed out
      at java.net.PlainDatagramSocketImpl.receive0(Native Method)
      at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
      at java.net.DatagramSocket.receive(DatagramSocket.java:712)
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1289)
      ... 29 more


      We have a backend cluster and frontend cluster. So when request comes in frontend cluster does above lookup on one of the beans. When backend cluster comes back up and is completely operational, and at that point if I do a lookup I get below exception. However, on next retry it succeeds. It happens consistently. I don't understand why that should occur because I try to lookup after backend is completely up and has starting processing requests.