-
1. Re: JBoss AS 7 Clustering and httpd virtualhost
hfluz Jun 21, 2012 1:51 PM (in response to hfluz)I guess that's a simple configuration question, could somebody help me?
If my message is not clear enough (english is not my native language) I can try to explain better.
-
2. Re: JBoss AS 7 Clustering and httpd virtualhost
kazaag Jun 21, 2012 4:11 PM (in response to hfluz)1 of 1 people found this helpfulIn the virtual host you should put the IP of the proxy (the httpd node).
But you need to put the network of the JBoss's node in the allow from as the JBoss nodes need to connect to this virtual host to register them self.
If multicasting is routed between your httpd node to JBoss node (in your configuration if you didn't make it avalble it is probably not working) default configuration will work.
The other option is to provide the proxy list in the JBoss mod cluster configuration.
-
3. Re: JBoss AS 7 Clustering and httpd virtualhost
hfluz Jun 25, 2012 4:16 PM (in response to kazaag)I tried with 2 hosts but I got some errors. Now I'm trying to configure both (JBoss AS 7 in domain mode and httpd) in the same host.
My OS is Ubuntu (IP 189.90.70.58) and I configured mod_cluster this way (https://gist.github.com/1543449):
mod_cluster.load
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so LoadModule proxy_ajp_module /usr/lib/apache2/modules/mod_proxy_ajp.so LoadModule slotmem_module /usr/lib/apache2/modules/mod_slotmem.so LoadModule manager_module /usr/lib/apache2/modules/mod_manager.so LoadModule proxy_cluster_module /usr/lib/apache2/modules/mod_proxy_cluster.so LoadModule advertise_module /usr/lib/apache2/modules/mod_advertise.so
mod_cluster.conf
CreateBalancers 1 <IfModule manager_module> Listen 189.90.70.58:6666 ManagerBalancerName mycluster <VirtualHost 189.90.70.58:6666> KeepAliveTimeout 300 MaxKeepAliveRequests 0 AdvertiseFrequency 5 ServerAdvertise On <Location /> Order deny,allow Allow from 189.90.70 </Location> </VirtualHost> </IfModule>
Then I added a location recommended by AS Cluster Howto (https://docs.jboss.org/author/display/AS71/AS7+Cluster+Howto):
<Location /mod_cluster-manager> SetHandler mod_cluster-manager Order deny,allow Deny from all Allow from 189.90.70. </Location>
Then I enabled mod_cluster:
a2enmod mod_cluster
Then I reloaded and restarted apache:
service apache2 reload service apache2 restart
I got no errors until here. But when I try to access 189.90.70.58/my-app-name or 189.90.70.58:6666/mod_cluster_manager my web browser cannot find anything. Why is that happening? I missed some step?
-
4. Re: JBoss AS 7 Clustering and httpd virtualhost
hfluz Jun 26, 2012 7:51 AM (in response to hfluz)An update:
I found the missing step. I forgot to create de symbolic link for mod_cluster log:
#ln -s /var/log/apache2 /etc/apache2/logs
Now I'm able to acess mod_cluster_manager page, but JBoss AS is not registered there. What could be the problem?
-
5. Re: JBoss AS 7 Clustering and httpd virtualhost
hfluz Jun 26, 2012 8:35 AM (in response to hfluz)I added "AllowDispay on" in mod_cluster configuration. Now when I acess 189.90.70.58:8888/mod_cluster-manager the following info is displayed:
mod_cluster/1.1.x start of "httpd.conf" configuration mod_proxy_cluster.c: OK mod_sharedmem.c: OK Protocol supported: http AJP mod_advertise.c: OK Server: localhost Server: localhost VirtualHost: *:80 Server: u217.ati.uel.br VirtualHost: 189.90.70.58:8888 Advertising on Group 224.0.1.105 Port 23364 for http://189.90.70.58:8888 every 5 seconds end of "httpd.conf" configuration
It seems to me that JBoss AS 7 is not responding, but mod_cluster socket-binding is using the same adress and port:
<socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
-
6. Re: JBoss AS 7 Clustering and httpd virtualhost
rmody Jun 26, 2012 8:36 AM (in response to hfluz)Hi Humberto,
Can you try adding the "proxy-list" having your Apache server ip-address in the "mod-cluster-config" of your domain.xml file, something like below
<subsystem xmlns="urn:jboss:domain:modcluster:1.1"> <mod-cluster-config advertise-socket="modcluster" connector="ajp" proxy-list="10.211.55.7:10001">
-
7. Re: JBoss AS 7 Clustering and httpd virtualhost
hfluz Jun 26, 2012 8:56 AM (in response to rmody)Ravish, I included proxy-list in mod-cluster-config:
<subsystem xmlns="urn:jboss:domain:modcluster:1.0"> <mod-cluster-config advertise-socket="modcluster" proxy-list="189.90.70.58:8888"> <dynamic-load-provider> <load-metric type="busyness"/> </dynamic-load-provider> </mod-cluster-config> </subsystem>
But with the same results, JBoss AS is not connecting to httpd through mod_cluster.
P.s. I tried to add connector="ajp", but JBoss didn't accepted it.
-
8. Re: JBoss AS 7 Clustering and httpd virtualhost
hfluz Jun 26, 2012 9:23 AM (in response to hfluz)Using the Advertize.java mod_cluster tool:
java Advertize 224.0.1.105 23364 received from /189.90.70.58:23364 received: HTTP/1.0 200 OK Date: Tue, 26 Jun 2012 13:14:45 GMT Sequence: 558 Digest: 51f06c58078c63239f5df067731b0c35 Server: f8cf3eb0-0cfc-44a2-8d79-d43d190dbad4 X-Manager-Address: 189.90.70.58:8888 X-Manager-Url: /f8cf3eb0-0cfc-44a2-8d79-d43d190dbad4 X-Manager-Protocol: http X-Manager-Host: u217.ati.uel.br
Nothing appears in the mod_cluster-manager page, but I don't know if something should be displayed in this case.
-
9. Re: JBoss AS 7 Clustering and httpd virtualhost
rmody Jun 26, 2012 9:25 AM (in response to hfluz)It seems that you have added IP-Address of JBoss server in proxy-list instead of your httpd server as per your problem description
Listen 10.211.55.7:10001 MemManagerFile /var/cache/httpd <VirtualHost 10.211.55.7:10001> <Directory /> Order deny,allow Deny from all Allow from 10.211.55. </Directory>
Hence can you try correcting it and see if that helps you.
-
10. Re: JBoss AS 7 Clustering and httpd virtualhost
hfluz Jun 26, 2012 9:33 AM (in response to rmody)Sorry, actually that was the configuration when I was using 2 hosts, now both JBoss AS and httpd are on the same host (189.90.70.58):
My updated mod_cluster.conf
CreateBalancers 1 <IfModule manager_module> Listen 189.90.70.58:8888 ManagerBalancerName mycluster <VirtualHost 189.90.70.58:8888> KeepAliveTimeout 300 MaxKeepAliveRequests 0 AdvertiseFrequency 5 ServerAdvertise On AdvertiseGroup 224.0.1.105:23364 AllowDisplay On <Location /> Order deny,allow Allow from all </Location> <Location /mod_cluster-manager> SetHandler mod_cluster-manager Order deny,allow Allow from all </Location> </VirtualHost> </IfModule>
-
11. Re: JBoss AS 7 Clustering and httpd virtualhost
hfluz Jun 26, 2012 9:48 AM (in response to hfluz)Comparing to JBoss AS 7 Configuration, Deployment and Administration book, using the cli :list-proxies command I should obtain the following result:
[standalone@localhost:9999 subsystem=modcluster] :list-proxies { "outcome" => "success", "result" => [ "CP11-010:8888", "CP12-010:8888" }
But instead of that I'm obtaining:
[domain@189.90.70.58:9999 /] :list-proxies { "outcome" => "failed", "failure-description" => "JBAS010850: No handler for operation list-proxies at address []", "rolled-back" => true }
-
12. Re: JBoss AS 7 Clustering and httpd virtualhost
hfluz Jun 26, 2012 10:37 AM (in response to hfluz)It looks like I need to access the mod_cluster subsystem to execute the command :list-proxies. I tried "cd subsystem=modcluster", executed the command again, but I got the same output.
-
13. Re: JBoss AS 7 Clustering and httpd virtualhost
kazaag Jun 26, 2012 1:01 PM (in response to hfluz)Can you provide the modcluster related line from JBoss logs?
-
14. Re: JBoss AS 7 Clustering and httpd virtualhost
chandrashekar.bn Jun 27, 2012 1:15 AM (in response to hfluz)Humberto, did you change configuration in {JBOSS_HOME}/domain/configuration/host.xml
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1
189.90.70.58
}"/></interface>
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1
189.90.70.58
}"/></interface>
</interfaces>