8 Replies Latest reply on Sep 19, 2008 4:50 AM by wylix

    Apache, mod_jk, jboss

    wylix

      Hi
      I have a proble using apache with jboss. I configured my apache and jboss the same as in http://wiki.jboss.org/wiki/UsingMod_jk1.2WithJBoss.
      This is what i did:
      1. downloaded apache_2.2.9-win32-x86-openssl-0.9.8h-r2.msi from apache http://httpd.apache.org/download.cgi
      2. downloaded mod_jk from http://apache.forall.pl/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.26/mod_jk-1.2.26-httpd-2.2.4.so
      3. downloaded jboss 4.0.2
      4. Installed everything: apache is in C:\Program Files\Apache Software Foundation\Apache2.2, mod_jk renamed to mod_jk.so and copied to modules in apache dir.
      5. added this to httpd.conf

      # Include mod_jk configuration file
      Include conf/mod-jk.conf

      6. create mod-jk.conf with the same content as in http://wiki.jboss.org/wiki/UsingMod_jk1.2WithJBoss
      7. the same with workers.properties (in worker.node1.host and node2 i typed localhost ) and uriworkermap.properties
      8. configured the all server in jboss-4.0.2 by changing jbossweb-tomcat55.sar/server.xml and jbossweb-tomcat55.sar/META-INF/jboss-service.xml

      after restarting jboss and apache i can't connect to http://localhost/web-console I only get:
      File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/web-console
      in error.log and
      127.0.0.1 - - [18/Sep/2008:14:25:02 +0200] "GET /web-console HTTP/1.1" 404 209
      in access.log

      when i add
      JkMount /jmx-console loadbalancer
      JkMount /jmx-console/* loadbalancer

      in mod_jk.log I get
      [info] mod_jk.c (2372): Could not find a worker for worker name=loadbalancer
      and
      "GET /jmx-console/ HTTP/1.1" 500 535
      in access.log
      the same errors I get when i type
      <VirtualHost localhost>
       ServerName localhost
      
       JkMount /jmx-console loadbalancer
       JkMount /jmx-console/* loadbalancer
      </VirtualHost>
      in mod-jk.conf

      appache is working because when I type localhost I get "it works!" site. mod_jk is is working too I think because in mod_jk.log i get
      [info] mod_jk.c (2825): mod_jk/1.2.26 initialized

      The same with jboss to which I can connect typing localhost:8080
      Oh and I run jboss passing --configure=all to use all server and i disabled winXp firewall so this isn't a problem.

      I will be gratefull for any help

        • 1. Re: Apache, mod_jk, jboss
          erasmomarciano

          when you call this url http://localhost/web-console
          not match in your virtualhost

          • 2. Re: Apache, mod_jk, jboss
            wylix

            You are right about this but it doesn't matter if I type localhost/jmx-console or localhost/web-console I get the same errors

            • 3. Re: Apache, mod_jk, jboss
              erasmomarciano

              Jboss started correctly?

              You have Specify the filename of the mod_jk lib in http.conf?
              LoadModule jk_module modules/mod_jk.so

              • 4. Re: Apache, mod_jk, jboss
                wylix

                Jboss is starting without any errors and I have LoadModule jk_module modules/mod_jk.so line added but in mod-jk.conf. I don't know what to do. I tried so many configurations and it doesn't work.

                • 5. Re: Apache, mod_jk, jboss
                  erasmomarciano

                  insert this into your VirtulaHost

                  DocumentRoot /your/path/webb

                  ErrorLog /var/log/apache2/yourwebappr_error.log
                  CustomLog /var/log/apache2/accessyourwebappr.log combined

                  You restart apache and verify and make sure ourwebappr_error.log and accessyourwebappr.log are created

                  • 6. Re: Apache, mod_jk, jboss
                    wylix

                    This is what I typed in mod-jk.conf Virtual host
                    DocumentRoot "C:/jboss-4.0.2Apache/server/all/deploy"
                    ErrorLog logs/yourwebappr_error.log
                    CustomLog logs/accessyourwebappr.log combined

                    The logs didn't create at all but apache have started after creating logs dir on c: . And what about that DocumentRoot ? I just want to run any of jboss apps or servlet through apache for example jmx-console or web-console but can't do it. When it will work I want to write a servlet, deploy it in jboss and connect through apache to it.

                    • 7. Re: Apache, mod_jk, jboss
                      wylix

                      I found out that logs file in apache dir but yourwebappr_error.log is empty and accessyourwebappr.log only have this line:

                      192.168.100.51 - - [18/Sep/2008:15:40:59 +0200] "GET /jmx-console/ HTTP/1.1" 500 535 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16"



                      • 8. Re: Apache, mod_jk, jboss
                        wylix

                        Ok, at last I managed to run it. I installed apache one more time but this time I changed default settings for network domain and server name to "localhost" so I think this was the problem. Thanks everyone for the help.