1 Reply Latest reply on Sep 2, 2005 7:56 AM by kkoster

    CommunicationException during lookup

    kkoster

      I moved from 4.0.3RC1 to 4.0.3RC2 and am suddenly getting JNDI lookup problems (stack trace to follow). I have tried both single and HA versions of JNDI and have the same results.

      A little background:

      I have a factory class that caches naming contexts. In this case a single naming context is being used across all threads in an application. These threads may cause multiple simulataneous requests of the cached context. The context(s) are weakly cached, so are subject to garbage collection.

      It seems that the initial "storm" of request for the context is causing denials on the socket. This did not occur on 4.0.3RC1.


      2005-08-31 08:22:37,681 ERROR [Scenario-P[0.3]:DELTA] factory.EJBValuatorFactory

      javax.naming.CommunicationException [Root exception is java.rmi.ConnectException
      : Connection refused to host: 10.202.128.67; nested exception is:
      java.net.ConnectException: Connection refused: connect]
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:707)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at com.amaranth.jndi.factory.DefaultContextFactory$CachedContext.lookup(DefaultContextFactory.java:53)
      at com.amaranth.valuation.factory.EJBValuatorFactory.getFactory(EJBValuatorFactory.java:227)
      at com.amaranth.valuation.factory.EJBValuatorFactory.getValuator(EJBValuatorFactory.java:317)
      at com.amaranth.trade.valuation.BasicValuationTask.run(BasicValuationTask.java:70)
      Caused by: java.rmi.ConnectException: Connection refused to host: 10.202.128.67;
      nested exception is:
      java.net.ConnectException: Connection refused: connect
      at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
      at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
      at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
      at sun.rmi.server.UnicastRef.invoke(Unknown Source)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
      ... 6 more
      Caused by: java.net.ConnectException: Connection refused: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(Unknown Source)
      at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at java.net.Socket.(Unknown Source)
      at java.net.Socket.(Unknown Source)
      at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
      at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
      ... 12 more