-
1. Re: Two separated cluster how ?
rhusar Feb 24, 2012 12:40 PM (in response to black_dev)So this is AS7 clustering question rather than mod_cluster question I suppose. For clustering, just specify different UDP groups for all nodes in the cluster.
-
2. Re: Two separated cluster how ?
welsh Feb 25, 2012 11:52 AM (in response to rhusar)Hey,
So as Radoslav mentioned, you have 2 issues.
Issue #1: JBoss clusters are all together and need to be seperated:
You should be able to pass the "-g partionOne" to the startup script of cluster 1 and then "-g partitonTwo" to the startup script of cluster 2 to have them seperated. (I know this works for JBoss AS 5.1 and should hopefully work for AS 7.1 or be similiar to it and can test it later to see)
Issue #2: Only allow Apache 1 to see Cluster 1 and only allow Apache 2 to see Cluster 2:
This is also resolvable as Radoslav mentioned, you can specify one UDP group for cluster-1 and one for cluster-2.
- You want to configure the AdvertiseGroup for apache which you can read about here: http://docs.jboss.org/mod_cluster/1.2.0/html/native.config.html#mod_advertise
- You then want to configure the advertiseGroupAddress/Port for JBoss which you can read about here: http://docs.jboss.org/mod_cluster/1.2.0/html/java.properties.html
Your other alternative to this is to set "advertise" to false in JBoss and then configure the "proxyList" to the correct Apache instance you want that JBoss to look at.
Hope that helps.
- Welsh
-
3. Re: Two separated cluster how ?
black_dev Feb 27, 2012 3:55 AM (in response to black_dev)Ok
I setup like this:
cluster-1-apache
<VirtualHost x.x.x.255:80>
<Directory />
Order deny,allow
Allow from all
</Directory>KeepAliveTimeout 60
MaxKeepAliveRequests 0
AdvertiseFrequency 30
AdvertiseGroup 224.0.1.106:23366LBstatusRecalTime 30
<Location /mod_cluster-manager>
SetHandler mod_cluster-managerOrder deny,allow
Deny from all
Allow from all
</Location>ErrorLog logs/cluster-error.log
CustomLog logs/cluster-access.log combined
LogLevel debugEnableMCPMReceive
AllowDisplay on</VirtualHost>
cluster-1-jboss-1
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="ajp" port="8009"/>
<socket-binding name="http" port="8080"/>
<socket-binding name="https" port="8443"/>
<socket-binding name="jgroups-diagnostics" port="0" multicast-address="224.0.75.75" multicast-port="7500"/>
<socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
<socket-binding name="jgroups-tcp" port="7600"/>
<socket-binding name="jgroups-tcp-fd" port="57600"/>
<socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
<socket-binding name="jgroups-udp-fd" port="54200"/>
<socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
<socket-binding name="modcluster" port="0" multicast-address="224.0.1.106" multicast-port="23366"/>
<socket-binding name="osgi-http" interface="management" port="8090"/>
<socket-binding name="remoting" port="4447"/>
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
<remote-destination host="localhost" port="25"/>
</outbound-socket-binding>
</socket-binding-group>cluster-1-jboss-2
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="ajp" port="8009"/>
<socket-binding name="http" port="8080"/>
<socket-binding name="https" port="8443"/>
<socket-binding name="jgroups-diagnostics" port="0" multicast-address="224.0.75.75" multicast-port="7500"/>
<socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
<socket-binding name="jgroups-tcp" port="7600"/>
<socket-binding name="jgroups-tcp-fd" port="57600"/>
<socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
<socket-binding name="jgroups-udp-fd" port="54200"/>
<socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
<socket-binding name="modcluster" port="0" multicast-address="224.0.1.106" multicast-port="23366"/>
<socket-binding name="osgi-http" interface="management" port="8090"/>
<socket-binding name="remoting" port="4447"/>
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
<remote-destination host="localhost" port="25"/>
</outbound-socket-binding>
</socket-binding-group>cluster 2 was in default conf.
<socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
But in cluster 1 i see jboss from cluster2
-
4. Re: Two separated cluster how ?
jfclere Feb 27, 2012 4:42 AM (in response to black_dev)you have 2 different httpd so you should use 2 different secret AdvertiseSecurityKey / advertiseSecurityKey) the nodes of each cluster will see only one httpd, so you have 2 independant clusters.
-
5. Re: Two separated cluster how ?
black_dev Feb 27, 2012 5:41 AM (in response to black_dev)Hi,
I re-setup my httpd. But in this proxy all jboss was re-registered not dedicated.
Now is:
<VirtualHost x.x.x.255:80>
<Directory />
Order deny,allow
Allow from all
</Directory>KeepAliveTimeout 60
MaxKeepAliveRequests 0ServerAdvertise On
AdvertiseFrequency 30
AdvertiseGroupAddress 224.0.1.106
AdvertisePort 23366
AdvertiseSecurityKey cluster-1
AdvertiseBindAddress x.x.x.255EnableMCPMReceive
LBstatusRecalTime 30
<Location /mod_cluster-manager>
SetHandler mod_cluster-managerOrder deny,allow
Deny from all
Allow from all
</Location>ErrorLog logs/cluster-error.log
CustomLog logs/cluster-access.log combined
LogLevel debugAllowDisplay on
</VirtualHost>
but I have some questions:
1) U setup security hey in httpd, but i don't know how to do it in jboss AS 7.1 - could you give me a tip ?
2) What is good syntach for AdvertiseGroup*
like this:
http://docs.jboss.org/mod_cluster/1.2.0/html/native.config.html#mod_advertise
http://docs.jboss.org/mod_cluster/1.2.0/html/java.properties.html
point 9.1
advertiseGroupAddress 224.0.1.105 Apache HTTPD UDP address on which to listen for httpd proxy multicast advertisements
advertisePort 23364 Apache HTTPD UDP port on which to listen for httpd proxy multicast advertisements
Whitch are good for 1.2.0 ?
-
6. Re: Two separated cluster how ?
jfclere Feb 27, 2012 6:06 AM (in response to black_dev)1) advertise-security-key in AS7.
2) one is the httpd directive the other the JBoss property to set, they must fit each other.
-
7. Re: Two separated cluster how ?
black_dev Feb 27, 2012 6:30 AM (in response to black_dev)1) Ok I found but I dont know how to set up from CLI ( meybe by add-value ) ?
2) Ok thanks
3) I setup on httpd security key, and advertisegroup, restart httpd and all jboss re-registered.
Changes was apply _AFTER_ reload a jboss ( one by one ) ( un-registered not allowed machines for this cluster ) this is a bug ?
Restart httpd is not sufficient for this modification in httpd conf to work and automate unregistered/notaccepted not allowed jboss?
-
8. Re: Two separated cluster how ?
jfclere Feb 28, 2012 3:14 AM (in response to black_dev)1) Something like:
/subsystem=modcluster/mod-cluster-config=configuration:write-attribute(name=advertise-security-key, value=secret)
3) you need to restart both jbossweb and httpd.