If you are having issues with nodes not forming a cluster, or if you are unable to connect to a remote cluster, please read this first!
In Elasticsearch 2.0 we made some major changes to the way default networking is configured.
The primary one is that Elasticsearch no longer listens to all interfaces by default, and instead only binds to loopback/127.00.1. This means that if you are coming from 1.X you will need to explicitly set network.host in your elasticsearch.yml config file.
The second is that multicast discovery has been removed as the default discovery method and is now available via a plugin only.
For more information, please read the release notes, here.
I started using ES 2.0. In elasticsearch.yml file I have set network.host as host name.
I see lots of exception as below:
[2016-01-23 09:01:02,388][WARN ][cluster.service ] [Mangle] failed to reconnect to node {Gee}{MtDkhr9rSza5QoSqKTqkrA}{127.0.0.1}{127.0.0.1:9303}{data=false, client=true}
ConnectTransportException[[Gee][127.0.0.1:9303] connect_timeout[30s]]; nested: ConnectException[Connection refused: no further information: /127.0.0.1:9303];
at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:922)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:855)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:828)
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:243)
at org.elasticsearch.cluster.service.InternalClusterService$ReconnectToNodes.run(InternalClusterService.java:598)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused: no further information: /127.0.0.1:9303
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152)
at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
... 3 more
I am not sure why transport client is still trying to connect to 127.0.0.1 even after setting network.host. I also tried setting transport.host as host name but no luck.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.