{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/12914","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/12914/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/12914/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/12914/events","html_url":"https://github.com/elastic/elasticsearch/issues/12914","id":101226869,"number":12914,"title":"multicast is sent over all interfaces by default","user":{"login":"rmuir","id":504194,"avatar_url":"https://avatars.githubusercontent.com/u/504194?v=3","gravatar_id":"","url":"https://api.github.com/users/rmuir","html_url":"https://github.com/rmuir","followers_url":"https://api.github.com/users/rmuir/followers","following_url":"https://api.github.com/users/rmuir/following{/other_user}","gists_url":"https://api.github.com/users/rmuir/gists{/gist_id}","starred_url":"https://api.github.com/users/rmuir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmuir/subscriptions","organizations_url":"https://api.github.com/users/rmuir/orgs","repos_url":"https://api.github.com/users/rmuir/repos","events_url":"https://api.github.com/users/rmuir/events{/privacy}","received_events_url":"https://api.github.com/users/rmuir/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Network","name":":Network","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/bug","name":"bug","color":"9e2c2c"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v2.0.0","name":"v2.0.0","color":"dddddd"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-16T02:46:25Z","updated_at":"2015-08-16T15:39:46Z","closed_at":null,"body":"Migration guide says:\r\n\r\nElasticsearch now binds to the loopback interface by default (usually\r\n`127.0.0.1` or `::1`). The `network.host` setting can be specified to change\r\nthis behavior.\r\n\r\nBut this is a little confusing, because it still sends multicast packets over all interfaces (224.2.2.4). Instead, when we are only bound to loopback interface, I think we should use a link-local scoped address (e.g. 224.0.0.x). Ideally we'd use node-local if ipv4 had it (nodes bound to different loopback interfaces won't see each other). ipv6 can do node-local though.\r\n\r\nJust startup another node on the same network with -Des.network.host=<realip> and you will see that it gets multicast packets from the other machine (of course things don't work, since its advertising localhost):\r\n\r\n[2015-08-15 22:19:45,835][WARN ][org.elasticsearch.discovery.zen.ping.multicast] [Lorna Dane] failed to connect to requesting node [Locksmith][ywu92vT0Q0OYRNo-EmK01w][mac2][inet[/127.0.0.1:9300]]\r\nConnectTransportException[[Locksmith][inet[/127.0.0.1:9300]] connect_timeout[30s]]; nested: ConnectException[Connection refused: /127.0.0.1:9300];\r\n\tat org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:827)\r\n\tat org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:760)\r\n\tat org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:733)\r\n\tat org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:234)\r\n\tat org.elasticsearch.discovery.zen.ping.multicast.MulticastZenPing$Receiver$1.run(MulticastZenPing.java:537)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\nCaused by: java.net.ConnectException: Connection refused: /127.0.0.1:9300\r\n\tat sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)\r\n\tat sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)\r\n\tat org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152)\r\n\tat org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)\r\n\tat org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)\r\n\tat org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)\r\n\tat org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)\r\n\tat org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)\r\n\tat org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)\r\n\t... 3 more\r\n\r\nTry the same scenario with `bin/elasticsearch -Ddiscovery.zen.ping.multicast.group=224.0.0.200` and you can bring up multiple instances on one machine, but you won't see these pings from another machine. With mac at least there is an issue, and even changing the address here does not work...\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/131575648","html_url":"https://github.com/elastic/elasticsearch/issues/12914#issuecomment-131575648","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/12914","id":131575648,"user":{"login":"rmuir","id":504194,"avatar_url":"https://avatars.githubusercontent.com/u/504194?v=3","gravatar_id":"","url":"https://api.github.com/users/rmuir","html_url":"https://github.com/rmuir","followers_url":"https://api.github.com/users/rmuir/followers","following_url":"https://api.github.com/users/rmuir/following{/other_user}","gists_url":"https://api.github.com/users/rmuir/gists{/gist_id}","starred_url":"https://api.github.com/users/rmuir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmuir/subscriptions","organizations_url":"https://api.github.com/users/rmuir/orgs","repos_url":"https://api.github.com/users/rmuir/repos","events_url":"https://api.github.com/users/rmuir/events{/privacy}","received_events_url":"https://api.github.com/users/rmuir/received_events","type":"User","site_admin":false},"created_at":"2015-08-16T15:39:46Z","updated_at":"2015-08-16T15:39:46Z","body":"Yeah, its not behaving the same as linux machines: those seem fine. Keep in mind its tricky to verify with tcpdump, in most cases I think you need to join the multicast group for tcpdump to show the packets. Its easier to just bring up an ES node on another machine in the ethernet network and see if its getting multicast packets."}}