3 Replies Latest reply on Jul 17, 2013 7:08 PM by howardl815

    Running cluster-ha-singleton example on domain mode

    howardl815

      Hi,

       

      I'm running cluter-ha-singleton example on clutered machine in domain mode. It's on one machine with two ports offsetted. When the singleton service is running on the server 1 and I shut down the server 1, I get the below error message.

       

      [INFO] --- exec-maven-plugin:1.2.1:exec (default-cli) @ jboss-as-cluster-ha-singleton-client ---

      Lookup Bean name is: ejb:/jboss-as-cluster-ha-singleton-service/ServiceAccessBean!org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.ServiceAccess

      Exception in thread "main" java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:, moduleName:jboss-as-cluster-ha-singleton-service, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@45660d6

              at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:727)

              at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:116)

              at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:183)

              at org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:253)

              at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:198)

              at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:181)

              at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:144)

              at $Proxy0.getNodeNameOfTimerService(Unknown Source)

              at org.jboss.as.quickstarts.cluster.hasingleton.service.client.SingletonServiceClient.getServiceNodeName(SingletonServiceClient.java:54)

              at org.jboss.as.quickstarts.cluster.hasingleton.service.client.SingletonServiceClient.main(SingletonServiceClient.java:67)

       

      And when I start the server 1 again and run the client, the service was switched to server 2 fine. And if I kill the server 2 while the singleton service is running on server 2, I don't get the above exception. It switches to server 1 fine. This exception happens only when the singleton service is running on server 1 and the server 1 was killed. What am I doing wrong? Thank you very much for any help.

        • 1. Re: Running cluster-ha-singleton example on domain mode
          wdfink

          What profile do you use, are there any changes? How do you deploy the app? And when the Exception happen, do you have a full logfile?

          • 2. Re: Running cluster-ha-singleton example on domain mode
            howardl815

            Hi,

             

            I'm using full-ha profile. Here's my host.xml

             

                    <server name="ha-server-1" group="ha-server-group" auto-start="true">

                        <!-- server-three avoids port conflicts by incrementing the ports in

                             the default socket-group declared in the server-group -->

                        <socket-bindings port-offset="100"/>

                                          <!-- Remote JPDA debugging for a specific server -->

                                          <jvm name="default">

                                          <!-- debug-enabled="true" -->

                                                    <jvm-options>

                                                              <option value="-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"/>

                                                    </jvm-options>

                                          </jvm>

                    </server>

                    <server name="ha-server-2" group="ha-server-group" auto-start="true">

                        <!-- server-three avoids port conflicts by incrementing the ports in

                             the default socket-group declared in the server-group -->

                        <socket-bindings port-offset="200"/>

                    </server>

             

            and here's domain.xml

             

                    <server-group name="ha-server-group" profile="full-ha">

                        <jvm name="default">

                            <heap size="64m" max-size="512m"/>

                        </jvm>

                        <socket-binding-group ref="full-ha-sockets"/>

                        <deployments>

                            <deployment name="jboss-as-helloworld.war" runtime-name="jboss-as-helloworld.war"/>

                            <deployment name="jboss-as-helloworld-singleton.war" runtime-name="jboss-as-helloworld-singleton.war"/>

                            <deployment name="jboss-as-cluster-ha-singleton-service.jar" runtime-name="jboss-as-cluster-ha-singleton-service.jar"/>

                        </deployments>

                    </server-group>

             

            There is no changes. I'm just running the example that was included in jboss-eap-6.1.0-quickstarts.zip. But I didn't use maven to deploy. I used JBoss web admin page to deploy the jar onto domain instead of deploying to each server using maven. I don't have a full logfile, but pretty much that's all it printed. Thanks for any help!

            • 3. Re: Running cluster-ha-singleton example on domain mode
              howardl815

              We were able to figure it out. Since the port offsets in host.xml are 100 and 200, jboss-ejb-client.properties has to match that. Once we modified remote.connection.one.port = 4547 (4447 + 100) and remote.connection.two.port = 4647 (4447 + 200), it worked. Thanks.