codeclou / docker-atlassian-confluence-data-center

Dockerized Atlassian Confluence Data Center for local testing during plugin development.
MIT License
21 stars 9 forks source link

Confluence 7 - Hazelcast CANNOT start on this node #5

Closed ataraxie closed 5 years ago

ataraxie commented 5 years ago

I'm getting the following error when I start 7.0.1-beta1. Any ideas? Everything seems to start correctly.

2019-09-04 10:24:51,006 ERROR [main] [com.hazelcast.instance.AddressPicker] [LOCAL] [Confluence-Synchrony] [3.11.4] 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.
2019-09-04 10:24:51,007 ERROR [main] [com.hazelcast.instance.AddressPicker] [LOCAL] [Confluence-Synchrony] [3.11.4] 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.pickInterfaceAddressDef(DefaultAddressPicker.java:155)
    at com.hazelcast.instance.DefaultAddressPicker.pickAddressDef(DefaultAddressPicker.java:123)
    at com.hazelcast.instance.DefaultAddressPicker.getPublicAddressByPortSearch(DefaultAddressPicker.java:103)
    at com.hazelcast.instance.DefaultAddressPicker.pickAddress(DefaultAddressPicker.java:83)
    at com.hazelcast.instance.Node.<init>(Node.java:197)
    at com.hazelcast.instance.HazelcastInstanceImpl.createNode(HazelcastInstanceImpl.java:156)
    at com.hazelcast.instance.HazelcastInstanceImpl.<init>(HazelcastInstanceImpl.java:126)
    at com.hazelcast.instance.HazelcastInstanceFactory.constructHazelcastInstance(HazelcastInstanceFactory.java:202)
    at com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:181)
    at com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:131)
    at com.hazelcast.core.Hazelcast.newHazelcastInstance(Hazelcast.java:57)
    at synchrony.hazelcast$new.invokeStatic(hazelcast.clj:112)
    at synchrony.hazelcast$new.invoke(hazelcast.clj:111)
    at synchrony.server.cluster$start_hz_cluster.invokeStatic(cluster.clj:12)
    at synchrony.server.cluster$start_hz_cluster.invoke(cluster.clj:11)
    at synchrony.server.cluster$fn__39748$fn__39752.invoke(cluster.clj:36)
    at mount.lite.State.start_STAR_(lite.clj:44)
    at mount.lite$start$fn__24142.invoke(lite.clj:151)
    at mount.lite$start.invokeStatic(lite.clj:150)
    at mount.lite$start.invoke(lite.clj:136)
    at mount.lite$start.invokeStatic(lite.clj:141)
    at mount.lite$start.invoke(lite.clj:136)
    at synchrony.core$start_BANG_.invokeStatic(core.clj:21)
    at synchrony.core$start_BANG_.invoke(core.clj:21)
    at synchrony.core$_main.invokeStatic(core.clj:38)
    at synchrony.core$_main.doInvoke(core.clj:36)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at synchrony.core.main(Unknown Source)
2019-09-04 10:24:51,056 ERROR [main] [synchrony.logging] uncaught exception {:throwable #error {
     :cause "Hazelcast CANNOT start on this node. No matching network interface found.\nInterface matching must be either disabled or updated in the hazelcast.xml config file."
     :via
     [{:type clojure.lang.ExceptionInfo
       :message "error while starting state #'synchrony.server.cluster/cluster"
       :data {:var #'synchrony.server.cluster/cluster}
       :at [mount.lite$start$fn__24142 invoke "lite.clj" 153]}
      {:type java.lang.RuntimeException
       :message "Hazelcast CANNOT start on this node. No matching network interface found.\nInterface matching must be either disabled or updated in the hazelcast.xml config file."
       :at [com.hazelcast.instance.DefaultAddressPicker pickInterfaceAddressDef "DefaultAddressPicker.java" 155]}]
     :trace
     [[com.hazelcast.instance.DefaultAddressPicker pickInterfaceAddressDef "DefaultAddressPicker.java" 155]
      [com.hazelcast.instance.DefaultAddressPicker pickAddressDef "DefaultAddressPicker.java" 123]
      [com.hazelcast.instance.DefaultAddressPicker getPublicAddressByPortSearch "DefaultAddressPicker.java" 103]
      [com.hazelcast.instance.DefaultAddressPicker pickAddress "DefaultAddressPicker.java" 83]
      [com.hazelcast.instance.Node <init> "Node.java" 197]
      [com.hazelcast.instance.HazelcastInstanceImpl createNode "HazelcastInstanceImpl.java" 156]
      [com.hazelcast.instance.HazelcastInstanceImpl <init> "HazelcastInstanceImpl.java" 126]
      [com.hazelcast.instance.HazelcastInstanceFactory constructHazelcastInstance "HazelcastInstanceFactory.java" 202]
      [com.hazelcast.instance.HazelcastInstanceFactory newHazelcastInstance "HazelcastInstanceFactory.java" 181]
      [com.hazelcast.instance.HazelcastInstanceFactory newHazelcastInstance "HazelcastInstanceFactory.java" 131]
      [com.hazelcast.core.Hazelcast newHazelcastInstance "Hazelcast.java" 57]
      [synchrony.hazelcast$new invokeStatic "hazelcast.clj" 112]
      [synchrony.hazelcast$new invoke "hazelcast.clj" 111]
      [synchrony.server.cluster$start_hz_cluster invokeStatic "cluster.clj" 12]
      [synchrony.server.cluster$start_hz_cluster invoke "cluster.clj" 11]
      [synchrony.server.cluster$fn__39748$fn__39752 invoke "cluster.clj" 36]
      [mount.lite.State start_STAR_ "lite.clj" 44]
      [mount.lite$start$fn__24142 invoke "lite.clj" 151]
      [mount.lite$start invokeStatic "lite.clj" 150]
      [mount.lite$start invoke "lite.clj" 136]
      [mount.lite$start invokeStatic "lite.clj" 141]
      [mount.lite$start invoke "lite.clj" 136]
      [synchrony.core$start_BANG_ invokeStatic "core.clj" 21]
      [synchrony.core$start_BANG_ invoke "core.clj" 21]
      [synchrony.core$_main invokeStatic "core.clj" 38]
      [synchrony.core$_main doInvoke "core.clj" 36]
      [clojure.lang.RestFn applyTo "RestFn.java" 137]
      [synchrony.core main nil -1]]}}
04-Sep-2019 10:24:58.843 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8090"]
04-Sep-2019 10:24:58.873 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [34,361] milliseconds
clouless commented 5 years ago

seems to be the interface. Maybe on your machine you do not have eth0 or whatever the default is. Maybe you can try this:

https://confluence.atlassian.com/confkb/hazelcast-cannot-start-on-this-node-no-matching-network-interface-found-646447553.html

clouless commented 5 years ago

I will soon redeploy to dockerhub and then there will be a ENV var you can override. Default is eth0 and the ENV Var will be MULTICAST_INTERFACE

clouless commented 5 years ago

✅ OK it is pushed to dockerhub. You should be able to change the Interface name to e.g. eth2 like so when patching the management script:

# ...
function start_instance_loadbalancer {
    echo -e $C_CYN">> docker run .........:${C_RST}${C_GRN} Starting${C_RST}  - Starting instance confluence-cluster-${CONFLUENCE_VERSION_DOT_FREE}-lb."
    docker run \
        --rm \
        --name confluence-cluster-${CONFLUENCE_VERSION_DOT_FREE}-lb \
        --net=confluence-cluster-${CONFLUENCE_VERSION_DOT_FREE} \
        --net-alias=confluence-cluster-${CONFLUENCE_VERSION_DOT_FREE}-lb \
        --env NODES=${1} \
        --env MULTICAST_INTERFACE="eth2" \
        -p $CONFLUENCE_LB_PUBLIC_PORT:$CONFLUENCE_LB_PUBLIC_PORT \
        -d codeclou/docker-atlassian-confluence-data-center:loadbalancer-${CONFLUENCE_VERSION}
}
#...

See the line with --env MULTICAST_INTERFACE="eth2"

Start as usual and get on the container like so:

docker exec -i -t confluence-cluster-701-node1 bash

And type /sbin/ifconfig to see the available interfaces.

Im my case it prints:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.21.0.4  netmask 255.255.0.0  broadcast 172.21.255.255
        ether 02:42:ac:15:00:04  txqueuelen 0  (Ethernet)
        RX packets 510  bytes 181962 (181.9 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 521  bytes 1028837 (1.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

If this does not solve the issue, then I do not know whats wrong. On my machines it works.

ataraxie commented 5 years ago

@clouless Thank you! I will give this a shot soon!

ataraxie commented 5 years ago

How have your data center approvals been going?

clouless commented 5 years ago

Very nice actually, I have gotten approval for both my apps before September 03 (the deadline). And did both with JPT since I was already familiar with it. How has it been going at your end?

ataraxie commented 5 years ago

Pretty good too. We got approvals immediately with our results. But we tested our most important apps only so far. There are still 4 or so that we didn't do (yet). Mostly because I was really tired of the topic and wanted to work on other stuff :)

clouless commented 5 years ago

Yeah I also got one app to go. But it has not many active installations, so it will stay server-only for now. I am also very very happy to have this topic from the table for now ^^

ataraxie commented 5 years ago

@clouless Nooooo. What did you do?! You changed the whole architecture? 😭

clouless commented 5 years ago

@ataraxie yeah sorry, but Atlassian provides official docker images now, that saves me a lot of time and the docker compose approach is actually really nice. I know it it is a big change, but once you get into it you will like it too :) - it is actually much simpler

ataraxie commented 5 years ago

Hi @clouless - totally forgot to reply on this. I'm sure it was a wise decision. I just implemented quite some logic around your script that expects things exactly the way they were. Guess I gotta figure out how to bridge things now...