1 2 Previous Next 15 Replies Latest reply on Jul 9, 2012 10:33 AM by Borisa Zivkovic

    AS7 clustering and remote outbound connection issue

    Manoj Uikey Newbie

      I am trying to setup a cluster of 3 JBoss 7.1.1 final instance lets say node1, node2, node3

      I am following the configuration explained in

      https://docs.jboss.org/author/display/AS71/Clustered+EJBs

       

      I defined a clustered Stateless bean in B.ear and deployed it into node2

       

      in the node1 I have A.ear deployed which does the lookup of EJB in B.ear

       

      standalone_full_ha.xml of node1 has one outbound connection configured for node2's host name, port.

       

      As it's explained I need to define only one outbound connection to a node in the cluster and rest will be taken care

       

      Now I deploy the B.ear in the node3 server and stop server B

       

      after doing all this I make a call to node1 and expect it to do the lookup in node3 now ( since node2 is down)

       

      But this doesn't work, I get java.lang.IllegalStateException: No EJB receiver available for handling...

       

      java.lang.IllegalStateException: No EJB receiver available for handling

       

      I also see this error, any help will be appreciate

       

      14:17:36,459 ERROR [org.jboss.remoting.remote.connection] (Remoting "node1" read-1) JBREM000200: Rem
      ote connection failed: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
      14:17:36,473 INFO  [org.jboss.ejb.client.remoting.RemotingConnectionClusterNodeManager] (ejb-client-
      cluster-node-connection-creation-4-thread-1) Could not create a connection for cluster node ClusterN
      ode{clusterName='ejb', nodeName='node2', clientMappings=[ClientMapping{sourceNetworkAddress=/0:0:0:0
      :0:0:0:0, sourceNetworkMaskBits=0, destinationAddress='127.0.0.1', destinationPort=4467}], resolvedD
      estination=[Destination address=127.0.0.1, destination port=4467]} in cluster ejb: java.lang.Runtime
      Exception: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

        • 2. Re: AS7 clustering and remote outbound connection issue
          Manoj Uikey Newbie

          I also tried with 7.2.0.Alpha1-SNAPSHOT, and got the same error

          I dont want to configure all remote outbound connections as it requires repackaging of aplication everytime there is a change

          in cluster's topology.

          • 3. Re: AS7 clustering and remote outbound connection issue
            jaikiran pai Master

            You should configure the connection configurations for the cluster name in your jboss-ejb-client.xml of the deployment. See the jboss-ejb-client_1_2.xsd for more details (you can find it in JBOSS_HOME/docs/schema folder).

            • 4. Re: AS7 clustering and remote outbound connection issue
              Radoslav Husar Master

              Manoj,

               

              I think you should read up on

              https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+server+instance

              because what you want to do will not work. You have 2 different applications so its more of a cluster to cluster communication.

              I dont want to configure all remote outbound connections as it requires repackaging of aplication everytime there is a change in cluster's topology.

              That shouldnt be necesary. You only need to add new <remote-destination .../> when topology changes, no need to repackage.

               

              R

              1 of 1 people found this helpful
              • 5. Re: AS7 clustering and remote outbound connection issue
                Manoj Uikey Newbie

                Alright, Even if I add more outbound connections in standalone-full-ha.xml, my application only does lookup in the server configured in jboss-ejb-client.xml

                 

                so its not helping me

                • 6. Re: AS7 clustering and remote outbound connection issue
                  Radoslav Husar Master

                  I see that you deleted your reply, but I was about to say:

                   

                  Are both of those servers really remote? Otherwise the logging is wrong and should be fixed.

                  • 7. Re: AS7 clustering and remote outbound connection issue
                    Radoslav Husar Master

                    AFAIR there should be no servers defined in jboss-ejb-client.xml -- only reference to the connection where all the servers are defined.

                    1 of 1 people found this helpful
                    • 8. Re: AS7 clustering and remote outbound connection issue
                      Manoj Uikey Newbie

                      Okay, I have 3 jboss nodes running in same machine with port bind offset 10, 20, 30, all jboss are placed in different directory by the way.

                       

                      here is my jboss-ejb-client.xml of A.ear, I have defined the "ejb-security-realm" and outbound connection in node1 only (in it's standalone-full-ha.xml)

                      Am I supposed to replicate this to other nodes also?

                       

                       

                      <jboss-ejb-client xmlns:xsi="urn:jboss:ejb-client:1.0" xsi:noNamespaceSchemaLocation="jboss-ejb-client_1_2.xsd"

                      >

                            <client-context >

                              <ejb-receivers >

                                  <remoting-ejb-receiver outbound-connection-ref="remote-ejb-connection"/>

                              </ejb-receivers>

                              <clusters >

                                        <cluster max-allowed-connected-nodes="200" name="ejb" username="guest" security-realm="ejb-security-realm" cluster-node-selector="sdk.service.producer.NodeSelector">

                                                  <node name="node1"

                                                            security-realm="ejb-security-realm" username="guest" connect-timeout="30000">

                                                            <connection-creation-options>

                                          <property name="org.xnio.Options.SSL_ENABLED" value="false"/>

                                          <property name="org.xnio.Options.SASL_POLICY_NOANONYMOUS" value="true"/>

                                                            </connection-creation-options>

                                                  </node>

                             

                                                  <node name="node2"

                                                            security-realm="ejb-security-realm" username="guest" connect-timeout="30000">

                                                            <connection-creation-options>

                                          <property name="org.xnio.Options.SSL_ENABLED" value="false"/>

                                          <property name="org.xnio.Options.SASL_POLICY_NOANONYMOUS" value="true"/>

                                                            </connection-creation-options>

                                                  </node>

                             

                                                  <node name="node3"

                                                            security-realm="ejb-security-realm" username="guest" connect-timeout="30000">

                                                            <connection-creation-options>

                                          <property name="org.xnio.Options.SSL_ENABLED" value="false"/>

                                          <property name="org.xnio.Options.SASL_POLICY_NOANONYMOUS" value="true"/>    

                                                            </connection-creation-options>

                                                  </node>

                                        </cluster>

                             

                              </clusters>

                          </client-context>

                      </jboss-ejb-client>

                      • 9. Re: AS7 clustering and remote outbound connection issue
                        Manoj Uikey Newbie

                        Okay, looks like I am quite close to it now, when I deploy the client application on node1, I see this error for both node2, and node3

                        Should I have to specify user name password in jboss-ejb-client.xml if yes, please let me know how?

                         

                        17:05:59,431 INFO  [org.jboss.ejb.client.remoting.RemotingConnectionClusterNodeManager] (ejb-client-

                        cluster-node-connection-creation-8-thread-2) Could not create a connection for cluster node ClusterN

                        ode{clusterName='ejb', nodeName='node3', clientMappings=[ClientMapping{sourceNetworkAddress=/0:0:0:0

                        :0:0:0:0, sourceNetworkMaskBits=0, destinationAddress='127.0.0.1', destinationPort=4477}], resolvedD

                        estination=[Destination address=127.0.0.1, destination port=4477]} in cluster ejb: java.lang.Runtime

                        Exception: javax.security.sasl.SaslException: Authentication failed: all available authentication me

                        chanisms failed

                                at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:91)

                                at org.jboss.ejb.client.remoting.RemotingConnectionClusterNodeManager.getEJBReceiver(Remotin

                        gConnectionClusterNodeManager.java:104)

                                at org.jboss.ejb.client.ClusterContext$EJBReceiverAssociationTask.call(ClusterContext.java:4

                        06)

                                at org.jboss.ejb.client.ClusterContext$EJBReceiverAssociationTask.call(ClusterContext.java:3

                        80)

                                at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_04]

                                at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_04]

                                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1

                        .7.0_04]

                                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1

                        .7.0_04]

                        • 10. Re: AS7 clustering and remote outbound connection issue
                          Manoj Uikey Newbie

                          Finally it works, I had to define the cluster correctly

                          But this has a severe limitation, if I add any more node in the cluster then I have to change this file and repackage the application

                          Is there any other way to do this? please help

                           

                          this is my jboss-ejb-client.xml

                           

                          <jboss-ejb-client xmlns:xsi="urn:jboss:ejb-client:1.0" xsi:noNamespaceSchemaLocation="jboss-ejb-client_1_2.xsd">

                                <client-context deployment-node-selector="sdk.service.producer.DeploymentSelector" >

                                  <ejb-receivers exclude-local-receiver="true">

                                       <remoting-ejb-receiver outbound-connection-ref="remote-ejb-connection"/>

                                  </ejb-receivers>

                           

                                   <clusters >

                                            <cluster max-allowed-connected-nodes="200" name="ejb" username="guest" security-realm="ejb-security-realm" cluster-node-selector="sdk.service.producer.NodeSelector">

                                                      <node name="node1"

                                                                security-realm="ejb-security-realm" username="guest" connect-timeout="30000" >

                                                                <connection-creation-options>

                                              <property name="org.xnio.Options.SSL_ENABLED" value="false"/>

                                              <property name="org.xnio.Options.SASL_POLICY_NOANONYMOUS" value="false"/>                  

                                                                </connection-creation-options>

                                                      </node>

                                 

                                                      <node name="node2"

                                                                security-realm="ejb-security-realm" username="guest" connect-timeout="30000">

                                                                <connection-creation-options>

                                              <property name="org.xnio.Options.SSL_ENABLED" value="false"/>

                                              <property name="org.xnio.Options.SASL_POLICY_NOANONYMOUS" value="false"/>

                                                                </connection-creation-options>

                                                      </node>

                                                      <node name="node3"

                                                                security-realm="ejb-security-realm" username="guest" connect-timeout="30000">

                                                                <connection-creation-options>

                                              <property name="org.xnio.Options.SSL_ENABLED" value="false"/>

                                              <property name="org.xnio.Options.SASL_POLICY_NOANONYMOUS" value="false"/>                

                                                                </connection-creation-options>

                                                      </node>

                                            </cluster>

                                 

                                  </clusters>

                           

                              </client-context>

                          </jboss-ejb-client>

                          • 11. Re: AS7 clustering and remote outbound connection issue
                            jaikiran pai Master

                            You don't need it to configure in that manner. You can instead do it this way:

                             

                            <jboss-ejb-client xmlns:xsi="urn:jboss:ejb-client:1.0" xsi:noNamespaceSchemaLocation="jboss-ejb-client_1_2.xsd">
                            ...
                                        <ejb-receivers exclude-local-receiver="true">
                                             <remoting-ejb-receiver outbound-connection-ref="remote-ejb-connection"/>
                                        </ejb-receivers>
                            
                                         <clusters >
                                                  <cluster ... name="ejb" username="guest" security-realm="ejb-security-realm" ...>
                                                      <connection-creation-options>
                                                            <property name="org.xnio.Options.SSL_ENABLED" value="false"/>
                                                            <property name="org.xnio.Options.SASL_POLICY_NOANONYMOUS" value="false"/>                  
                                                        </connection-creation-options>
                                                  </cluster>
                                        </clusters>
                                    </client-context>
                            </jboss-ejb-client>
                            
                            • 12. Re: AS7 clustering and remote outbound connection issue
                              Manoj Uikey Newbie

                              Thanks a lot, it just figured it out too, it works like a peace of cake now

                              Still it would have been great if I didnt have to specify the cluster name as well,

                              this would have made my day :-)

                              • 13. Re: AS7 clustering and remote outbound connection issue
                                jaikiran pai Master

                                Manoj Uikey wrote:

                                 

                                Still it would have been great if I didnt have to specify the cluster name as well,

                                Why not? Clusters are identified by a name, so leaving out the name won't be right.

                                • 14. Re: AS7 clustering and remote outbound connection issue
                                  Manoj Uikey Newbie

                                  Since we are packaging jboss-ejb-client.xml inside application, it's like saying this EAR can be deployed in a cluster named "ejb"

                                  what if I go on and try to deploy my app in a different cluster, it wont work.

                                   

                                  I wonder if  just <remoting-ejb-receiver outbound-connection-ref="remote-ejb-connection"/>

                                  is enough to locate the node and find out into which cluster this referenced node belongs too

                                  1 2 Previous Next