title: Hazelcast multicast does not work because of vboxnet which is used by docker-machine
body: <p>After installation of dockerForMac and virtualbox on my macOs, local hazelcast members can not see each others with the multicast configuration of hazelcast (not in containers). It seems both of them are master in the cluster with the different port.</p>
  
  <p>Difference after installation of docker stuff etc. is IP addresses of the members. It was my local IP address but now It has <strong>192.168.99.1</strong> is used by vboxnet. see my ifconfig.</p>
  
  <blockquote>
    <p><a href="https://stackoverflow.com/a/22180287/889556">This comment is about the port usage of multicast discovery
    function:</a> It looks like Hazelcast uses multicast address 224.2.2.3
    on UDP port 54327 (by default) for discovery, and then port 5701 for
    TCP communication. Opening UDP port 54327 in the firewall fixed
    discovery for me. (I had also opened TCP port 5701 but that was not
    sufficient.)</p>
  </blockquote>
  
  <p>Is there anyway to make hazelcast use to my IP address?
  or
  Is there anyway to open these ports for <strong>vnetbox</strong>?</p>
  
  <p><strong>ifconfig:</strong></p>
  
  <pre><code>vboxnet0: flags=8842&lt;BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
      ether XX:XX:XX:00:00:00
  vboxnet1: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
      ether XX:XX:XX:00:00:01
      inet 192.168.99.1 netmask 0xffffff00 broadcast 192.168.99.255
  </code></pre>
  
  <p><strong>Node-1:</strong></p>
  
  <pre><code>2017-09-21 12:52:20.882 DEBUG 74783 --- [           main] c.h.i.cluster.impl.MulticastJoiner       : [192.168.99.1]:5701 [OSMAN] [3.8.4] PostJoin master: [192.168.99.1]:5701, isMaster: true
  2017-09-21 12:52:20.882  INFO 74783 --- [           main] c.h.i.cluster.impl.MulticastJoiner       : [192.168.99.1]:5701 [OSMAN] [3.8.4] 
  
  Members [1] {
      Member [192.168.99.1]:5701 - c38919ff-d992-4d2e-a7f8-afaae146e5d5 this
  }
  
  2017-09-21 12:52:20.906  INFO 74783 --- [           main] com.hazelcast.core.LifecycleService      : [192.168.99.1]:5701 [OSMAN] [3.8.4] [192.168.99.1]:5701 is STARTED
  </code></pre>
  
  <p><strong>Node-2:</strong></p>
  
  <pre><code>2017-09-21 12:52:21.513 DEBUG 74800 --- [           main] c.h.i.cluster.impl.MulticastJoiner       : [192.168.99.1]:5702 [test-group] [3.8.4] PostJoin master: [192.168.99.1]:5702, isMaster: true
  2017-09-21 12:52:21.513  INFO 74800 --- [           main] c.h.i.cluster.impl.MulticastJoiner       : [192.168.99.1]:5702 [test-group] [3.8.4] 
  
  Members [1] {
      Member [192.168.99.1]:5702 - e21bbd01-b55f-4e6e-8a04-eff4402e300a this
  }
  
  2017-09-21 12:52:21.513  WARN 74800 --- [           main] com.hazelcast.instance.Node              : [192.168.99.1]:5702 [test-group] [3.8.4] Config seed port is 5701 and cluster size is 1. Some of the ports seem occupied!
  </code></pre>
  
  <p><strong>Hazelcast Configuration:</strong></p>
  
  <pre><code>@Bean
  public Config hazelCastConfig() {
      Config config = new Config();
      config.getGroupConfig().setName("test-group");
      config.getGroupConfig().setPassword("test-password");
      config.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(false);
      config.getNetworkConfig().getJoin().getAwsConfig().setEnabled(false);
      config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(true);
      return config;
  }
  </code></pre>