You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Noushad Ali <no...@gmail.com> on 2015/04/23 07:22:01 UTC
Apache Cellar
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. If set, region
shouldn't be set as it will override this property -->
<host-header>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.
Re: Apache Cellar
Posted by noushadali <no...@gmail.com>.
After a couple of Trial and Errors it worked... The two vms were able to
connect to each other but not to the physical machine...
My Machine is considering its ip as* 192.168.56.1* even though its
*192.168.14.123*
Here's the log.
2015-04-23 16:26:46,410 | INFO | FelixStartLevel | RegionsPersistenceImpl
| 49 - org.apache.karaf.region.persist - 3.0.3 | Loading region digraph
persistence
2015-04-23 16:26:46,569 | INFO | FelixStartLevel | SecurityUtils
| 28 - org.apache.sshd.core - 0.12.0 | BouncyCastle not registered, using
the default JCE provider
2015-04-23 16:26:46,843 | INFO | FelixStartLevel | core
| 58 - org.apache.aries.jmx.core - 1.1.2 | Starting JMX OSGi agent
2015-04-23 16:26:46,854 | INFO | FelixStartLevel | core
| 58 - org.apache.aries.jmx.core - 1.1.2 | Registering MBean with ObjectName
[osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=8f7ddd25-1180-42df-a233-a36c04c2ecc0]
for service with service.id [14]
2015-04-23 16:26:46,856 | INFO | FelixStartLevel | core
| 58 - org.apache.aries.jmx.core - 1.1.2 | Registering
org.osgi.jmx.framework.PackageStateMBean to MBeanServer
com.sun.jmx.mbeanserver.JmxMBeanServer@546a16d4 with name
osgi.core:type=packageState,version=1.5,framework=org.apache.felix.framework,uuid=8f7ddd25-1180-42df-a233-a36c04c2ecc0
2015-04-23 16:26:46,856 | INFO | FelixStartLevel | core
| 58 - org.apache.aries.jmx.core - 1.1.2 | Registering
org.osgi.jmx.framework.BundleStateMBean to MBeanServer
com.sun.jmx.mbeanserver.JmxMBeanServer@546a16d4 with name
osgi.core:type=bundleState,version=1.7,framework=org.apache.felix.framework,uuid=8f7ddd25-1180-42df-a233-a36c04c2ecc0
2015-04-23 16:26:46,857 | INFO | FelixStartLevel | core
| 58 - org.apache.aries.jmx.core - 1.1.2 | Registering
org.osgi.jmx.framework.wiring.BundleWiringStateMBean to MBeanServer
com.sun.jmx.mbeanserver.JmxMBeanServer@546a16d4 with name
osgi.core:type=wiringState,version=1.1,framework=org.apache.felix.framework,uuid=8f7ddd25-1180-42df-a233-a36c04c2ecc0
2015-04-23 16:26:46,857 | INFO | FelixStartLevel | core
| 58 - org.apache.aries.jmx.core - 1.1.2 | Registering
org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer
com.sun.jmx.mbeanserver.JmxMBeanServer@546a16d4 with name
osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=8f7ddd25-1180-42df-a233-a36c04c2ecc0
2015-04-23 16:26:46,857 | INFO | FelixStartLevel | core
| 58 - org.apache.aries.jmx.core - 1.1.2 | Registering
org.osgi.jmx.framework.ServiceStateMBean to MBeanServer
com.sun.jmx.mbeanserver.JmxMBeanServer@546a16d4 with name
osgi.core:type=serviceState,version=1.7,framework=org.apache.felix.framework,uuid=8f7ddd25-1180-42df-a233-a36c04c2ecc0
2015-04-23 16:26:46,858 | INFO | FelixStartLevel | core
| 58 - org.apache.aries.jmx.core - 1.1.2 | Registering
org.osgi.jmx.framework.FrameworkMBean to MBeanServer
com.sun.jmx.mbeanserver.JmxMBeanServer@546a16d4 with name
osgi.core:type=framework,version=1.7,framework=org.apache.felix.framework,uuid=8f7ddd25-1180-42df-a233-a36c04c2ecc0
2015-04-23 16:26:47,092 | INFO | FelixStartLevel | Activator
| 90 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | EventAdmin support
enabled, servlet events will be postet to topics.
2015-04-23 16:26:47,100 | INFO | FelixStartLevel | Activator
| 90 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | LogService support
enabled, log events will be created.
2015-04-23 16:26:47,108 | INFO | FelixStartLevel | Activator
| 90 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Pax Web started
2015-04-23 16:26:47,200 | INFO | pool-6-thread-1 | Server
| 82 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 |
jetty-8.1.15.v20140411
2015-04-23 16:26:47,219 | INFO | pool-6-thread-1 | AbstractConnector
| 82 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 |
Started SelectChannelConnector@0.0.0.0:8181
2015-04-23 16:26:47,219 | INFO | pool-6-thread-1 | JettyServerImpl
| 91 - org.ops4j.pax.web.pax-web-jetty - 3.1.4 | Pax Web available at
[0.0.0.0]:[8181]
2015-04-23 16:26:47,304 | INFO | FelixStartLevel | HttpServiceFactoryImpl
| 90 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Binding bundle:
[org.apache.karaf.webconsole.console [96]] to http service
2015-04-23 16:26:47,359 | INFO | rafOsgiManager]) | HttpServiceFactoryImpl
| 90 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Unbinding bundle:
[org.apache.karaf.webconsole.console [96]]
2015-04-23 16:26:47,361 | INFO | rafOsgiManager]) | HttpServiceFactoryImpl
| 90 - org.ops4j.pax.web.pax-web-runtime - 3.1.4 | Binding bundle:
[org.apache.karaf.webconsole.console [96]] to http service
2015-04-23 16:26:47,607 | INFO | FelixStartLevel | XmlConfigLocator
| 66 - com.hazelcast - 3.3.4 | Loading configuration
/home/noushad/karaf/karaf-3/etc/hazelcast.xml from System property
'hazelcast.config'
2015-04-23 16:26:47,607 | INFO | FelixStartLevel | XmlConfigLocator
| 66 - com.hazelcast - 3.3.4 | Using configuration file at
/home/noushad/karaf/karaf-3/etc/hazelcast.xml
2015-04-23 16:26:47,737 | INFO | FelixStartLevel | DefaultAddressPicker
| 66 - com.hazelcast - 3.3.4 | [LOCAL] [cellar] [3.3.4] Prefer IPv4 stack is
true.
2015-04-23 16:26:47,740 | INFO | FelixStartLevel | DefaultAddressPicker
| 66 - com.hazelcast - 3.3.4 | [LOCAL] [cellar] [3.3.4] Picked
Address[192.168.56.1]:5701, using socket
ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true
2015-04-23 16:26:47,757 | INFO | FelixStartLevel | BasicOperationScheduler
| 66 - com.hazelcast - 3.3.4 | [192.168.56.1]:5701 [cellar] [3.3.4] Starting
with 16 generic operation threads and 16 partition operation threads.
2015-04-23 16:26:47,800 | INFO | FelixStartLevel | system
| 66 - com.hazelcast - 3.3.4 | [192.168.56.1]:5701 [cellar] [3.3.4]
Hazelcast 3.3.4 (20150114 - eec3586) starting at Address[192.168.56.1]:5701
2015-04-23 16:26:47,801 | INFO | FelixStartLevel | system
| 66 - com.hazelcast - 3.3.4 | [192.168.56.1]:5701 [cellar] [3.3.4]
Copyright (C) 2008-2014 Hazelcast.com
2015-04-23 16:26:47,804 | INFO | FelixStartLevel | Node
| 66 - com.hazelcast - 3.3.4 | [192.168.56.1]:5701 [cellar] [3.3.4] Creating
MulticastJoiner
2015-04-23 16:26:47,806 | INFO | FelixStartLevel | LifecycleService
| 66 - com.hazelcast - 3.3.4 | [192.168.56.1]:5701 [cellar] [3.3.4]
Address[192.168.56.1]:5701 is STARTING
2015-04-23 16:26:49,953 | INFO | FelixStartLevel | MulticastJoiner
| 66 - com.hazelcast - 3.3.4 | [192.168.56.1]:5701 [cellar] [3.3.4]
Members [1] {
Member [192.168.56.1]:5701 this
}
2015-04-23 16:26:49,969 | INFO | FelixStartLevel | LifecycleService
| 66 - com.hazelcast - 3.3.4 | [192.168.56.1]:5701 [cellar] [3.3.4]
Address[192.168.56.1]:5701 is STARTED
2015-04-23 16:26:50,002 | INFO | FelixStartLevel |
InternalPartitionService | 66 - com.hazelcast - 3.3.4 |
[192.168.56.1]:5701 [cellar] [3.3.4] Initializing cluster partition table
first arrangement...
--
View this message in context: http://karaf.922171.n3.nabble.com/Apache-Cellar-tp4039908p4039930.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Apache Cellar
Posted by noushadali <no...@gmail.com>.
Thanks Baptiste For your Quick reply.
for the below set up, what is the correct tcp/ip configuraion...?
Physical/Vm | Host Name | IP
---------------------------------------------------------------------
Physical | fly-dt249 | 192.168.14.123
Vm | ubuntuvm1 | 192.168.14.124
Vm | ubuntuvm1 | 192.168.14.125
<tcp-ip enabled="true">
<hostname>ubuntuvm1</hostname>
<hostname>ubuntuvm1</hostname>
<interface>127.0.1.1</interface>
<interface>192.168.14.123-127<interface>
</tcp-ip>
if possible could you provide me the correct TCP/IP Configuration.
Thanks,
Noushad
--
View this message in context: http://karaf.922171.n3.nabble.com/Apache-Cellar-tp4039908p4039914.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Apache Cellar
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
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é
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com