4 Replies Latest reply on Jun 9, 2004 6:33 AM by carpy1970

    JBoss 3.2.4 and Apache integration

      Hello,

      After reading through n-number of threads I still have not found the solution to my problem so hopefully someone will mercifully point out the error of my ways...

      I am having a problem getting to my clustered JBoss servers (each instance is running on a different machine) via Apache 2.0.49 using mod_jk2 maybe you can help me figure out what is wrong.

      To begin:

      1) I have clustered JBoss 3.2.4RC2 by creating another instance of the "all" server. I have changed cluster-service.xml to include "jvmRoute=jboss1".

      2) I have copied my new JBoss "all" to two different machines and when I start them they both are clustered; so that part works.


      3) I have installed Apache 2.0.49 on a 3rd machine and added the mod_jk2 connector to modules/mod_jk2 (here it seems that the suffix is .so and not .dll even though this is the win32 connector).

      4) in the httpd/conf/httpd file I added the following to the end of the script
      LoadModule jk2_module modules/mod_jk2.so

      5) I created the following workers2.properties file:

      [logger]
      level=DEBUG

      [config:]
      #file=/conf/workers2.properties
      file=C:/appServer/Apache/Apache2/conf/workers2.properties
      debug=5
      debugEnv=0

      [uriMap:]
      info=Maps the requests. Options: debug
      debug=0

      # Alternate file logger
      [logger.file:0]
      level=DEBUG
      file=C:/appServer/Apache/Apache2/logs/jk2.log

      [shm:]
      info=Scoreboard. Required for reconfiguration and status with multiprocess servers
      file=C:/appServer/Apache/Apache2/logs/jk2.shm
      size=10000
      debug=0
      disabled=0

      [workerEnv:]
      info=Global server options
      timing=1
      debug=0
      # Default Native Logger (apache2 or win32 )
      # can be overriden to a file logger, useful
      # when tracing win32 related issues
      #logger=logger.file:0

      # Loadbalancer
      [lb:lb]
      info=Default load balancer.
      debug=5
      stickySession=1

      # First Tomcat Instance
      [channel.socket:192.168.100.33:8109]
      info=Ajp13 forwarding over socket
      debug=5
      tomcatId=jboss1:8109
      port=8109
      host=192.168.100.33
      disabled=0

      [ajp13:192.168.100.33:8109]
      channel=channel.socket:192.168.100.33:8109
      group=lb
      lb_factor=1


      # Second Tomcat Instance
      [channel.socket:192.168.100.34:8109]
      info=Ajp13 forwarding over socket
      debug=5
      tomcatId=jboss2:8109
      port=8109
      host=192.168.100.34
      disabled=0

      [ajp13:192.168.100.34:8109]
      channel=channel.socket:192.168.100.34:8109
      group=lb
      lb_factor=1

      [status:]
      info=Status worker, displays runtime informations

      # Uri mapping
      [uri:/*.jsp]
      group=lb

      [uri:/jsf-guessNumber/*]
      group=lb

      [uri:/servlet/*]
      group=lb


      6) Restarted Apache2 service on WinXP machine
      7) on WinXP machine:
      enter http://localhost -- get default page OK
      enter http://localhost/jsf-guessNumber --get 404 page not found

      Note: jsf-guessNumber.war is installed on all servers in cluster.

      8) on winXP machine:
      enter http://192.168.100.33:8180/jsf-guessNumber/ -- page shows
      enter http://192.168.100.34:8180/jsf-guessNumber/ -- page shows



      Any idea why mod2 connector not going to JBoss???

        • 1. Re: JBoss 3.2.4 and Apache integration
          pouncilt

          I am having the same problem. Though I am not doing clustering, I am just trying to make Apache2 and JBoss talk to one another. I am on Windows 2000 and I my mod_jk2.so doesn't seem to work either. I think we need to find the mod_jk2.dll because the dll version is for windows. I think the .so extention is for unix.

          -etnot

          • 2. Re: JBoss 3.2.4 and Apache integration
            carpy1970

            No, the windows version is also named .so

            I don't have apache talking to jboss, but I do have it talking direct to tomcat. Where is yourworkers2.properties file? It needs to be somewhere that apache can pick it up (e.g. in apache's conf directory)

            Aslo have you checked to see if the 404 error is coming from apache and not tomcat?

            • 3. Re: JBoss 3.2.4 and Apache integration

              I have found that everything works (workers2.properties and Apache2/JBoss integration) when using the exact same configuration info but installing Apache on Unix and using mod_jk2.so. This leads me to believe that mod_jk2.dll is faultly and mod_jk2.so does not work for windows. I do know there is nothing wrong with my workers2.properties file and that placing it in the /conf dir is the right location for it. Everything works as specified on Unix (Solaris 8) so I feel that the problem resolution is to find a good mod_jk2.dll file for windows.

              • 4. Re: JBoss 3.2.4 and Apache integration
                carpy1970

                As I said before, the jk2 library for windows is named mod_jk2.so, in fact if you look in the modules director, you will find that the modules that ship with the win binary of apache are all named .so. You obviously need to ensure that when you download mod_jk2.so that you download the win version.