4 Replies Latest reply on Aug 2, 2013 9:29 AM by g.evraud

    jboss 7 apache problem

    g.evraud

      Hello everybody,

       

      I am trying to setup up a jboss 7 cluster. But before I wanted to test with mod_jk. If it works, I'll go further and try mod_cluster

       

      Here is my config :

      • 2 servers
        • 10.100.52.100 ( jboss + httpd running) 
        • 10.100.52.101 ( jboss only)

       

       

      I would like at first my mod_jk working. I want both server using the apache running on 10.100.52.100 (1st server)

       

      I did the setup in both jboss server

      • 10.100.52.100
        • AJP 1.3 on port 8009
        • JvmRoute : node1
      • 10.100.52.101
        • AJP 1.3 on port 8109
        • JvmRoute : node2

       

      The problem is within my httpd config (I guess). See below :

       

      httpd.conf :

       

      Listen 80

      Listern 443

      include conf/vhost/vhost.conf

      include conf/modules.conf

      include conf/mod_jk.conf

      Include conf.d/*.conf

       

      mod_jk.conf :

       

      JkLogFile logs/mod_jk.log

      JkLogLevel debug

      JkLogStampFormat  "[%a %b %d %H:%M:%S %Y]"

      JkRequestLogFormat "%w %V %T"

      JkShmFile logs/jk.shm

      JkWorkersFile conf/workers/workers.properties

       

      workers.properties :

       

      worker.list=node1,node2,jkstatus

       

      # Define Node1

      worker.node1.port=8009

      worker.node1.host=server1

      worker.node1.type=ajp13

      worker.node1.connection_pool_timeout=600

      worker.node1.socket_keepalive=1

      worker.node1.socket_timeout=60

       

      # Define Node2

      worker.node2.port=8109

      worker.node2.host=server2

      worker.node2.type=ajp13

      worker.node2.connection_pool_timeout=600

      worker.node2.socket_keepalive=1

      worker.node2.socket_timeout=60

       

      worker.jkstatus.type=status

       

      vhost.conf :

       

      NameVirtualHost 10.100.52.100

      <VirtualHost 10.100.52.100>
          ServerName server1
          Otions Indexes +FollowSymLinks
          JkMount /sample/* node1
          JkMount /sample* node1
          JkMount /jkstatus jkstatus  
      </VirtualHost>

       

      NameVirtualHost 10.100.52.101

      <VirtualHost 10.100.52.101>
          ServerName server2
          Options Indexes +FollowSymLinks
          JkMount /sample/* node2
          JkMount /sample* node2
          JkMount /jkstatus jkstatus
      </VirtualHost>

       

      (Jkstatus isn't the right place ?!)

       

      So my problem is that the server1 is working well (as the httpd is on the same machine) but my server2 can't display anything at http://server2/sample  but http://server2:8080/sample . It's normal, tomcat is responding.

       

      I did a netstat on server1 to check if the httpd was listening on server2:80 but nothing is listening.

       

      I added Listen 10.100.52.101:80 but when I restart / graceful the httpd, I receive this error :

       

      Starting httpd: (99)Cannot assign requested address: make_sock: could not bind to address 10.100.52.101:80

      no listening sockets available, shutting down

      Unable to open logs

       

      I tried the Listen 10.100.52.101:10000 but same result... and there is no process running on those ports on the server2.

       

      I searched hours and hours but I didn't find anything.... I have tried to set up the apache on another machine and the result is the same. I think there is something wrong with my vhost config ..

       

      Any idea ?

       

      Thanks

        • 1. Re: jboss 7 apache problem
          rhusar

          That setup is not making sense. HTTPd cannot open port (80) on machine with address 10.100.52.100 at address 10.100.52.101. You need to remove the 2nd virtual host definition. Your loadbalancer will listen at 10.100.52.100 (thats the address your DNS will point to) and loadbalance between 10.100.52.100 and 10.100.52.101.

           

          PS: you dont need to shift ports if you are binding at 2 different addresses -- i.e. 8009 and 8109. Just use the default on all nodes to save yourself some hassle.

          • 2. Re: jboss 7 apache problem
            g.evraud

            Hello,

             

            Yes I knew it....

             

            In fact I added a third server where httpd is running on port 80. So everything coming on port 80 is redirected on server1/2 on port 8080.

             

            So I'll change the AJP port and put 8009 from both jboss.

             

            I just did a config with mod_loadbalancer and it's working well.

             

            Now I have to set up the mod_cluster. I need the libs *.so but when I download the tarball or zip on the site , those libs aren't present in the archive..

             

            Any idea where I can find the *.so files ?

             

            Thx for help

            • 3. Re: jboss 7 apache problem
              rhusar

              /httpd-2.2/modules/*.so downloaded from http://www.jboss.org/mod_cluster/downloads/1-2-0-Final

              • 4. Re: jboss 7 apache problem
                g.evraud

                Thank you.

                I'll come back to you when my config is done