5 Replies Latest reply on Jun 20, 2013 2:56 AM by jfclere

    mod_cluster 1.2.0.Final + AS 7.0.2 Final -problem ?

      Hi,

       

      I have a problem with work with mod_cluster.

       

      My configurations:

       

      Machine Box 1 (jboss1.local):

      - 1x AS 7.0.2 Final (Started in standalone-ha mode.)

       

      Machine Box 2 (jboss2.local):

      - Apache modcluster 1.2.0.Final

      - 1x AS 7.0.2 Final (Started in standalone-ha mode.)

       

      Both of the machine run on Centos 6.2

       

      Apache modcluster can detect both severs. However, the AS on the other server (jboss1.local) does not work (Status: NOTOK). Only the one on the same box with Apache works. The mod_cluster_manager page shows as below:

       

      mod_cluster/1.2.0.Final

      start of "httpd.conf" configuration

      mod_proxy_cluster.c: OK

      mod_sharedmem.c: OK

      Protocol supported: http AJP https

      mod_advertise.c: OK

      Server: apache.local

      Server: apache.local VirtualHost: apache.local:6666 Advertising on Group 224.0.1.105 Port 23364 for http://192.168.0.208:6666 every 5 seconds

      end of "httpd.conf" configuration

       

      Auto Refresh show DUMP output show INFO output

      Node e92530a8-96b3-3a64-ae6a-c99a0d494d54 (http://jboss2.local:8080):

      Enable Contexts Disable Contexts

      Balancer: mycluster,LBGroup: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 26,Ttl: 60000000,Status: OK,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: 1

      Virtual Host 1:

      Contexts:

      /, Status: ENABLED Request: 0 Disable 

      Aliases:

      localhost example.com default-host 

      Node bf200fb3-2f50-3d4a-ac7b-6039e17bf55f (http://jboss1.local:8080):

      Enable Contexts Disable Contexts

      Balancer: mycluster,LBGroup: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 26,Ttl: 60000000,Status: NOTOK,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: -1

      Virtual Host 1:

      Contexts:

      /, Status: ENABLED Request: 0 Disable 

      Aliases:

      example.com localhost default-host 

       

       

      AS on the jboss1.local shows this error message:

       

      14:40:14,351 ERROR [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [MEM: MEM: Can't read node: {4}] sending command STATUS to proxy apache.local/192.168.0.208:6666, configuration will be reset

       

      What could be the reason? Please help.

       

      Note that box 1 and box 2 are two virtual machines running on Virtualbox.

       

      Thanks,

      Giang.

        • 1. Re: mod_cluster 1.2.0.Final + AS 7.0.2 Final -problem ?
          jfclere

          whait is the error in error_log in httpd?

          1 of 1 people found this helpful
          • 2. Re: mod_cluster 1.2.0.Final + AS 7.0.2 Final -problem ?

            Sorry, it is my fault. I provided the wrong IP. Anyway, thanks for your support.

             

            By the way, i did give it a try with jBoss 7.1.1 with the same configuration (Mod Cluster 1.2.0.Final). Load balancing does not work. It always shows the page with the content "It works". I know this is the index.html. It seems that it does not forward/redirect the request to jBoss. Any idea?

             

            Regards,

            Giang.

            • 3. Re: mod_cluster 1.2.0.Final + AS 7.0.2 Final -problem ?
              jfclere

              Without any log or conf files it is hard to find what is wrong :-( the guess is that the connector used by modcluster in AS 7.1.x is different than the one in AS 7.0.x.

              • 4. Re: mod_cluster 1.2.0.Final + AS 7.0.2 Final -problem ?

                Jean-Frederic,

                 

                Connector? Do you mean AJP, HTTP, HTTPS, ...? I chekced from jBoss side, they provide HTTP and HTTPS connectors.

                 

                Below are the confurations of them.

                 

                Mod Cluster:

                 

                <IfModule manager_module>

                  Listen apache.local:6666

                  ManagerBalancerName mycluster

                  <VirtualHost apache.local:6666>

                 

                    <Location />

                     Order deny,allow

                     #Deny from all

                     Allow from all

                    </Location>

                 

                    KeepAliveTimeout 300

                    MaxKeepAliveRequests 0

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

                    AdvertiseFrequency 5

                    #AdvertiseSecurityKey secret

                    #AdvertiseGroup @ADVIP@:23364

                    EnableMCPMReceive

                    AllowDisplay on

                 

                    <Location /mod_cluster_manager>

                       SetHandler mod_cluster-manager

                       Order deny,allow

                       #Deny from all

                       Allow from all

                    </Location>

                 

                  </VirtualHost>

                </IfModule>

                 

                 

                jBoss 7.1.1

                 

                .......

                <mod-cluster-config advertise-socket="modcluster" proxy-list="apache.local:6666">

                ....

                ...

                <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

                ....

                 

                 

                When checking mod cluster status, it shows:

                 

                mod_cluster/1.2.0.Final

                start of "httpd.conf" configuration

                mod_proxy_cluster.c: OK

                mod_sharedmem.c: OK

                Protocol supported: http AJP https

                mod_advertise.c: OK

                Server: jboss3.local

                Server: jboss3.local VirtualHost: apache.local:6666 Advertising on Group 224.0.1.105 Port 23364 for http://192.168.1.207:6666 every 5 seconds

                end of "httpd.conf" configuration

                 

                Auto Refresh show DUMP output show INFO output

                Node node1 (http://jboss1.local:8180):

                Enable Contexts Disable Contexts

                Balancer: mycluster,LBGroup: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 26,Ttl: 60000000,Status: OK,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: 100

                 

                I think everything works fine. However, when going to http://apache.local, it shows:

                 

                It works!

                 

                But does not open the ROOT application from jBoss. Pls note that, the jBoss 7.0.2 works fine with the same configuration.

                 

                Thanks,

                Giang.

                • 5. Re: mod_cluster 1.2.0.Final + AS 7.0.2 Final -problem ?
                  jfclere

                  it is the excluded-contexts element the default value is ROOT, admin-console, invoker, bossws, jmx-console, juddi, web-console (See http://docs.jboss.org/mod_cluster/1.2.0/html/java.properties.html#mcmp)