{"action":"closed","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/13921","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/13921/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/13921/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/13921/events","html_url":"https://github.com/elastic/elasticsearch/issues/13921","id":109680702,"number":13921,"title":"setting network.bind_host: localhost and publish_host: _ens192:ipv4_ uses localhost only","user":{"login":"cristifalcas","id":3647635,"avatar_url":"https://avatars.githubusercontent.com/u/3647635?v=3","gravatar_id":"","url":"https://api.github.com/users/cristifalcas","html_url":"https://github.com/cristifalcas","followers_url":"https://api.github.com/users/cristifalcas/followers","following_url":"https://api.github.com/users/cristifalcas/following{/other_user}","gists_url":"https://api.github.com/users/cristifalcas/gists{/gist_id}","starred_url":"https://api.github.com/users/cristifalcas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cristifalcas/subscriptions","organizations_url":"https://api.github.com/users/cristifalcas/orgs","repos_url":"https://api.github.com/users/cristifalcas/repos","events_url":"https://api.github.com/users/cristifalcas/events{/privacy}","received_events_url":"https://api.github.com/users/cristifalcas/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-04T13:15:14Z","updated_at":"2015-10-06T12:47:04Z","closed_at":"2015-10-06T12:47:03Z","body":"We wanted to set the REST API of an elasticsearch cluster to localhost and proxy all requests with a web proxy (apache), but to let the cluster find the nodes via the main interface. But it looks like it will bind to the local interface only.\r\n\r\nThose are the ports opened by elasticsearch process:\r\n\r\n    # netstat -tulpn | grep 20438\r\n    tcp6       0      0 127.0.0.1:9200          :::*                    LISTEN      20438/java\r\n    tcp6       0      0 127.0.0.1:9300          :::*                    LISTEN      20438/java\r\n    udp6       0      0 :::54328                :::*                                20438/java\r\n\r\n\r\nThis is the relevant configuration from /etc/elasticsearch/es-01/elasticsearch.yml:\r\n\r\n    network:\r\n      publish_host: _ens192:ipv4_\r\n      bind_host: localhost\r\n\r\n\r\nThose are the startup log messages:\r\n\r\n    starting ...\r\n    bound_address {inet[/127.0.0.1:9300]}, publish_address {inet[/10.220.10.105:9300]}\r\n    optymyze_Romania/XPSgcKuQSteNJfNwyWIsTg\r\n    new_master [v-so-repo-05.synygy.net-es-01][XPSgcKuQSteNJfNwyWIsTg][v-so-repo-05.synygy.net][inet[/10.220.10.105:9300]]{host=v-so-repo-05.synygy}, reason: zen-disco-join (elected_as_master)\r\n    delaying initial state recovery for [5m]. recover_after_time was set to [5m]\r\n    bound_address {inet[/127.0.0.1:9200]}, publish_address {inet[/10.220.10.105:9200]}\r\n    started\r\n\r\nHere is an exception thrown shortly after starting:\r\n\r\n    [inet[/10.220.10.105:9300]] connect_timeout[30s]\r\n\t    at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:825)\r\n\t    at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:758)\r\n\t    at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:731)\r\n\t    at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:216)\r\n\t    at org.elasticsearch.cluster.service.InternalClusterService$ReconnectToNodes.run(InternalClusterService.java:584)\r\n\t    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)\r\n\t    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)\r\n\t    at java.lang.Thread.run(Thread.java:722)\r\n    Caused by: java.net.ConnectException: Connection refused: /10.220.10.105:9300\r\n\t    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)\r\n\t    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:701)\r\n\t    at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152)\r\n\t    at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)\r\n\t    at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)\r\n\t    at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)\r\n\t    at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)\r\n\t    at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)\r\n\t    at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)\r\n\t    ... 3 more\r\n"}}