You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Chandan <ch...@in.bosch.com> on 2016/08/16 04:18:17 UTC

Cellar Clustering in karaf

Hello ,

I need to form a cluster of 2 nodes (basically 2 systems talking to each
other)
In one machine/node, i have installed cellar and i am following below
documentation

Cellar Documentation 3.0.3
<https://karaf.apache.org/manual/cellar/latest-3/#_registering_cellar_features>  

I have configured hazlecast.xml to listen to another machine ip (by enabling
tcp/ip to true)
Should i follow the same steps in another machine to listen to first machine
?

One way of configuration is enough ?
Please let me know i am blank here.




--
View this message in context: http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Chandan <ch...@in.bosch.com>.
I haven't done any changes in map section.
I only did

multi cast to false
<hz:multicast enabled="false">

tcp/ip to true and added a new interface
<hz:tcp-ip enabled="true">
                <hz:interface>10.165.20.27</hz:interface>
				<hz:interface>10.165.20.45</hz:interface>
            </hz:tcp-ip>

as well as interfaces to 10.165.20.*
 <hz:interfaces enabled="true">
            <hz:interface>10.165.20.*</hz:interface>
        </hz:interfaces>

Only this much.
Anything missing ??



--
View this message in context: http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047560.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
What about map sections in hazelcast XML ?



On Aug 16, 2016, 16:07, at 16:07, Chandan <ch...@in.bosch.com> wrote:
>Hello,
>
>Karaf version - 4.0.5
>cellar version - 4.0.0
>i tried with latest cellar as well by doing feature:repo-add cellar
>followed
>by feature:install cellar
>
>hazlecast.xml file is in etc folder
>
>Configuration looks like below
>
><hz:network>
>        <hz:port auto-increment="true" port-count="100">5701</hz:port>
>        <hz:outbound-ports>
>            
>            <hz:ports>0</hz:ports>
>        </hz:outbound-ports>
>        <hz:join>
>            <hz:multicast enabled="false">
>                <hz:multicast-group>224.2.2.3</hz:multicast-group>
>                <hz:multicast-port>54327</hz:multicast-port>
>            </hz:multicast>
>            <hz:tcp-ip enabled="true">
>                <hz:interface>10.165.20.27</hz:interface>
>				<hz:interface>10.165.20.45</hz:interface>
>            </hz:tcp-ip>
>            <hz:aws enabled="false">
>                <hz:access-key>my-access-key</hz:access-key>
>                <hz:secret-key>my-secret-key</hz:secret-key>
>                
>                <hz:region>us-west-1</hz:region>
>                
>                <hz:host-header>ec2.amazonaws.com</hz:host-header>
>                
>               
><hz:security-group-name>hazelcast-sg</hz:security-group-name>
>                <hz:tag-key>type</hz:tag-key>
>                <hz:tag-value>hz-nodes</hz:tag-value>
>            </hz:aws>
>        </hz:join>
>        <hz:interfaces enabled="true">
>            <hz:interface>10.165.20.*</hz:interface>
>        </hz:interfaces>
>        <hz:ssl enabled="false"/>
>        <hz:socket-interceptor enabled="false"/>
>        <hz:symmetric-encryption enabled="false">
>            
>            <hz:algorithm>PBEWithMD5AndDES</hz:algorithm>
>            
>            <hz:salt>thesalt</hz:salt>
>            
>            <hz:password>thepass</hz:password>
>            
>            <hz:iteration-count>19</hz:iteration-count>
>        </hz:symmetric-encryption>
>    </hz:network>
>
>
>
>--
>View this message in context:
>http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047557.html
>Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Chandan <ch...@in.bosch.com>.
Hello,

Karaf version - 4.0.5
cellar version - 4.0.0
i tried with latest cellar as well by doing feature:repo-add cellar followed
by feature:install cellar

hazlecast.xml file is in etc folder

Configuration looks like below

<hz:network>
        <hz:port auto-increment="true" port-count="100">5701</hz:port>
        <hz:outbound-ports>
            
            <hz:ports>0</hz:ports>
        </hz:outbound-ports>
        <hz:join>
            <hz:multicast enabled="false">
                <hz:multicast-group>224.2.2.3</hz:multicast-group>
                <hz:multicast-port>54327</hz:multicast-port>
            </hz:multicast>
            <hz:tcp-ip enabled="true">
                <hz:interface>10.165.20.27</hz:interface>
				<hz:interface>10.165.20.45</hz:interface>
            </hz:tcp-ip>
            <hz:aws enabled="false">
                <hz:access-key>my-access-key</hz:access-key>
                <hz:secret-key>my-secret-key</hz:secret-key>
                
                <hz:region>us-west-1</hz:region>
                
                <hz:host-header>ec2.amazonaws.com</hz:host-header>
                
               
<hz:security-group-name>hazelcast-sg</hz:security-group-name>
                <hz:tag-key>type</hz:tag-key>
                <hz:tag-value>hz-nodes</hz:tag-value>
            </hz:aws>
        </hz:join>
        <hz:interfaces enabled="true">
            <hz:interface>10.165.20.*</hz:interface>
        </hz:interfaces>
        <hz:ssl enabled="false"/>
        <hz:socket-interceptor enabled="false"/>
        <hz:symmetric-encryption enabled="false">
            
            <hz:algorithm>PBEWithMD5AndDES</hz:algorithm>
            
            <hz:salt>thesalt</hz:salt>
            
            <hz:password>thepass</hz:password>
            
            <hz:iteration-count>19</hz:iteration-count>
        </hz:symmetric-encryption>
    </hz:network>



--
View this message in context: http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047557.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
What's your karaf version, cellar version and hazel cast.xml file ? I think you don't use the hazelcast XML provided with cellar.

Regards
JB



On Aug 16, 2016, 10:33, at 10:33, Chandan <ch...@in.bosch.com> wrote:
>Hello,
>
>I have encountered below exception. All my proxy servlet are failed not
>showing it as deployed
>
>208 | CellarBalancerProxyServlet | ServletModel-13            | *Failed
>    
>*| /features           | [/features/*]
>208 | CellarBalancerProxyServlet | ServletModel-14            | *Failed
>    
>*| /gogo               | [/gogo/*]
>208 | CellarBalancerProxyServlet | ServletModel-15            | *Failed
>    
>*| /instance           | [/instance/*]
>208 | CellarBalancerProxyServlet | ServletModel-16            | *Failed
>    
>*| /cxf                | [/cxf/*]
>208 | CellarBalancerProxyServlet | ServletModel-17            | *Failed
>    
>*| /system/console     | [/system/console/*]
>
>Console:
>I am seeing 
>
>Exception in thread "hz.cellar.IO.thread-in-2"
>java.lang.IllegalThreadStateException: hz.cellar.IO.thread-in-2 cannot
>make
>remote call:
>com.hazelcast.map.impl.operation.PutOperation{identityHash=1269781987,
>serviceName='hz:impl:mapService'
>at
>com.hazelcast.spi.impl.operationservice.impl.Invocation.invokeInternal(Invocation.java:208)
>at
>com.hazelcast.spi.impl.operationservice.impl.Invocation.invoke(Invocation.java:180)
>at
>com.hazelcast.spi.impl.operationservice.impl.InvocationBuilderImpl.invoke(InvocationBuilderImpl.java:46)
>at
>com.hazelcast.map.impl.proxy.MapProxySupport.invokeOperation(MapProxySupport.java:316)
>at
>com.hazelcast.map.impl.proxy.MapProxySupport.putInternal(MapProxySupport.java:290)
>at com.hazelcast.map.impl.proxy.MapProxyImpl.put(MapProxyImpl.java:109)
>at com.hazelcast.map.impl.proxy.MapProxyImpl.put(MapProxyImpl.java:99)
>at
>org.apache.karaf.cellar.log.LogAppender.doAppend(LogAppender.java:55)
>at
>org.ops4j.pax.logging.service.internal.PaxAppenderProxy.doAppend(PaxAppenderProxy.java:63)
>at
>org.ops4j.pax.logging.service.internal.AppenderBridgeImpl.append(AppenderBridgeImpl.java:67)
>at
>org.ops4j.pax.logging.service.internal.AppenderBridgeImpl.doAppend(AppenderBridgeImpl.java:61)
>at
>org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:59)
>at org.apache.log4j.Category.callAppenders(Category.java:179)
>at org.apache.log4j.Category.forcedLog(Category.java:333)
>at org.apache.log4j.Category.log(Category.java:724)
>at
>org.ops4j.pax.logging.service.internal.PaxLoggerImpl.log(PaxLoggerImpl.java:335)
>at
>org.ops4j.pax.logging.service.internal.JdkHandler.publish(JdkHandler.java:114)
>at java.util.logging.Logger.log(Logger.java:738)
>at
>com.hazelcast.logging.StandardLoggerFactory$StandardLogger.log(StandardLoggerFactory.java:49)
>at
>com.hazelcast.logging.LoggingServiceImpl$DefaultLogger.log(LoggingServiceImpl.java:167)
>at com.hazelcast.logging.AbstractLogger.warning(AbstractLogger.java:90)
>
>
>What could be the issue?
>
>Regards,
>Chandan
>
>
>
>
>--
>View this message in context:
>http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047550.html
>Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Chandan <ch...@in.bosch.com>.
I followed the cellar documentation in apache which explains the http
balancer.
Apart from it, is there any other blog which i need to refer ?

https://karaf.apache.org/manual/cellar/latest-4/#_enable_http_balancer




--
View this message in context: http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047562.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Did you take a look on my blog explaining the steps ?

Anyway I will take a look asap.

Regards
JB



On Aug 16, 2016, 16:12, at 16:12, Chandan <ch...@in.bosch.com> wrote:
>I followed the steps mentioned here 
>
>https://karaf.apache.org/manual/cellar/latest-4/#_enable_http_balancer
><https://karaf.apache.org/manual/cellar/latest-4/#_enable_http_balancer>
> 
>
>In both the machines i installed cellar and did the tcp/ip
>configuration by
>adding IP of both machines.
>they got interconnected.
>
>In first machine,
>karaf@node1()> feature:install http
>karaf@node1()> feature:install http-whiteboard
>karaf@node1()> feature:repo-add cellar 4.0.0
>karaf@node1()> feature:install cellar
>karaf@node1()> cluster:feature-install default cellar-http-balancer
>karaf@node1()> feature:install webconsole
> karaf@node1()>http:list
>karaf@node1()> cluster:http-list default
>
>In second machine
>
>karaf@node2()> feature:install http
>karaf@node2()> feature:install http-whiteboard
>karaf@node2()> feature:repo-add cellar 4.0.0
>karaf@node2()> feature:install cellar
>karaf@node2()> cluster:http-list default
>karaf@node2()> http:list
>
>After this in both node1 and node 2
>
>100 | CellarBalancerProxyServlet | ServletModel-3 | Failed| /gogo      
>       
>| [/gogo/*]
>100 | CellarBalancerProxyServlet | ServletModel-2 | Failed|
>/system/console/res | [/system/console/res/*]
>100 | CellarBalancerProxyServlet | ServletModel-6 | Failed| /features  
>       
>| [/features/*]
>100 | CellarBalancerProxyServlet | ServletModel-5 | Failed|
>/system/console    
>| [/system/console/*]
>100 | CellarBalancerProxyServlet | ServletModel-4 | Failed| /instance  
>       
>| [/instance/*]
>
>
>
>
>--
>View this message in context:
>http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047559.html
>Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Chandan <ch...@in.bosch.com>.
I followed the steps mentioned here 

https://karaf.apache.org/manual/cellar/latest-4/#_enable_http_balancer
<https://karaf.apache.org/manual/cellar/latest-4/#_enable_http_balancer>  

In both the machines i installed cellar and did the tcp/ip configuration by
adding IP of both machines.
they got interconnected.

In first machine,
karaf@node1()> feature:install http
karaf@node1()> feature:install http-whiteboard
karaf@node1()> feature:repo-add cellar 4.0.0
karaf@node1()> feature:install cellar
karaf@node1()> cluster:feature-install default cellar-http-balancer
karaf@node1()> feature:install webconsole
 karaf@node1()>http:list
karaf@node1()> cluster:http-list default

In second machine

karaf@node2()> feature:install http
karaf@node2()> feature:install http-whiteboard
karaf@node2()> feature:repo-add cellar 4.0.0
karaf@node2()> feature:install cellar
karaf@node2()> cluster:http-list default
karaf@node2()> http:list

After this in both node1 and node 2

100 | CellarBalancerProxyServlet | ServletModel-3 | Failed| /gogo              
| [/gogo/*]
100 | CellarBalancerProxyServlet | ServletModel-2 | Failed|
/system/console/res | [/system/console/res/*]
100 | CellarBalancerProxyServlet | ServletModel-6 | Failed| /features          
| [/features/*]
100 | CellarBalancerProxyServlet | ServletModel-5 | Failed| /system/console    
| [/system/console/*]
100 | CellarBalancerProxyServlet | ServletModel-4 | Failed| /instance          
| [/instance/*]




--
View this message in context: http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047559.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
How did you install ? And what's the versions ?



On Aug 16, 2016, 11:55, at 11:55, Chandan <ch...@in.bosch.com> wrote:
>Also, Package is not able to share between the 2 nodes
>
>java.util.concurrent.ExecutionException:
>com.hazelcast.spi.exception.RetryableIOException: *Packet not send to
>->
>Address[10.165.20.45]:5701
>	at
>*com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.resolveApplicationResponseOrThrowException(InvocationFuture.java:360)[196:com.hazelcast:3.6.4]
>	at
>com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.get(InvocationFuture.java:225)[196:com.hazelcast:3.6.4]
>	at
>com.hazelcast.spi.impl.operationservice.impl.IsStillRunningService.isOperationExecuting(IsStillRunningService.java:85)[196:com.hazelcast:3.6.4]
>	at
>com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.waitForResponse(InvocationFuture.java:275)[196:com.hazelcast:3.6.4]
>	at
>com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.get(InvocationFuture.java:224)[196:com.hazelcast:3.6.4]
>	at
>com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.get(InvocationFuture.java:204)[196:com.hazelcast:3.6.4]
>	at
>com.hazelcast.map.impl.proxy.MapProxySupport.invokeOperation(MapProxySupport.java:320)[196:com.hazelcast:3.6.4]
>	at
>com.hazelcast.map.impl.proxy.MapProxySupport.putInternal(MapProxySupport.java:290)[196:com.hazelcast:3.6.4]
>	at
>com.hazelcast.map.impl.proxy.MapProxyImpl.put(MapProxyImpl.java:109)[196:com.hazelcast:3.6.4]
>	at
>com.hazelcast.map.impl.proxy.MapProxyImpl.put(MapProxyImpl.java:99)[196:com.hazelcast:3.6.4]
>
>
>
>--
>View this message in context:
>http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047553.html
>Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Chandan <ch...@in.bosch.com>.
Also, Package is not able to share between the 2 nodes

java.util.concurrent.ExecutionException:
com.hazelcast.spi.exception.RetryableIOException: *Packet not send to ->
Address[10.165.20.45]:5701
	at
*com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.resolveApplicationResponseOrThrowException(InvocationFuture.java:360)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.get(InvocationFuture.java:225)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.spi.impl.operationservice.impl.IsStillRunningService.isOperationExecuting(IsStillRunningService.java:85)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.waitForResponse(InvocationFuture.java:275)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.get(InvocationFuture.java:224)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.get(InvocationFuture.java:204)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.map.impl.proxy.MapProxySupport.invokeOperation(MapProxySupport.java:320)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.map.impl.proxy.MapProxySupport.putInternal(MapProxySupport.java:290)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.map.impl.proxy.MapProxyImpl.put(MapProxyImpl.java:109)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.map.impl.proxy.MapProxyImpl.put(MapProxyImpl.java:99)[196:com.hazelcast:3.6.4]



--
View this message in context: http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047553.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Chandan <ch...@in.bosch.com>.
I am encountering different kinds of exception in windows

hz.cellar.IO.thread-in-0
java.lang.IllegalThreadStateException: hz.cellar.IO.thread-in-0 cannot make
remote call:
com.hazelcast.map.impl.operation.PutOperation{identityHash=606065284,
serviceName='hz:impl:mapService', partitionId=101, replicaIndex=0, callId=0,
invocationTime=-1 (Thu Jan 01 05:29:59 IST 1970), waitTimeout=-1,
callTimeout=60000, name=org.apache.karaf.cellar.log,
name=org.apache.karaf.cellar.log}
	at
com.hazelcast.spi.impl.operationservice.impl.Invocation.invokeInternal(Invocation.java:208)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.spi.impl.operationservice.impl.Invocation.invoke(Invocation.java:180)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.spi.impl.operationservice.impl.InvocationBuilderImpl.invoke(InvocationBuilderImpl.java:46)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.map.impl.proxy.MapProxySupport.invokeOperation(MapProxySupport.java:316)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.map.impl.proxy.MapProxySupport.putInternal(MapProxySupport.java:290)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.map.impl.proxy.MapProxyImpl.put(MapProxyImpl.java:109)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.map.impl.proxy.MapProxyImpl.put(MapProxyImpl.java:99)[196:com.hazelcast:3.6.4]
	at
org.apache.karaf.cellar.log.LogAppender.doAppend(LogAppender.java:55)[231:org.apache.karaf.cellar.log:4.0.1]
	at
org.ops4j.pax.logging.service.internal.PaxAppenderProxy.doAppend(PaxAppenderProxy.java:63)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5]
	at
org.ops4j.pax.logging.service.internal.AppenderBridgeImpl.append(AppenderBridgeImpl.java:67)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5]
	at
org.ops4j.pax.logging.service.internal.AppenderBridgeImpl.doAppend(AppenderBridgeImpl.java:61)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5]
	at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:59)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5]
	at
org.apache.log4j.Category.callAppenders(Category.java:179)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5]
	at
org.apache.log4j.Category.forcedLog(Category.java:333)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5]
	at
org.apache.log4j.Category.log(Category.java:724)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5]
	at
org.ops4j.pax.logging.service.internal.PaxLoggerImpl.log(PaxLoggerImpl.java:335)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5]
	at
org.ops4j.pax.logging.service.internal.JdkHandler.publish(JdkHandler.java:114)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5]
	at java.util.logging.Logger.log(Logger.java:738)[:1.8.0_73]
	at
com.hazelcast.logging.StandardLoggerFactory$StandardLogger.log(StandardLoggerFactory.java:49)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.logging.LoggingServiceImpl$DefaultLogger.log(LoggingServiceImpl.java:167)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.logging.LoggingServiceImpl$DefaultLogger.log(LoggingServiceImpl.java:155)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.logging.AbstractLogger.info(AbstractLogger.java:60)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.nio.tcp.TcpIpConnection.close(TcpIpConnection.java:249)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.nio.tcp.nonblocking.AbstractHandler.onFailure(AbstractHandler.java:85)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.nio.tcp.nonblocking.NonBlockingIOThread.handleSelectionKey(NonBlockingIOThread.java:331)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.nio.tcp.nonblocking.NonBlockingIOThread.handleSelectionKeys(NonBlockingIOThread.java:314)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.nio.tcp.nonblocking.NonBlockingIOThread.selectLoop(NonBlockingIOThread.java:234)[196:com.hazelcast:3.6.4]
	at
com.hazelcast.nio.tcp.nonblocking.NonBlockingIOThread.run(NonBlockingIOThread.java:187)[196:com.hazelcast:3.6.4]



--
View this message in context: http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047552.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Chandan <ch...@in.bosch.com>.
Able to see below things as well

*CELLAR HTTP BALANCER: alias property is not defined*

How will i get to know what is the proxy url ?

Regards,
Chandan



--
View this message in context: http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047551.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Chandan <ch...@in.bosch.com>.
Hello,

I have encountered below exception. All my proxy servlet are failed not
showing it as deployed

208 | CellarBalancerProxyServlet | ServletModel-13            | *Failed     
*| /features           | [/features/*]
208 | CellarBalancerProxyServlet | ServletModel-14            | *Failed     
*| /gogo               | [/gogo/*]
208 | CellarBalancerProxyServlet | ServletModel-15            | *Failed     
*| /instance           | [/instance/*]
208 | CellarBalancerProxyServlet | ServletModel-16            | *Failed     
*| /cxf                | [/cxf/*]
208 | CellarBalancerProxyServlet | ServletModel-17            | *Failed     
*| /system/console     | [/system/console/*]

Console:
I am seeing 

Exception in thread "hz.cellar.IO.thread-in-2"
java.lang.IllegalThreadStateException: hz.cellar.IO.thread-in-2 cannot make
remote call:
com.hazelcast.map.impl.operation.PutOperation{identityHash=1269781987,
serviceName='hz:impl:mapService'
at
com.hazelcast.spi.impl.operationservice.impl.Invocation.invokeInternal(Invocation.java:208)
at
com.hazelcast.spi.impl.operationservice.impl.Invocation.invoke(Invocation.java:180)
at
com.hazelcast.spi.impl.operationservice.impl.InvocationBuilderImpl.invoke(InvocationBuilderImpl.java:46)
at
com.hazelcast.map.impl.proxy.MapProxySupport.invokeOperation(MapProxySupport.java:316)
at
com.hazelcast.map.impl.proxy.MapProxySupport.putInternal(MapProxySupport.java:290)
at com.hazelcast.map.impl.proxy.MapProxyImpl.put(MapProxyImpl.java:109)
at com.hazelcast.map.impl.proxy.MapProxyImpl.put(MapProxyImpl.java:99)
at org.apache.karaf.cellar.log.LogAppender.doAppend(LogAppender.java:55)
at
org.ops4j.pax.logging.service.internal.PaxAppenderProxy.doAppend(PaxAppenderProxy.java:63)
at
org.ops4j.pax.logging.service.internal.AppenderBridgeImpl.append(AppenderBridgeImpl.java:67)
at
org.ops4j.pax.logging.service.internal.AppenderBridgeImpl.doAppend(AppenderBridgeImpl.java:61)
at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:59)
at org.apache.log4j.Category.callAppenders(Category.java:179)
at org.apache.log4j.Category.forcedLog(Category.java:333)
at org.apache.log4j.Category.log(Category.java:724)
at
org.ops4j.pax.logging.service.internal.PaxLoggerImpl.log(PaxLoggerImpl.java:335)
at
org.ops4j.pax.logging.service.internal.JdkHandler.publish(JdkHandler.java:114)
at java.util.logging.Logger.log(Logger.java:738)
at
com.hazelcast.logging.StandardLoggerFactory$StandardLogger.log(StandardLoggerFactory.java:49)
at
com.hazelcast.logging.LoggingServiceImpl$DefaultLogger.log(LoggingServiceImpl.java:167)
at com.hazelcast.logging.AbstractLogger.warning(AbstractLogger.java:90)


What could be the issue?

Regards,
Chandan




--
View this message in context: http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047550.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Please take a look on the documentation. All is there.

Regards
JB



On Aug 16, 2016, 09:30, at 09:30, Chandan <ch...@in.bosch.com> wrote:
>I have a doubt
>I have deployed the bundle in both the machines. How to setup the proxy
>so
>that i will get a common url for a webservice to consume the bundle.
>
>Regards,
>Chandan
>
>
>
>--
>View this message in context:
>http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047548.html
>Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Chandan <ch...@in.bosch.com>.
I have a doubt
I have deployed the bundle in both the machines. How to setup the proxy so
that i will get a common url for a webservice to consume the bundle.

Regards,
Chandan



--
View this message in context: http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047548.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi

Yes features/bundles can be sync by cellar.

Yes if you install the balancer cellar feature then you will have balancing (you may just need DNS setup).

Regards
JB



On Aug 16, 2016, 07:46, at 07:46, Chandan <ch...@in.bosch.com> wrote:
>My aim is to establish a load balancer on 2 machines of karaf.
>
>Now with same configuration it identified. i used interface only it
>worked.
>
>Now i have a question
>First machine - installed cellar
>Second machine - installed cellar
>
>above configuration is done on both machines, both got interconnected.
>
>1. Now, if i deploy a OSGI-bundle in first machine, second machine will
>get
>the broadcasted bundle automatically ?
>
>2. Suppose a bundle is a web service. Assume same bundle is available
>in
>both machines and if first machine goes down, am i able to consume the
>bundle from second machine irrespective of url change ?
>I guess this is the feature of clustering.
>
>3. How to do load balancing ?
>
>Regards,
>Chandan
>
>
>
>
>--
>View this message in context:
>http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047546.html
>Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Chandan <ch...@in.bosch.com>.
My aim is to establish a load balancer on 2 machines of karaf.

Now with same configuration it identified. i used interface only it worked.

Now i have a question
First machine - installed cellar
Second machine - installed cellar

above configuration is done on both machines, both got interconnected.

1. Now, if i deploy a OSGI-bundle in first machine, second machine will get
the broadcasted bundle automatically ?

2. Suppose a bundle is a web service. Assume same bundle is available in
both machines and if first machine goes down, am i able to consume the
bundle from second machine irrespective of url change ?
I guess this is the feature of clustering.

3. How to do load balancing ?

Regards,
Chandan




--
View this message in context: http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047546.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
The element to use is host, not interface here (if I understand correctly what you want to do).

Regards
JB



On Aug 16, 2016, 07:31, at 07:31, Chandan <ch...@in.bosch.com> wrote:
>Hello,
>
>My another machine is not able to identify even in the same network
>below is my configuration. Correct me if i am wrong
>
><network>
>        <port auto-increment="true" port-count="100">5701</port>
>        <outbound-ports>
>            
>            <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">
>                <interface>127.0.0.1</interface>
>				<interface>10.165.20.45</interface>
>            </tcp-ip>
>            <aws enabled="false">
>                <access-key>my-access-key</access-key>
>                <secret-key>my-secret-key</secret-key>
>                
>                <region>us-west-1</region>
>                
>                <host-header>ec2.amazonaws.com</host-header>
>                
>                <security-group-name>hazelcast-sg</security-group-name>
>                <tag-key>type</tag-key>
>                <tag-value>hz-nodes</tag-value>
>            </aws>
>        </join>
>        <interfaces enabled="true">
>            <interface>10.165.20.*</interface>
>        </interfaces>
>        <ssl enabled="false"/>
>        <socket-interceptor enabled="false"/>
>        <symmetric-encryption enabled="false">
>            
>            <algorithm>PBEWithMD5AndDES</algorithm>
>            
>            <salt>thesalt</salt>
>            
>            <password>thepass</password>
>            
>            <iteration-count>19</iteration-count>
>        </symmetric-encryption>
>    </network>
>
>
>
>--
>View this message in context:
>http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047544.html
>Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Chandan <ch...@in.bosch.com>.
Hello,

My another machine is not able to identify even in the same network
below is my configuration. Correct me if i am wrong

<network>
        <port auto-increment="true" port-count="100">5701</port>
        <outbound-ports>
            
            <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">
                <interface>127.0.0.1</interface>
				<interface>10.165.20.45</interface>
            </tcp-ip>
            <aws enabled="false">
                <access-key>my-access-key</access-key>
                <secret-key>my-secret-key</secret-key>
                
                <region>us-west-1</region>
                
                <host-header>ec2.amazonaws.com</host-header>
                
                <security-group-name>hazelcast-sg</security-group-name>
                <tag-key>type</tag-key>
                <tag-value>hz-nodes</tag-value>
            </aws>
        </join>
        <interfaces enabled="true">
            <interface>10.165.20.*</interface>
        </interfaces>
        <ssl enabled="false"/>
        <socket-interceptor enabled="false"/>
        <symmetric-encryption enabled="false">
            
            <algorithm>PBEWithMD5AndDES</algorithm>
            
            <salt>thesalt</salt>
            
            <password>thepass</password>
            
            <iteration-count>19</iteration-count>
        </symmetric-encryption>
    </network>



--
View this message in context: http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542p4047544.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Cellar Clustering in karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi

By default cellar uses unicast and multicast to discover the nodes. So if your network allows multicast you don't need tcp/IP static configuration.

In the case of static tcp/IP configuration, you have to define netmasks or addresses on each node.

Regards
JB



On Aug 16, 2016, 05:18, at 05:18, Chandan <ch...@in.bosch.com> wrote:
>Hello ,
>
>I need to form a cluster of 2 nodes (basically 2 systems talking to
>each
>other)
>In one machine/node, i have installed cellar and i am following below
>documentation
>
>Cellar Documentation 3.0.3
><https://karaf.apache.org/manual/cellar/latest-3/#_registering_cellar_features>
> 
>
>I have configured hazlecast.xml to listen to another machine ip (by
>enabling
>tcp/ip to true)
>Should i follow the same steps in another machine to listen to first
>machine
>?
>
>One way of configuration is enough ?
>Please let me know i am blank here.
>
>
>
>
>--
>View this message in context:
>http://karaf.922171.n3.nabble.com/Cellar-Clustering-in-karaf-tp4047542.html
>Sent from the Karaf - Dev mailing list archive at Nabble.com.