When I run elasticsearch 0.90.0 with command: bin/elasticsearch -f
, I get this error:
[2014-09-17 15:00:27,998][INFO ][node ] [Myers, Fred] {0.90.0}[8030]: initializing ...
[2014-09-17 15:00:28,005][INFO ][plugins ] [Myers, Fred] loaded [], sites []
[2014-09-17 15:00:30,508][INFO ][node ] [Myers, Fred] {0.90.0}[8030]: initialized
[2014-09-17 15:00:30,508][INFO ][node ] [Myers, Fred] {0.90.0}[8030]: starting ...
[2014-09-17 15:00:30,762][INFO ][transport ] [Myers, Fred] bound_address {inet[/0:0:0:0:0:0:0:0:9301]}, publish_address {inet[/192.168.0.108:9301]}
[2014-09-17 15:00:36,874][WARN ][discovery.zen ] [Myers, Fred] failed to connect to master [[Holly][nlr9o-yfSQ6MsTtYlTlqlw][inet[/192.168.1.6:9300]]], retrying...
org.elasticsearch.transport.ConnectTransportException: [Holly][inet[/192.168.1.6:9300]] connect_timeout[30s]
at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:671)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:610)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:580)
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:127)
at org.elasticsearch.discovery.zen.ZenDiscovery.innterJoinCluster(ZenDiscovery.java:337)
at org.elasticsearch.discovery.zen.ZenDiscovery.access$500(ZenDiscovery.java:76)
at org.elasticsearch.discovery.zen.ZenDiscovery$1.run(ZenDiscovery.java:290)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.NoRouteToHostException: No route to host
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
... 3 more
[2014-09-17 15:00:36,874][WARN ][transport.netty ] [Myers, Fred] exception caught on transport layer [[id: 0x361eaf47]], closing connection
java.net.NoRouteToHostException: No route to host
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[2014-09-17 15:00:42,892][WARN ][transport.netty ] [Myers, Fred] exception caught on transport layer [[id: 0x2656abc9]], closing connection
java.net.NoRouteToHostException: No route to host
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
...
I don't install logstash.
When I access localhost:9200
, I get
{
ok: true,
status: 503,
name: "Haywire",
version: {
number: "0.90.0",
snapshot_build: false
},
tagline: "You Know, for Search"
}
Can anyone help me solve this problem?
Your ElasticSearch instance is trying to join a cluster (probably someone else on your network) but fails. You should disable automatic cluster discovery.
Find the 'Discovery' section in /etc/elasticsearch/elasticsearch.yml
Disable multicast discovery (enabled by default) by uncommenting this line:
# discovery.zen.ping.multicast.enabled: false
EDIT: I just discovered that this error can still happen, even when "zen multicast discovery" is disabled. If (like me) you have network.bind_host: 127.0.0.1
in elasticsearch.yml
(to only allow local connections to ElasticSearch), you must also set network.host: 127.0.0.1
. Otherwise, ElasticSearch will not be able to connect to itself (it needs to, for some reason).
Give a name to your cluster and the issue will be solved.
Edit config/elasticsearch.yml
in your elasticsearch directory.
Uncomment cluster.name: elasticsearch
and change it to something like cluster.name: your_hostname
Then try to start elasticsearch again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With