hazelcast issue when running HA cluster in docker containers

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

hazelcast issue when running HA cluster in docker containers

askalski85
I am running 2 artifactory instances inside docker containers on 2 computers.
For isolation docker I am using bridge mode.

Inside ha-node.properties I need to set up my host IP address so the container will be reachable from outside.
I get an error on start that network interface is not recognized, probably because inside docker I have different actual ip.

Is there a way to configure hazelcast for artifactory?

error message:
Interface matching must be either disabled or updated in the hazelcast.xml config file.
2016-04-29 07:27:31,253 [art-init] [ERROR] (c.h.i.DefaultAddressPicker:86) - [LOCAL] [Artifactory] [3.6.1] Hazelcast CANNOT start on this node. No matching network interface found.
Interface matching must be either disabled or updated in the hazelcast.xml config file.
java.lang.RuntimeException: Hazelcast CANNOT start on this node. No matching network interface found.
Interface matching must be either disabled or updated in the hazelcast.xml config file.
        at com.hazelcast.instance.DefaultAddressPicker.pickInterfaceAddress(DefaultAddressPicker.java:195) ~[hazelcast-3.6.1.jar:3.6.1]
        at com.hazelcast.instance.DefaultAddressPicker.pickAddress(DefaultAddressPicker.java:164) ~[hazelcast-3.6.1.jar:3.6.1]
        at com.hazelcast.instance.DefaultAddressPicker.getPublicAddressByPortSearch(DefaultAddressPicker.java:104) ~[hazelcast-3.6.1.jar:3.6.1]
        at com.hazelcast.instance.DefaultAddressPicker.pickAddress(DefaultAddressPicker.java:74) ~[hazelcast-3.6.1.jar:3.6.1]
        at com.hazelcast.instance.Node.<init>(Node.java:157) [hazelcast-3.6.1.jar:3.6.1]
        at com.hazelcast.instance.HazelcastInstanceImpl.<init>(HazelcastInstanceImpl.java:125) [hazelcast-3.6.1.jar:3.6.1]
        at com.hazelcast.instance.HazelcastInstanceFactory.constructHazelcastInstance(HazelcastInstanceFactory.java:160) [hazelcast-3.6.1.jar:3.6.1]
        at com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:143) [hazelcast-3.6.1.jar:3.6.1]
        at com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:111) [hazelcast-3.6.1.jar:3.6.1]
        at com.hazelcast.core.Hazelcast.newHazelcastInstance(Hazelcast.java:58) [hazelcast-3.6.1.jar:3.6.1]
        at org.artifactory.addon.ha.cluster.HazelcastBuilder.build(HazelcastBuilder.java:62) [artifactory-addon-ha-4.7.3.jar:na]
        at org.artifactory.addon.ha.cluster.HazelcastServiceImpl.initHazelcast(HazelcastServiceImpl.java:90) [artifactory-addon-ha-4.7.3.jar:na]
        at org.artifactory.addon.ha.cluster.HazelcastServiceImpl.init(HazelcastServiceImpl.java:66) [artifactory-addon-ha-4.7.3.jar:na]
        at org.artifactory.addon.ha.HaAddonImpl.init(HaAddonImpl.java:175) [artifactory-addon-ha-4.7.3.jar:na]
        at org.artifactory.state.ArtifactoryStateManagerImpl.initHa(ArtifactoryStateManagerImpl.java:80) [artifactory-core-4.7.3.jar:na]
        at org.artifactory.state.ArtifactoryStateManagerImpl.init(ArtifactoryStateManagerImpl.java:54) [artifactory-core-4.7.3.jar:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_72-internal]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_72-internal]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_72-internal]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_72-internal]
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) [spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) [spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) [spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
        at org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:74) [artifactory-storage-common-4.7.3.jar:na]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
        at com.sun.proxy.$Proxy83.init(Unknown Source) [na:na]
        at org.artifactory.spring.ArtifactoryApplicationContext.refresh(ArtifactoryApplicationContext.java:224) [artifactory-core-4.7.3.jar:na]
        at org.artifactory.spring.ArtifactoryApplicationContext.<init>(ArtifactoryApplicationContext.java:114) [artifactory-core-4.7.3.jar:na]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [na:1.8.0_72-internal]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [na:1.8.0_72-internal]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [na:1.8.0_72-internal]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [na:1.8.0_72-internal]
        at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.configure(ArtifactoryContextConfigListener.java:214) [artifactory-web-application-4.7.3.jar:na]
        at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.access$1(ArtifactoryContextConfigListener.java:176) [artifactory-web-application-4.7.3.jar:na]
        at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener$1.run(ArtifactoryContextConfigListener.java:90) [artifactory-web-application-4.7.3.jar:na]
2016-04-29 07:27:31,262 [art-init] [ERROR] (o.a.w.s.ArtifactoryContextConfigListener:94) - Application could not be initialized: Hazelcast CANNOT start on this node. No matching network interface found.
Interface matching must be either disabled or updated in the hazelcast.xml config file.
mal
Reply | Threaded
Open this post in threaded view
|

Re: hazelcast issue when running HA cluster in docker containers

mal
Hi askalski85,

I encounter the exact same problem with the setup you described.
I can "bypass" the error and get artifactory running by using 127.0.0.1 as the IP address, but I doubt it will work when I'll activate the second node :/

Did you find a solution?

Thanks
mal
mal
Reply | Threaded
Open this post in threaded view
|

Re: hazelcast issue when running HA cluster in docker containers

mal
In reply to this post by askalski85
 Hi askalski85,

I encounter the exact same problem with the setup you described.
I can "bypass" the error and get artifactory running by using 127.0.0.1 as the IP address, but I doubt it will work when I'll activate the second node :/

Did you find a solution?

Thanks
mal
Reply | Threaded
Open this post in threaded view
|

Re: hazelcast issue when running HA cluster in docker containers

askalski85
This post was updated on .
Hi,


I am not sure if actual connection via IP has to present. Both instances are sharing the nfs ( in future this will be changed inside artifactory) and I guess all required information is present on that nfs or/and inside configuration database which also is being shared.

I've noticed both instances present on HA board in artifactory using internal IP. I did not test functionally if artifactory works correctly.

I did not get any response from JFrog on that. Ill come back to you in the end of June after my vacations [😉] .


I would propose with just setting internal IP there (instead of host).

I've red also that you can pass java arguments to hazelcast. I did not have luck with that and to be honest did not spend to much time on this. List of available java flags I was able to google.