1 2 3 Previous Next 35 Replies Latest reply on Aug 25, 2012 10:06 AM by ranga033

    mod_cluster 1.2 + JBossAS 7.1 problem

    tair.sabirgaliev

      I'm trying to setup a combination of mod_cluster 1.2.0.Final, JBossAS 7.1.1.Final and OpenJDK 1.6 on CentOS 6.2

       

      So far it seems like JBoss can't automatically discover the mod_cluster server.

       

      My steps:

      0. Disable firewall

       

      1. Download and install mod_cluster standalone. No changes in httpd.conf

       

      2. Run: sudo /opt/jboss/httpd/sbin/apachectl start

       

      3. Run: sudo tcpdump -n host 224.0.1.105

      Output:

      {noformat}

      tcpdump: verbose output suppressed, use -v or -vv for full protocol decode

      listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes

      08:46:02.685535 IP 192.168.1.66.23364 > 224.0.1.105.23364: UDP, length 301

      08:46:07.727222 IP 192.168.1.66.23364 > 224.0.1.105.23364: UDP, length 301

      08:46:12.772314 IP 192.168.1.66.23364 > 224.0.1.105.23364: UDP, length 301

      08:46:17.817973 IP 192.168.1.66.23364 > 224.0.1.105.23364: UDP, length 301

      08:46:22.861130 IP 192.168.1.66.23364 > 224.0.1.105.23364: UDP, length 301

      ^C

      5 packets captured

      5 packets received by filter

      0 packets dropped by kernel

      {noformat}

      Seems advertise is working.

       

      4. Download JBossAS-7.1.1.Final, unzip and run: ./standalone.sh -c standalone-ha.xml

       

      5. Deploy <distributable/> hello_cluster application: mvn clean package jboss-as:deploy

       

      6. Open http://localhost:8080/hello_cluster -- it works

       

      7. Open http://localhost/hello_cluster -- Not Found

       

      7. Open http://localhost:6666/mod_cluster_manager -- the list of nodes is empty

       

      8. Edit standalone-ha.xml, specify proxy-list :

       

              <subsystem xmlns="urn:jboss:domain:modcluster:1.0">
                  <mod-cluster-config advertise-socket="modcluster" proxy-list="127.0.0.1:6666">
                      <dynamic-load-provider>
                          <load-metric type="busyness"/>
                      </dynamic-load-provider>
                  </mod-cluster-config>
              </subsystem>
      

       

      9. Restart jboss

       

      10. Open http://localhost:6666/mod_cluster_manager -- 1 node in the list

       

      11. Open http://localhost/hello_cluster -- it works

       

      So my question: is this expected behavior? Am I missing something?

       

      UPDATE 28-March-2012:

      Works as per documentation with jboss-as-7.1.2.Final-SNAPSHOT (rev. bb233e7a5f391a1a50e1ff621eaa13d1c9fc1d1f)

        • 1. Re: mod_cluster 1.2 + JBossAS 7.1 problem
          jfclere

          that is a bug JBPAPP-7516

          • 2. Re: mod_cluster 1.2 + JBossAS 7.1 problem
            cvarga

            Hi Tair

             

            Appaerntly you are not missing anything

             

            I agree with  Jean-Frederic . It is a bug.

            Looks like it's a bug related to the advertise-security-key

             

            If you enable it, the advertise will work correctly.

             

            You have to enable the advertise-security-key on both apache and jboss AS

             

             

            Apache httpd.conf

            ...

            #ServerAdvertise on http://@IP@:6666

            ServerAdvertise on http://myBindingIP:80

            AdvertiseFrequency 5

            AdvertiseSecurityKey mySecurityKey

            ...

             

            Jboss AS 7.1.X

            Standalone.xml or domain.xml

             

            ...

            <mod-cluster-config advertise-socket="modcluster" advertise-security-key="mySecurityKey">

            ...

             

            I hope this helps

             

            Cheers

            • 3. Re: mod_cluster 1.2 + JBossAS 7.1 problem
              keiji13

              Hi

               

              I'm still getting an error, even when I put AdvertiseSecurityKey in my httpd.conf, once I start my second machine. When only one machine is running, then I check mod_cluster_manager, the node is detected but the name is undefined. I read somewhere that modcluster doesn't generate a unique UUID, so I have to add instance-id="name" in the web subsystem. But how do you do that in a domain environment where all nodes share the same configuration (because each node should be having different names)?

               

              Error Log:

              [Server:server-three] 11:59:11,357 ERROR [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [MEM: MEM: Can't read node: {4}] sending command STATUS to proxy 10.128.50.149/10.128.50.149:10001, configuration will be reset

              [Server:server-three] 11:59:21,367 ERROR [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [MEM: MEM: Old node still exist: {4}] sending command CONFIG to proxy 10.128.50.149/10.128.50.149:10001, configuration will be reset

               

               

              Thanks!

              • 4. Re: mod_cluster 1.2 + JBossAS 7.1 problem
                pavel.orehov

                Hi,

                 

                I have a similar issue with JBoss 7.1.1.Final and mod_cluster 1.2.0.Final.

                 

                The mentioned above BUG workaround solved the advertise issue.

                Howver, when more than one JBoss standalone node is started (on the same machine with port offset) I see the same error in JBoss log and in mod_cluster manager I see that every several seconds it shows another JBoss peer-1 or peer-2 discovered but never both.

                 

                Thanks,

                Pavel

                • 5. Re: mod_cluster 1.2 + JBossAS 7.1 problem
                  rhusar

                  it shows another JBoss peer-1 or peer-2 discovered but never both.

                  That typically happens when your config is incorrect and your log typically shows "configuration will be reset". Check that you have same mod_cluster config and that you have different instance-ids.

                  • 6. Re: mod_cluster 1.2 + JBossAS 7.1 problem
                    pavel.orehov

                    Started to work after I added instance-id="${jboss.node.name}" to web module in stanalone.xml.

                    Thanks a lot for your help.

                    • 7. Re: mod_cluster 1.2 + JBossAS 7.1 problem
                      keiji13

                      i can see that instance-id works on standalone. but what if you're running domain, wherein you only rely on one configuration for all nodes?

                      • 8. Re: mod_cluster 1.2 + JBossAS 7.1 problem
                        thephan7om

                        I am experiencing the same issue, I am attempting to run a 2 server cluster in domain mode and getting the same error

                         

                         

                        [Server:jd-server-one] 12:00:15,359 ERROR [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [MEM: MEM: Can't read node: {4}] sending command STATUS to proxy localhost/127.0.0.1:8888, configuration will be reset
                        [Server:jd-server-one] 12:00:25,359 ERROR [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [MEM: MEM: Old node still exist: {4}] sending command CONFIG to proxy localhost/127.0.0.1:8888, configuration will be reset
                        [Server:jd-server-two] 12:00:35,063 ERROR [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [MEM: MEM: Can't read node: {4}] sending command STATUS to proxy localhost/127.0.0.1:8888, configuration will be reset
                        [Server:jd-server-two] 12:00:45,063 ERROR [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [MEM: MEM: Old node still exist: {4}] sending command CONFIG to proxy localhost/127.0.0.1:8888, configuration will be reset
                        

                         

                        Did you manage to find a solution?

                        • 9. Re: mod_cluster 1.2 + JBossAS 7.1 problem
                          pavel.orehov

                          The solution is to add instance-id="${jboss.node.name}" to web module in stanalone.xml

                          • 10. Re: mod_cluster 1.2 + JBossAS 7.1 problem
                            thephan7om

                            Hi Pavel,

                             

                            Thanks, We are trying to use Domain mode. so is the real solution to use Standalone mode and not Domain mode?

                            • 11. Re: mod_cluster 1.2 + JBossAS 7.1 problem
                              ranga033

                              Works in domain mode as well.

                              • 12. Re: mod_cluster 1.2 + JBossAS 7.1 problem
                                ctomc

                                Hi,

                                 

                                this was an issue that was fixed in upstream will be in 7.1.2 when it is released.

                                 

                                 

                                --

                                tomaz

                                • 13. Re: mod_cluster 1.2 + JBossAS 7.1 problem
                                  ranga033

                                  Thanks Tomaz for the reply. Is this problem limited to only web subsystem or other subsystems like ejb,jpa etc are affected too ?

                                  • 14. Re: mod_cluster 1.2 + JBossAS 7.1 problem
                                    ctomc

                                    Hi,

                                     

                                    this was related just to web subsystem and how it works with mod_cluster.

                                    if you need fix for it, i would recommend you to checkout and build upstream code.

                                    or download nightly build (but ATM jenkins is bit broken )

                                     

                                    --

                                    tomaz

                                    1 2 3 Previous Next