[jboss-user] [Clustering/JBoss] - JBoss clustering - ejb lookup using HA-JNDI problem

shribala do-not-reply at jboss.com
Tue May 29 07:16:27 EDT 2007

I am getting the following exception when I try to invoke a clustered EJB from a remote java client. 
The same program works when I invoke through the port 1099, but not through 1100.. 

Please let me know where the problem is. 

1. Exception trace::
Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls:
00 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeo
utException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server
1100 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server [Root exception i
s java.net.ConnectException: Connection refused: connect]]]
        at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at CalculatorClient.go(CalculatorClient.java:17)
        at CalculatorClient.main(CalculatorClient.java:11)
Caused by: javax.naming.CommunicationException: Failed to connect to server [Root exception is javax.naming.Ser
viceUnavailableException: Failed to connect to server [Root exception is java.net.ConnectException: Connection
refused: connect]]
        at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
        at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)
        ... 5 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server [Root exception is java.net.Co
nnectException: Connection refused: connect]
        at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:243)
        ... 6 more
Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:516)
        at java.net.Socket.connect(Socket.java:466)
        at java.net.Socket.(Socket.java:366)
        at java.net.Socket.(Socket.java:266)
        at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
        at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
        at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:239)
        ... 6 more

2. Setting changes I had done.:

cluster-service.xml (I havent made any changes in cluster-service.xml and its present with the default values)

      <!-- Name of the partition being built -->

      <!-- The address used to determine the node name -->

      <!-- Determine if deadlock detection is enabled -->
      <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->

      <!-- The JGroups protocol configuration -->

	HA JNDI entries: 
	      <!-- We now inject the partition into the HAJNDI service instead
	           of requiring that the partition name be passed -->
	      <depends optional-attribute-name="ClusterPartition"
	      <!-- Bind address of bootstrap and HA-JNDI RMI endpoints -->
	      <!-- Port on which the HA-JNDI stub is made available -->
	      <!-- RmiPort to be used by the HA-JNDI service once bound. 0 => auto. -->
	      <!-- Accept backlog of the bootstrap socket -->
	      <!-- The thread pool service used to control the bootstrap and
	      auto discovery lookups -->
	      <depends optional-attribute-name="LookupPool"
	      <!-- A flag to disable the auto discovery via multicast -->
	      <!-- Set the auto-discovery bootstrap multicast bind address. If not 
	      specified and a BindAddress is specified, the BindAddress will be used. -->
	      <!-- Multicast Address and group port used for auto-discovery -->
	      <!-- The TTL (time-to-live) for autodiscovery IP multicast packets -->
	      <!-- The load balancing policy for HA-JNDI -->
	      <!-- Client socket factory to be used for client-server
	           RMI invocations during JNDI queries
	      <!-- Server socket factory to be used for client-server
	           RMI invocations during JNDI queries

3. jboss.xml changes: 

				Standard Stateless SessionBean

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049257#4049257

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049257

More information about the jboss-user mailing list