Hi,

You have to provide the correct tcp-ip configuration in each node, so each hazelcast.xml, in order to view the nodes from each other.

Regards
JB

On 04/23/2015 07:22 AM, Noushad Ali wrote:
Hi,
I have been working with apache cellar for the last two days to
experiment how the clustering is done. I followed some points from
http://blog.nanthrax.net/2012/02/apache-karaf-cellar-and-central-management/
to cluster in different instances on one karaf installation. Instances
are created via 'instance:create'. This works well too.. Thanks
Jean-Baptiste

Now my actual requirement is to cluster the karaf on the different
machines. I hardly know the hazelcast and its configurations.
This is the setup that I need to configure.

I have a Physical machine and two VMs , all with ubuntu 12.04 desktop
installations.
These are the Ips and host names

Physical/Vm    |    Host Name    |         IP
-----------------------------------------------
Physical    |    fly-dt249    |    192.168.14.123
Vm            |    ubuntuvm1    |    192.168.14.124
Vm            |    ubuntuvm1    |    192.168.14.125

I have the following hazelccast.xml net configuration, in the host
"fly-dt249" (Physical machine) Dont know how precise it is for the above
configutaion( Please help me to correct this xm if it's wrong).
<network>
         <port auto-increment="true" port-count="100">5701</port>
         <outbound-ports>
             <!--
                 Allowed port range when connecting to other nodes.
                 0 or * means use system provided port.
             -->
             <ports>0</ports>
         </outbound-ports>
         <join>
             <multicast enabled="false">
                 <multicast-group>224.2.2.3</multicast-group>
                 <multicast-port>54327</multicast-port>
             </multicast>
             <tcp-ip enabled="true"><!-- this is where I have doubt-->
                 <hostname>ubuntuvm1</hostname>
                 <hostname>ubuntuvm1</hostname>
                 <interface>127.0.1.1</interface>
                 <interface>192.168.14.123-127<interface>
             </tcp-ip>
             <aws enabled="false">
                 <access-key>my-access-key</access-key>
                 <secret-key>my-secret-key</secret-key>
                 <!--optional, default is us-east-1 -->
                 <region>us-west-1</region>
                 <!--optional, default is ec2.amazonaws.com
<http://ec2.amazonaws.com>. If set, region shouldn't be set as it will
override this property -->
                 <host-header>ec2.amazonaws.com
<http://ec2.amazonaws.com></host-header>
                 <!-- optional, only instances belonging to this group
will be discovered, default will try all running instances -->
                 <security-group-name>hazelcast-sg</security-group-name>
                 <tag-key>type</tag-key>
                 <tag-value>hz-nodes</tag-value>
             </aws>
         </join>
         <interfaces enabled="false">
             <interface>10.10.1.*</interface>
         </interfaces>
         <ssl enabled="false"/>
         <socket-interceptor enabled="false"/>
         <symmetric-encryption enabled="false">
             <!--
                encryption algorithm such as
                DES/ECB/PKCS5Padding,
                PBEWithMD5AndDES,
                AES/CBC/PKCS5Padding,
                Blowfish,
                DESede
             -->
             <algorithm>PBEWithMD5AndDES</algorithm>
             <!-- salt value to use when generating the secret key -->
             <salt>thesalt</salt>
             <!-- pass phrase to use when generating the secret key -->
             <password>thepass</password>
             <!-- iteration count to use when generating the secret key -->
             <iteration-count>19</iteration-count>
         </symmetric-encryption>
     </network>

So while I start Karaf(installed with cellar) in all the machines, and
issue the command, 'cellar:node-list' i get only the following output
   | Id                   | Host Name       | Port
-------------------------------------------------
x | fly-dt249.local:5701 | fly-dt249.local | 5701


Do I need to configure the same on the my Vm karaf's hazelcast.xml
also..?  If so , somebody please help me out as I am almost struck with
this.


Thanks in advance..!
Noushad.



--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to