5 Replies Latest reply on Mar 17, 2003 2:31 PM by Sacha Labourey

    Clustering Issue

    LC Newbie

      Hi all,

      I've been working on a clustering project using JBoss 3.0.4 on RedHat 8.0 but haven't had much luck. Here's what have been set up:

      1. JBoss 3.0.4 server instances, using "-c all" config with default multicast setup, on two hosts, hostA and hostB. Farming is not turned on.

      2. Tomcat 4.1.12, which is not built-in with JBoss. Included jbossall-client.jar under $CATALINA_HOME/common/lib/. (Tomcat is loadbalanced with Apache 2.0 using JK2.)

      3. A simple client test app running on hostA. Its JNDI lookup portion is as follows:
      -----------
      Properties props = new Properties();
      props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      props.put(Context.PROVIDER_URL, "");
      props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
      -----------

      The above setup works well only when the jboss instance on hostA, on which the client resides, is up. I tested multicast on the network using some test script from www.javagroups.com and it seems to be working. Tried also the TCPPING approach with no avail. Upgraded to the latest JBoss 3.0.6. Same problem.

      Appended are partial error messages when JBoss on hostA is down and hostB is up. Any advice would be greatly appreciated.

      Regards,
      LC

      -----------
      1. CASE 1 - props.put(Context.PROVIDER_URL, "")

      javax.naming.CommunicationException: Failed to connect to server

      127.0.0.1:1100 [Root exception is javax.naming.ServiceUnavailableException: Failed to

      connect to server 127.0.0.1:1100 [Root exception is java.net.ConnectException: Connection

      refused]]
      javax.naming.CommunicationException: Failed to connect to server 127.0.0.1:1100. Root

      exception is javax.naming.ServiceUnavailableException: Failed to connect to server

      127.0.0.1:1100. Root exception is java.net.ConnectException: Connection refused
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
      at java.net.Socket.connect(Socket.java:426)
      at java.net.Socket.connect(Socket.java:376)
      at java.net.Socket.(Socket.java:291)
      at java.net.Socket.(Socket.java:199)
      at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:69)
      at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:62)
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:179)
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1026)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1134)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:470)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:463)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at test.web.servlet.HelloJndiServlet.doGet(Unknown Source)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at

      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j

      ava:247)
      at

      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at

      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
      at

      org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar

      dPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at

      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at

      org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar

      dPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at

      org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar

      dPipeline.java:643)
      at

      org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at

      org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar

      dPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at

      org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar

      dPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at

      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at

      org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar

      dPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:256)
      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:361)
      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:563)
      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:535)
      at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:638)
      at

      org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
      at java.lang.Thread.run(Thread.java:536)

      -----------
      1. CASE 2 - props.put(Context.PROVIDER_URL, "hostB:1100")

      ENCOUNTERED EXCEPTION: javax.naming.CommunicationException [Root exception is

      java.rmi.RemoteException: Service unavailable.]
      javax.naming.CommunicationException. Root exception is java.rmi.RemoteException: Service

      unavailable.
      at

      org.jboss.ha.framework.interfaces.HARMIClient.invokeRemote(HARMIClient.java:161)
      at org.jboss.ha.framework.interfaces.HARMIClient.invoke(HARMIClient.java:199)
      at $Proxy0.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:484)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:463)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at test.web.servlet.HelloJndiServlet.doGet(Unknown Source)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at

      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j

      ava:247)
      at

      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at

      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
      at

      org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar

      dPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at

      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at

      org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar

      dPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at

      org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar

      dPipeline.java:643)
      at

      org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at

      org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar

      dPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at

      org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar

      dPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at

      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at

      org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar

      dPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:256)
      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:361)
      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:563)
      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:535)
      at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:638)
      at

      org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
      at java.lang.Thread.run(Thread.java:536)

      -----------