1

I have a jboss setup with 2 jboss instances on one VM. Each of the 2 jboss talk to 2 apaches on same VM.


Apache 1 apache listen port is 82

<VirtualHost 192.168.1.2:6262>

    <Directory />
        Order deny,allow
        Allow from all
    </Directory>

  KeepAliveTimeout 60
  MaxKeepAliveRequests 0

  ManagerBalancerName box1_cluster
  ServerAdvertise Off
# AdvertiseFrequency 5
  EnableMCPMReceive On

  <Location /mod_cluster-manager>
    SetHandler mod_cluster-manager
    Order deny,allow
    Allow from all
  </Location>
</VirtualHost>

jboss 1

        <subsystem xmlns="urn:jboss:domain:modcluster:1.1">
          <mod-cluster-config advertise-socket="modcluster" connector="ajp" proxy-list="192.168.1.2:6262" balancer="box1_cluster">
            <dynamic-load-provider>
              <load-metric type="busyness"/>
            </dynamic-load-provider>
          </mod-cluster-config>
        </subsystem>

  <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">


        <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
        <outbound-socket-binding name="mail-smtp">
            <remote-destination host="localhost" port="25"/>
        </outbound-socket-binding>
    </socket-binding-group>

Apache 2,listen port is 83

<VirtualHost 192.168.1.2:6263>

    <Directory />
        Order deny,allow
        Allow from all
    </Directory>

  KeepAliveTimeout 60
  MaxKeepAliveRequests 0

  ManagerBalancerName box2_cluster
  ServerAdvertise Off
# AdvertiseFrequency 5
  EnableMCPMReceive On

  <Location /mod_cluster-manager>
    SetHandler mod_cluster-manager
    Order deny,allow
    Allow from all
  </Location>

</VirtualHost>

jboss 2

     <subsystem xmlns="urn:jboss:domain:modcluster:1.1">
          <mod-cluster-config advertise-socket="modcluster" connector="ajp" proxy-list="192.168.1.2:6263" balancer="box2_cluster">
            <dynamic-load-provider>
              <load-metric type="busyness"/>
            </dynamic-load-provider>
          </mod-cluster-config>
        </subsystem>

  <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

        <socket-binding name="txn-status-manager" port="4713"/>
        <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
        <outbound-socket-binding name="mail-smtp">
            <remote-destination host="localhost" port="25"/>
        </outbound-socket-binding>
    </socket-binding-group>

The apache works well and connect to jboss .The apache also detects all deployed apps.


Questions:-

When the

192.168.1.2:6262/mod_cluster-manager is done it shows the applications deployed on the 2nd jboss. I want to make sure that the apache 1 detects application that are deployed in jboss 1 and no other applications. Basically i want to use mod_cluster but dont want one jboss to talk to another.I want to use mod_cluster for jboss to autopublish applications to apache.But i dont want 2 jboss to talk to each other.

Charles
  • 50,943
  • 13
  • 104
  • 142
user2758406
  • 536
  • 7
  • 16
  • Are you starting the two instances in a cluster and does your app have `distributable` tag set in the deployment descriptor? Otherwise clustering service by default is started lazily, so you should not see two jboss instances cross-talking in the default behavior of JBoss. Sounds like you want to do load balancing but no jboss clustering. – CoolBeans Sep 08 '13 at 17:16
  • First of all, you incorrectly tagged this as [tag:cluster-analysis] (a data mining technique, known as clustering). Secondly, this is off-topic, and should be migrated to serverfault, as this obviously is a server administration, not a software development question. – Has QUIT--Anony-Mousse Sep 08 '13 at 19:01
  • hello CoolBeans, The 2 jboss instances hold different applications.The applications in both instnaces are different are not to be clustered.The purpose of using mod_cluster is to autodetect the applications by apache.But at present both apaches detect applications on both jboss individually.One apache should only detect its own jboss applications . How can this be acheieved? – user2758406 Sep 08 '13 at 19:30
  • @CoolBeans Hello Coolbeans ,Could you please check if there is a solution to the problem that i have reported. – user2758406 Sep 11 '13 at 19:04

1 Answers1

1

If you do not want two JBoss instances cross talk (since they are not in the same cluster) then you should have the 2 nodes listen on unique multicast addresses.

By the way, if you do not use clustering you are losing the ability of session replication and high availability.

CoolBeans
  • 20,654
  • 10
  • 86
  • 101
  • ' " multicast-port="23364"/> ' There are 2 jboss nodes and both have the multicast address of 224.0.1.105 .So changing this address will solve? – user2758406 Sep 11 '13 at 22:16
  • If i add different multicast IPs for both the jboss nodes that will solve the problem? – user2758406 Sep 11 '13 at 22:17
  • Yes that's what I said, different multicast address. When you start up JBoss you can pass the multicast address like this - `-u x.x.x.x`. – CoolBeans Sep 11 '13 at 22:19
  • @user2758406 - did the unique multicast address help solve your problem? – CoolBeans Sep 13 '13 at 02:12
  • Hello Coolbeans..No multicast address change did not .I changed port and IP both in the jboss (say name is A).There are 2 more apaches (say name C,D) in my box.Those 2 apaches (C,D) kept on showing the jboss instance even after I had changed the multicastIP/port to different value and restarted the jboss (A).The other 2 apaches (C,D) should have stopped showing the Jboss A when A was restarted after multicast IP change.I was using http://IP:6262/mod_cluster-manager – user2758406 Sep 16 '13 at 20:32