11 Replies Latest reply on Apr 13, 2011 4:06 AM by venkman

    Major problems with Quickstart

    venkman Newbie

      Hi there,

       

      first of all, i'm very new with jboss clustering, so please be forgiving.

       

      I have major problems with (the quickstart of) mod_cluster.

       

      I'm using

       

      - Win7 32bit

      - Jboss 6

      - Java 1.6

      - mod_cluster (trying with 1.0.0, 1.1.0, 1.1.1)

       

      So i downloaded these versions an tried it one after one.

       

      I executed the installconf.bat.

       

      So first Problem is when i start the 1.1.1 included httpd it crashed and i got this error:

       

       

      .../httpd-2.2/logs/manager.node failed

      Configuration Failed

       

       

      Then i tried the 1.1.0. with partial success. I can start the httpd.

       

      I started the load-demo client (after deploying the war). i can generate clients on ?!? 8080 ?!?, but the performance graphs didn't change (so i think that was wrong...) So i watched the "dynamic cluster with apache... webinar" and saw, that in this webinar the load-demo has to be activated with mod_cluster-manager.

       

      After this i tried to start the mod_cluster-manager on port 8000, 8080, (and so on...) with the default httpd.conf --> no success (getting a 404)

       

      i tried to add minimal setting at the httpd.conf bottom --> no success (httpd didn't start with .../httpd-2.2/logs/manager.node failed Configuration Failed)

       

      i tried to use only the minimal config (changed the virtual host settings) --> no succes (httpd didn't start) 

       

      i tried to insert <Location...> in the default httpd.conf --> no succes (getting a 404)

       

      i tried to mix o.m. entries from the linux httpd.conf with the default (which is very different, not only in the path settings ) --> no succes (getting a 404)

       

      i checked the FAQs, which says, that this could be a multicast problem.

      - Then i tested the multicast with McastSenderTest and McastReceiverTest --> success

      - i tested with a selfwritten client, using multicast ip an HAJNDI port --> success

      - i tested with the Advertize --> sucess, but not as mentined in the docu (Advertize received the String i've send with my client, followed by nonprintables)

       

      So, after 2 days of tinkering, i'm totally confused

       

      Can anyone give me tipps, or a httpd.conf which work with 1.1.0, so that i can open the mod_cluster-manager to look an my jboss cluster and test it.

       

      Thanks

       

      Venkman

        • 1. Re: Major problems with Quickstart
          joaocunhalopes Newbie

          >Can anyone give me tipps, or a httpd.conf which work with 1.1.0, so that i can open the mod_cluster-manager to look an my jboss cluster and test it.

           

          What's wrong with the configuration that is described on the manual?

          On the Apache side all you need to do is to add this to your httpd.conf (replace the 192.168.150.6 IP with your Apache IP):

           

           

          # Modules for JBoss mod_cluster

          LoadModule proxy_module modules/mod_proxy.so

          LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

          LoadModule slotmem_module modules/mod_slotmem.so

          LoadModule manager_module modules/mod_manager.so

          LoadModule proxy_cluster_module modules/mod_proxy_cluster.so

          LoadModule advertise_module modules/mod_advertise.so

           

          # Virtual host for JBoss mod_cluster (port 6666 will be used to receive information from JBoss servers)

          Listen 192.168.150.6:6666

          <VirtualHost 192.168.150.6:6666>

              KeepAliveTimeout 60

              MaxKeepAliveRequests 0

           

              ManagerBalancerName ApacheHttpdBalancer

              ServerAdvertise On

           

              <Location />   

                  Order deny,allow

                  Deny from all

                  Allow from all

              </Location>

          </VirtualHost>

           

          # Virtual host for www.xpto.pt

          Listen 192.168.150.6:80

          <VirtualHost *:80>

              <Location /mcm>

                  SetHandler mod_cluster-manager

           

                  Order deny,allow

                  Deny from all

                  Allow from all

              </Location>

           

              <Location /load-demo>

                  Order deny,allow

                  Deny from all

                  Allow from all

              </Location>

          </VirtualHost>

           

           

           

           

           

          Start with a minimal Apache http.conf, something like this (change what you need to fit your setup):

           

           

          ServerRoot "D:/Apache2.2"

           

          ThreadsPerChild 256

          MaxRequestsPerChild 0

           

          # Module required for Apache startup

          LoadModule authz_host_module modules/mod_authz_host.so

           

          # Modules for Apache logging

          LoadModule logio_module modules/mod_logio.so

          LoadModule log_config_module modules/mod_log_config.so

           

          # Apache logging configuration

          ErrorLog "logs/error.log"

          LogLevel info

          LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

          LogFormat "%h %l %u %t \"%r\" %>s %b" common

          LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio

          CustomLog "logs/access.log" common

           

          # Modules for JBoss mod_cluster

          LoadModule proxy_module modules/mod_proxy.so

          LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

          LoadModule slotmem_module modules/mod_slotmem.so

          LoadModule manager_module modules/mod_manager.so

          LoadModule proxy_cluster_module modules/mod_proxy_cluster.so

          LoadModule advertise_module modules/mod_advertise.so

           

          # Virtual host for JBoss mod_cluster (port 6666 will be used to receive information from JBoss servers)

          Listen 192.168.150.6:6666

          <VirtualHost 192.168.150.6:6666>

              KeepAliveTimeout 60

              MaxKeepAliveRequests 0

           

              ManagerBalancerName ApacheHttpdBalancer

              ServerAdvertise On

           

              <Location />   

                  Order deny,allow

                  Deny from all

                  Allow from all

              </Location>

          </VirtualHost>

           

          # Virtual host for www.xpto.pt

          Listen 192.168.150.6:80

          <VirtualHost *:80>

              <Location /mcm>

                  SetHandler mod_cluster-manager

           

                  Order deny,allow

                  Deny from all

                  Allow from all

              </Location>

           

              <Location /load-demo>

                  Order deny,allow

                  Deny from all

                  Allow from all

              </Location>

          </VirtualHost>

           

           

          You will need UDP for your JBoss cluster nodes to "comunicate" with each other. This (UDP) setup is completely done on the AS (JBoss) side and it does not come into play here.

           

          You don't, necessarily, need UDP to setup mod_cluster with JBoss.

          If you don't wish to use UDP (Advertise) with mod_cluster just follow the manual:

           

          http://docs.jboss.org/mod_cluster/1.1.0/html/faq.html#d0e4112

           

          Basically, you will have to do this:

           

          In the VirtualHost receiving the MCPM of httpd.conf don't use any Advertise directive or use:

           

          ServerAdvertise Off

           

          In mod_cluster-jboss-beans.xml add the addresses and ports of the VirtualHost to the proxyList property and set advertise to false, for example:

           

          <property name="proxyList">10.33.144.3:6666,10.33.144.1:6666</property>

          <property name="advertise">false</property>

           

          Also, please test you setup with a clean JBoss install.


          On your next post, if you still need help, please post you Apache httpd.conf and if possible some error logs.

          • 2. Re: Major problems with Quickstart
            venkman Newbie

            Thanks for the fast reply.

             

            i tried the httpd.conf you mentioned. i change ONLY the server path and my IP.

             

            i tried to start the httpd:

             

            [Fri Apr 08 12:59:32 2011] [emerg] create_mem_node *MYPATH*/httpd-2.2/logs/manager.node failed

            Configuration Failed

             

            thats all in the error log.

            • 3. Major problems with Quickstart
              joaocunhalopes Newbie

              Please change the log level to debug as bellow and try again:

               

              # Apache logging configuration

              ErrorLog "logs/error.log"

              LogLevel debug

              LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

              LogFormat "%h %l %u %t \"%r\" %>s %b" common

              LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio

              CustomLog "logs/access.log" common

               

              BTW, how are the OS permissions to create new files on httpd-2.2/logs/ ?

              • 4. Re: Major problems with Quickstart
                venkman Newbie

                Done,

                 

                but no changes in error.log

                 

                If i delete all files in /log and try a restart, all files (access.log, error.log, ....) are there again, so, it isn't write protected

                • 5. Major problems with Quickstart
                  joaocunhalopes Newbie

                  Can you please post you complete httpd.conf file, exactly as you have it on your system?

                  Also post you OS type (Unix, Windows) and what flavour/version.

                  The Apache version (please reference the version) you are using is for 32 bit or 64 bit?

                  What about the mod_cluster modules that you placed on the Apache folder? Are they for 32 bit or for 64 bit?

                  Please reference the exact mod_cluster *.so packages that you are using:

                  If it's version 1.1.1 what packages on this page?

                   

                  http://www.jboss.org/mod_cluster/downloads/1-1-1.html

                   

                  If it's version 1.1.0 what packages on this page?

                   

                  http://www.jboss.org/mod_cluster/downloads/1-1-0

                  • 6. Re: Major problems with Quickstart
                    venkman Newbie

                    of course, here it is:

                     

                    my conf:

                     

                    ServerRoot "MYPATH/httpd-2.2"

                     

                    ThreadsPerChild 256

                    MaxRequestsPerChild 0

                     

                    # Module required for Apache startup

                    LoadModule authz_host_module modules/mod_authz_host.so

                     

                    # Modules for Apache logging

                    LoadModule logio_module modules/mod_logio.so

                    LoadModule log_config_module modules/mod_log_config.so

                     

                    # Apache logging configuration

                     

                    ErrorLog "logs/error.log"

                    LogLevel debug

                    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

                    LogFormat "%h %l %u %t \"%r\" %>s %b" common

                    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio

                    CustomLog "logs/access.log" common

                     

                    # Modules for JBoss mod_cluster

                    LoadModule proxy_module modules/mod_proxy.so

                    LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

                    LoadModule slotmem_module modules/mod_slotmem.so

                    LoadModule manager_module modules/mod_manager.so

                    LoadModule proxy_cluster_module modules/mod_proxy_cluster.so

                    LoadModule advertise_module modules/mod_advertise.so

                     

                    # Virtual host for JBoss mod_cluster (port 6666 will be used to receive information from JBoss servers)

                    Listen MYIP:6666

                     

                    <VirtualHost MYIP:6666>

                        KeepAliveTimeout 60

                        MaxKeepAliveRequests 0

                     

                        ManagerBalancerName ApacheHttpdBalancer

                        ServerAdvertise On

                        <Location />  

                            Order deny,allow

                            Deny from all

                            Allow from all

                        </Location>

                     

                    </VirtualHost>

                     

                    # Virtual host for www.xpto.pt

                     

                    Listen MYIP:80

                    <VirtualHost *:80>

                         <Location /mcm>

                         SetHandler mod_cluster-manager

                            Order deny,allow

                            Deny from all

                            Allow from all

                        </Location>

                     

                        <Location /load-demo>

                            Order deny,allow

                            Deny from all

                             Allow from all

                        </Location>

                     

                    </VirtualHost>

                     

                    i use Windows 7 32bit

                     

                    I didn't places any module in an existing apache. I just downloaded:

                     

                    http://downloads.jboss.org/mod_cluster//1.1.0.Final/mod_cluster-1.1.0.Final-windows-x86-ssl.zip

                     

                    extracted it, run installconf.bat, modified the httpd.conf and tried to start it. Thats all. Nothing complex i thought .

                     

                     


                    • 7. Major problems with Quickstart
                      joaocunhalopes Newbie

                      I used you exact package/config and it works out of the box (with the above httpd.conf) on my old Windows XP 32 bit system.

                       

                      Here's the error.log:

                       

                      [Fri Apr 08 15:14:39 2011] [notice] Advertise initialized for process 1828

                      [Fri Apr 08 15:14:39 2011] [notice] Apache/2.2.15 (Win32) mod_cluster/1.1.x configured -- resuming normal operations

                      [Fri Apr 08 15:14:39 2011] [notice] Server built: Aug 23 2010 08:25:15

                      [Fri Apr 08 15:14:39 2011] [notice] Parent: Created child process 5056

                      [Fri Apr 08 15:14:39 2011] [debug] mpm_winnt.c(487): Parent: Sent the scoreboard to the child

                      [Fri Apr 08 15:14:39 2011] [debug] mod_advertise.c(577): [5056 - 1828] in child post config hook

                      [Fri Apr 08 15:14:39 2011] [notice] Child 5056: Child process is running

                      [Fri Apr 08 15:14:39 2011] [info] Parent: Duplicating socket 900 and sending it to child process 5056

                      [Fri Apr 08 15:14:39 2011] [info] Parent: Duplicating socket 908 and sending it to child process 5056

                      [Fri Apr 08 15:14:39 2011] [debug] mpm_winnt.c(605): Parent: Sent 2 listeners to child 5056

                      [Fri Apr 08 15:14:39 2011] [debug] mpm_winnt.c(408): Child 5056: Retrieved our scoreboard from the parent.

                      [Fri Apr 08 15:14:39 2011] [debug] mpm_winnt.c(564): Child 5056: retrieved 2 listeners from parent

                      [Fri Apr 08 15:14:39 2011] [debug] proxy_util.c(1818): proxy: grabbed scoreboard slot 0 in child 5056 for worker proxy:reverse

                      [Fri Apr 08 15:14:39 2011] [debug] proxy_util.c(1914): proxy: initialized worker 0 in child 5056 for (*) min=0 max=256 smax=256

                      [Fri Apr 08 15:14:39 2011] [notice] Child 5056: Acquired the start mutex.

                      [Fri Apr 08 15:14:39 2011] [notice] Child 5056: Starting 256 worker threads.

                      [Fri Apr 08 15:14:40 2011] [notice] Child 5056: Starting thread to listen on port 80.

                      [Fri Apr 08 15:14:40 2011] [notice] Child 5056: Starting thread to listen on port 6666.

                      [Fri Apr 08 15:14:40 2011] [debug] mod_proxy_cluster.c(609): update_workers_node starting

                      [Fri Apr 08 15:14:40 2011] [debug] mod_proxy_cluster.c(624): update_workers_node done

                      [Fri Apr 08 15:14:40 2011] [debug] mod_proxy_cluster.c(609): update_workers_node starting

                      [Fri Apr 08 15:14:40 2011] [debug] mod_proxy_cluster.c(624): update_workers_node done

                      [Fri Apr 08 15:14:40 2011] [debug] mod_proxy_cluster.c(609): update_workers_node starting

                      [Fri Apr 08 15:14:40 2011] [debug] mod_proxy_cluster.c(624): update_workers_node done

                       

                       

                      Since you are using Windows 7, for this test, disable you anti virus and turn off UAC. Use this guide for disabling UAC:

                       

                      http://www.mydigitallife.info/2008/12/30/how-to-disable-and-turn-off-uac-in-windows-7/

                       

                      Also, when you run httpd.exe make sure that you use "Run as Administrator".

                       

                      Latter in the evening I can test you config on a Windows 7 32 bit machine and I can post about that particular test.

                      From where I am sitting this is a OS problem and not a mod_cluster problem.

                      This is as far as I can go right now. Good luck and let us know if anything changes.

                      • 8. Re: Major problems with Quickstart
                        venkman Newbie

                        After trying it with an "Orig-Apache" (with the same error) and the post you written, i also think that this is "OS-Stuff".

                         

                        I try this now on other OS's. When this works, i have to try those "bad" turn of the anti virus things.

                         

                        Thanks for the help, sorry for the circumstances and have a good weekend!

                         

                        Venkman

                         

                        of course i'll update the status of this

                        • 9. Re: Major problems with Quickstart
                          joaocunhalopes Newbie

                          Also tested on a Windows 7 32 bit machine with no problems whatsoever:

                           

                          [Fri Apr 08 21:54:10 2011] [notice] Advertise initialized for process 2488

                          [Fri Apr 08 21:54:10 2011] [notice] Apache/2.2.15 (Win32) mod_cluster/1.1.x configured -- resuming normal operations

                          [Fri Apr 08 21:54:10 2011] [notice] Server built: Aug 23 2010 08:25:15

                          [Fri Apr 08 21:54:10 2011] [notice] Parent: Created child process 2040

                          [Fri Apr 08 21:54:10 2011] [debug] mpm_winnt.c(487): Parent: Sent the scoreboard to the child

                          [Fri Apr 08 21:54:10 2011] [debug] mod_advertise.c(577): [2040 - 2488] in child post config hook

                          [Fri Apr 08 21:54:10 2011] [notice] Child 2040: Child process is running

                          [Fri Apr 08 21:54:10 2011] [debug] mpm_winnt.c(408): Child 2040: Retrieved our scoreboard from the parent.

                          [Fri Apr 08 21:54:10 2011] [info] Parent: Duplicating socket 128 and sending it to child process 2040

                          [Fri Apr 08 21:54:10 2011] [info] Parent: Duplicating socket 124 and sending it to child process 2040

                          [Fri Apr 08 21:54:10 2011] [debug] mpm_winnt.c(605): Parent: Sent 2 listeners to child 2040

                          [Fri Apr 08 21:54:10 2011] [debug] mpm_winnt.c(564): Child 2040: retrieved 2 listeners from parent

                          [Fri Apr 08 21:54:10 2011] [debug] proxy_util.c(1818): proxy: grabbed scoreboard slot 0 in child 2040 for worker proxy:reverse

                          [Fri Apr 08 21:54:10 2011] [debug] proxy_util.c(1914): proxy: initialized worker 0 in child 2040 for (*) min=0 max=256 smax=256

                          [Fri Apr 08 21:54:10 2011] [notice] Child 2040: Acquired the start mutex.

                          [Fri Apr 08 21:54:10 2011] [notice] Child 2040: Starting 256 worker threads.

                          [Fri Apr 08 21:54:10 2011] [notice] Child 2040: Starting thread to listen on port 80.

                          [Fri Apr 08 21:54:10 2011] [notice] Child 2040: Starting thread to listen on port 6666.

                          [Fri Apr 08 21:54:11 2011] [debug] mod_proxy_cluster.c(609): update_workers_node starting

                          [Fri Apr 08 21:54:11 2011] [debug] mod_proxy_cluster.c(624): update_workers_node done

                          [Fri Apr 08 21:54:11 2011] [debug] mod_proxy_cluster.c(609): update_workers_node starting

                          [Fri Apr 08 21:54:11 2011] [debug] mod_proxy_cluster.c(624): update_workers_node done

                          [Fri Apr 08 21:54:11 2011] [debug] mod_proxy_cluster.c(609): update_workers_node starting

                          [Fri Apr 08 21:54:11 2011] [debug] mod_proxy_cluster.c(624): update_workers_node done

                           

                          Pointed my brower to http://MYIP/mcm and got the expected response.

                          You should really check your AV and UAC or any other software that is in conflit with the used ports (use netstat -an to check for listening ports prior to executing httpd.exe).

                          Regards.

                          • 10. Re: Major problems with Quickstart
                            Jean-Frederic Clere Master

                            "

                            [Fri Apr 08 12:59:32 2011] [emerg] create_mem_node *MYPATH*/httpd-2.2/logs/manager.node failed

                            Configuration Failed"

                             

                            It seems httpd can't create files in *MYPATH*/httpd-2.2/logs, yoi need to fix that permission issue first: mod_cluster can't work without those files.

                            • 11. Major problems with Quickstart
                              venkman Newbie

                              So, after all:

                               

                              IT WORKS.

                               

                              First:

                               

                              those "httpd won't start" WAS a permission thing. I have to start it explicit "as admin" even if i was logged on as admin. (Funny thing, that the mod_cluster 1.1.0 allows a start with an UNCHANGED httpd.conf, and the 1.1.1 didn't.) It's a little bit embarrassing, but i switched from XP to 7 only a couple of weeks ago , and the error handling of win7 in adminthing is very confusing i think... Never mind...

                               

                              Second:

                               

                              I have to replace the mod_cluster.sar in JBoss (i use the 6.0.0 final) with the mod_cluster.sar in mod_cluster java bundles to make the mod_cluster-manager working correctly.

                               

                              Before replacing, i didn't get infos about any server in the cluster, after that, it works perfect.

                               

                              So, sorry again for the circumstances, and thanks for the useful help!

                               

                              P.V.