Error: MasterNotDiscoveredException

Like I do every morning, I started my local elasticsearch server but
today it throws and error and it is impossible to connect to it:

$ bin/elasticsearch -f
[2011-08-10 09:32:49,791][INFO ][node ]
[Battletide] {elasticsearch/0.17.3}[4017]: initializing ...
[2011-08-10 09:32:49,798][INFO ][plugins ]
[Battletide] loaded [], sites []
[2011-08-10 09:32:51,718][INFO ][node ]
[Battletide] {elasticsearch/0.17.3}[4017]: initialized
[2011-08-10 09:32:51,718][INFO ][node ]
[Battletide] {elasticsearch/0.17.3}[4017]: starting ...
[2011-08-10 09:32:51,808][INFO ][transport ]
[Battletide] bound_address {inet[/0.0.0.0:9300]}, publish_address
{inet[/192.168.1.113:9300]}
[2011-08-10 09:33:21,935][WARN ][discovery ]
[Battletide] waited for 30s and no initial state was set by the
discovery
[2011-08-10 09:33:21,936][INFO ][discovery ]
[Battletide] elasticsearch/I14Q2RtrSN2XE9hS-LVxLQ
[2011-08-10 09:33:22,164][INFO ][http ]
[Battletide] bound_address {inet[/0.0.0.0:9200]}, publish_address
{inet[/192.168.1.113:9200]}
[2011-08-10 09:33:22,165][INFO ][node ]
[Battletide] {elasticsearch/0.17.3}[4017]: started
[2011-08-10 09:33:24,991][WARN ][discovery.zen ]
[Battletide] failed to connect to master [[Bastion][5S439--
dRIK8ELlKvBxbXg][inet[/192.168.2.101:9300]]], retrying...
org.elasticsearch.transport.ConnectTransportException: [Bastion][inet[/
192.168.2.101:9300]] connect_timeout[30s]
at
org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:
562)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:
505)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:
484)
at
org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:
121)
at
org.elasticsearch.discovery.zen.ZenDiscovery.innterJoinCluster(ZenDiscovery.java:
283)
at org.elasticsearch.discovery.zen.ZenDiscovery.access
$500(ZenDiscovery.java:69)
at org.elasticsearch.discovery.zen.ZenDiscovery
$1.run(ZenDiscovery.java:239)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.net.ConnectException: connection timed out
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink
$Boss.processConnectTimeout(NioClientSocketPipelineSink.java:371)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink
$Boss.run(NioClientSocketPipelineSink.java:283)
at
org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:
108)
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker
$1.run(DeadLockProofWorker.java:44)
... 3 more

If I try to connect through the API it says:
Response: 500 Internal Server Error
{"error":"MasterNotDiscoveredException[]","status":500}

12 hours ago it was working perfectly. I am using elasticsearch
0.17.3. What has happened? I have tried upgrading to elasticsearch
0.17.4 in case it was a bug or something, but no luck. What can I do
to solve it? Thanks!

Is this a client node that you are starting? It seems to fail to connect to
your running elasticsearch instance server on
192.168.2.101http://192.168.2.101:9300/,
is it up? Which address did it bind on?

On Wed, Aug 10, 2011 at 10:45 AM, tania yosoythania@hotmail.com wrote:

Like I do every morning, I started my local elasticsearch server but
today it throws and error and it is impossible to connect to it:

$ bin/elasticsearch -f
[2011-08-10 09:32:49,791][INFO ][node ]
[Battletide] {elasticsearch/0.17.3}[4017]: initializing ...
[2011-08-10 09:32:49,798][INFO ][plugins ]
[Battletide] loaded , sites
[2011-08-10 09:32:51,718][INFO ][node ]
[Battletide] {elasticsearch/0.17.3}[4017]: initialized
[2011-08-10 09:32:51,718][INFO ][node ]
[Battletide] {elasticsearch/0.17.3}[4017]: starting ...
[2011-08-10 09:32:51,808][INFO ][transport ]
[Battletide] bound_address {inet[/0.0.0.0:9300]}, publish_address
{inet[/192.168.1.113:9300]}
[2011-08-10 09:33:21,935][WARN ][discovery ]
[Battletide] waited for 30s and no initial state was set by the
discovery
[2011-08-10 09:33:21,936][INFO ][discovery ]
[Battletide] elasticsearch/I14Q2RtrSN2XE9hS-LVxLQ
[2011-08-10 09:33:22,164][INFO ][http ]
[Battletide] bound_address {inet[/0.0.0.0:9200]}, publish_address
{inet[/192.168.1.113:9200]}
[2011-08-10 09:33:22,165][INFO ][node ]
[Battletide] {elasticsearch/0.17.3}[4017]: started
[2011-08-10 09:33:24,991][WARN ][discovery.zen ]
[Battletide] failed to connect to master [[Bastion][5S439--
dRIK8ELlKvBxbXg][inet[/192.168.2.101:9300]]], retrying...
org.elasticsearch.transport.ConnectTransportException: [Bastion][inet[/
192.168.2.101:9300]] connect_timeout[30s]
at

org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:
562)
at

org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:
505)
at

org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:
484)
at

org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:
121)
at

org.elasticsearch.discovery.zen.ZenDiscovery.innterJoinCluster(ZenDiscovery.java:
283)
at org.elasticsearch.discovery.zen.ZenDiscovery.access
$500(ZenDiscovery.java:69)
at org.elasticsearch.discovery.zen.ZenDiscovery
$1.run(ZenDiscovery.java:239)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.net.ConnectException: connection timed out
at

org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink
$Boss.processConnectTimeout(NioClientSocketPipelineSink.java:371)
at

org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink
$Boss.run(NioClientSocketPipelineSink.java:283)
at

org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:
108)
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker
$1.run(DeadLockProofWorker.java:44)
... 3 more

If I try to connect through the API it says:
Response: 500 Internal Server Error
{"error":"MasterNotDiscoveredException","status":500}

12 hours ago it was working perfectly. I am using elasticsearch
0.17.3. What has happened? I have tried upgrading to elasticsearch
0.17.4 in case it was a bug or something, but no luck. What can I do
to solve it? Thanks!

On 10 ago, 12:27, Shay Banon kim...@gmail.com wrote:

Is this a client node that you are starting? It seems to fail to connect to
your running elasticsearch instance server on
192.168.2.101http://192.168.2.101:9300/,
is it up? Which address did it bind on?

Well, I start elasticsearch just with bin/elasticsearch, which starts
one node. I haven't done any more configuration (I haven´t changed a
line in config/elasticsearch.yml).

Now I have retried starting elasticsearch and it works.

$bin/elasticsearch -f
[2011-08-10 12:23:44,174][INFO ][node ] [Sun Girl]
{elasticsearch/0.17.4}[17288]: initializing ...
[2011-08-10 12:23:44,225][INFO ][plugins ] [Sun Girl]
loaded , sites
[2011-08-10 12:23:49,397][INFO ][node ] [Sun Girl]
{elasticsearch/0.17.4}[17288]: initialized
[2011-08-10 12:23:49,397][INFO ][node ] [Sun Girl]
{elasticsearch/0.17.4}[17288]: starting ...
[2011-08-10 12:23:49,613][INFO ][transport ] [Sun Girl]
bound_address {inet[/0.0.0.0:9300]}, publish_address {inet[/
192.168.1.113:9300]}
[2011-08-10 12:23:53,023][INFO ][cluster.service ] [Sun Girl]
new_master [Sun Girl][0qnkZmXlRV-B07rCnXi0yQ][inet[/
192.168.1.113:9300]], reason: zen-disco-join (elected_as_master)
[2011-08-10 12:23:53,115][INFO ][discovery ] [Sun Girl]
elasticsearch/0qnkZmXlRV-B07rCnXi0yQ
[2011-08-10 12:23:53,164][INFO ][http ] [Sun Girl]
bound_address {inet[/0.0.0.0:9200]}, publish_address {inet[/
192.168.1.113:9200]}
[2011-08-10 12:23:53,187][INFO ][node ] [Sun Girl]
{elasticsearch/0.17.4}[17288]: started
[2011-08-10 12:23:53,204][INFO ][gateway ] [Sun Girl]
recovered [0] indices into cluster_state
[2011-08-10 12:24:12,012][WARN ][discovery.zen.ping.multicast] [Sun
Girl] received ping response ping_response{target [[Bastion][5S439--
dRIK8ELlKvBxbXg][inet[/192.168.2.101:9300]]], master [[Bastion][5S439--
dRIK8ELlKvBxbXg][inet[/192.168.2.101:9300]]],
cluster_name[elasticsearch]} with no matching id [1]

My IP address is 192.168.1.113, but I usually connect to
elasticsearch(right now I am developing) in localhost:9200.
What has happened? Could be it a problem with IP addresses? Network
has not changed.

And one more thing, how does elasticsearch discover which IP address
should it bind on?

On Wed, Aug 10, 2011 at 10:45 AM, tania yosoytha...@hotmail.com wrote:

Like I do every morning, I started my local elasticsearch server but
today it throws and error and it is impossible to connect to it:

$ bin/elasticsearch -f
[2011-08-10 09:32:49,791][INFO ][node ]
[Battletide] {elasticsearch/0.17.3}[4017]: initializing ...
[2011-08-10 09:32:49,798][INFO ][plugins ]
[Battletide] loaded , sites
[2011-08-10 09:32:51,718][INFO ][node ]
[Battletide] {elasticsearch/0.17.3}[4017]: initialized
[2011-08-10 09:32:51,718][INFO ][node ]
[Battletide] {elasticsearch/0.17.3}[4017]: starting ...
[2011-08-10 09:32:51,808][INFO ][transport ]
[Battletide] bound_address {inet[/0.0.0.0:9300]}, publish_address
{inet[/192.168.1.113:9300]}
[2011-08-10 09:33:21,935][WARN ][discovery ]
[Battletide] waited for 30s and no initial state was set by the
discovery
[2011-08-10 09:33:21,936][INFO ][discovery ]
[Battletide] elasticsearch/I14Q2RtrSN2XE9hS-LVxLQ
[2011-08-10 09:33:22,164][INFO ][http ]
[Battletide] bound_address {inet[/0.0.0.0:9200]}, publish_address
{inet[/192.168.1.113:9200]}
[2011-08-10 09:33:22,165][INFO ][node ]
[Battletide] {elasticsearch/0.17.3}[4017]: started
[2011-08-10 09:33:24,991][WARN ][discovery.zen ]
[Battletide] failed to connect to master [[Bastion][5S439--
dRIK8ELlKvBxbXg][inet[/192.168.2.101:9300]]], retrying...
org.elasticsearch.transport.ConnectTransportException: [Bastion][inet[/
192.168.2.101:9300]] connect_timeout[30s]
at

org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:
562)
at

org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:
505)
at

org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:
484)
at

org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:
121)
at

org.elasticsearch.discovery.zen.ZenDiscovery.innterJoinCluster(ZenDiscovery.java:
283)
at org.elasticsearch.discovery.zen.ZenDiscovery.access
$500(ZenDiscovery.java:69)
at org.elasticsearch.discovery.zen.ZenDiscovery
$1.run(ZenDiscovery.java:239)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.net.ConnectException: connection timed out
at

org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink
$Boss.processConnectTimeout(NioClientSocketPipelineSink.java:371)
at

org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink
$Boss.run(NioClientSocketPipelineSink.java:283)
at

org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:
108)
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker
$1.run(DeadLockProofWorker.java:44)
... 3 more

If I try to connect through the API it says:
Response: 500 Internal Server Error
{"error":"MasterNotDiscoveredException","status":500}

12 hours ago it was working perfectly. I am using elasticsearch
0.17.3. What has happened? I have tried upgrading to elasticsearch
0.17.4 in case it was a bug or something, but no luck. What can I do
to solve it? Thanks!

the node by default binds to 0.0.0.0, and derives the publish host as the
first non loopback one (thats the address other nodes will connect to it).

On Wed, Aug 10, 2011 at 4:28 PM, tania yosoythania@hotmail.com wrote:

On 10 ago, 12:27, Shay Banon kim...@gmail.com wrote:

Is this a client node that you are starting? It seems to fail to connect
to
your running elasticsearch instance server on
192.168.2.101http://192.168.2.101:9300/,
is it up? Which address did it bind on?

Well, I start elasticsearch just with bin/elasticsearch, which starts
one node. I haven't done any more configuration (I haven´t changed a
line in config/elasticsearch.yml).

Now I have retried starting elasticsearch and it works.

$bin/elasticsearch -f
[2011-08-10 12:23:44,174][INFO ][node ] [Sun Girl]
{elasticsearch/0.17.4}[17288]: initializing ...
[2011-08-10 12:23:44,225][INFO ][plugins ] [Sun Girl]
loaded , sites
[2011-08-10 12:23:49,397][INFO ][node ] [Sun Girl]
{elasticsearch/0.17.4}[17288]: initialized
[2011-08-10 12:23:49,397][INFO ][node ] [Sun Girl]
{elasticsearch/0.17.4}[17288]: starting ...
[2011-08-10 12:23:49,613][INFO ][transport ] [Sun Girl]
bound_address {inet[/0.0.0.0:9300]}, publish_address {inet[/
192.168.1.113:9300]}
[2011-08-10 12:23:53,023][INFO ][cluster.service ] [Sun Girl]
new_master [Sun Girl][0qnkZmXlRV-B07rCnXi0yQ][inet[/
192.168.1.113:9300]], reason: zen-disco-join (elected_as_master)
[2011-08-10 12:23:53,115][INFO ][discovery ] [Sun Girl]
elasticsearch/0qnkZmXlRV-B07rCnXi0yQ
[2011-08-10 12:23:53,164][INFO ][http ] [Sun Girl]
bound_address {inet[/0.0.0.0:9200]}, publish_address {inet[/
192.168.1.113:9200]}
[2011-08-10 12:23:53,187][INFO ][node ] [Sun Girl]
{elasticsearch/0.17.4}[17288]: started
[2011-08-10 12:23:53,204][INFO ][gateway ] [Sun Girl]
recovered [0] indices into cluster_state
[2011-08-10 12:24:12,012][WARN ][discovery.zen.ping.multicast] [Sun
Girl] received ping response ping_response{target [[Bastion][5S439--
dRIK8ELlKvBxbXg][inet[/192.168.2.101:9300]]], master [[Bastion][5S439--
dRIK8ELlKvBxbXg][inet[/192.168.2.101:9300]]],
cluster_name[elasticsearch]} with no matching id [1]

My IP address is 192.168.1.113, but I usually connect to
elasticsearch(right now I am developing) in localhost:9200.
What has happened? Could be it a problem with IP addresses? Network
has not changed.

And one more thing, how does elasticsearch discover which IP address
should it bind on?

On Wed, Aug 10, 2011 at 10:45 AM, tania yosoytha...@hotmail.com wrote:

Like I do every morning, I started my local elasticsearch server but
today it throws and error and it is impossible to connect to it:

$ bin/elasticsearch -f
[2011-08-10 09:32:49,791][INFO ][node ]
[Battletide] {elasticsearch/0.17.3}[4017]: initializing ...
[2011-08-10 09:32:49,798][INFO ][plugins ]
[Battletide] loaded , sites
[2011-08-10 09:32:51,718][INFO ][node ]
[Battletide] {elasticsearch/0.17.3}[4017]: initialized
[2011-08-10 09:32:51,718][INFO ][node ]
[Battletide] {elasticsearch/0.17.3}[4017]: starting ...
[2011-08-10 09:32:51,808][INFO ][transport ]
[Battletide] bound_address {inet[/0.0.0.0:9300]}, publish_address
{inet[/192.168.1.113:9300]}
[2011-08-10 09:33:21,935][WARN ][discovery ]
[Battletide] waited for 30s and no initial state was set by the
discovery
[2011-08-10 09:33:21,936][INFO ][discovery ]
[Battletide] elasticsearch/I14Q2RtrSN2XE9hS-LVxLQ
[2011-08-10 09:33:22,164][INFO ][http ]
[Battletide] bound_address {inet[/0.0.0.0:9200]}, publish_address
{inet[/192.168.1.113:9200]}
[2011-08-10 09:33:22,165][INFO ][node ]
[Battletide] {elasticsearch/0.17.3}[4017]: started
[2011-08-10 09:33:24,991][WARN ][discovery.zen ]
[Battletide] failed to connect to master [[Bastion][5S439--
dRIK8ELlKvBxbXg][inet[/192.168.2.101:9300]]], retrying...
org.elasticsearch.transport.ConnectTransportException: [Bastion][inet[/
192.168.2.101:9300]] connect_timeout[30s]
at

org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:

  1. at

org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:

  1. at

org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:

  1. at

org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:

  1. at

org.elasticsearch.discovery.zen.ZenDiscovery.innterJoinCluster(ZenDiscovery.java:

  1. at org.elasticsearch.discovery.zen.ZenDiscovery.access
    $500(ZenDiscovery.java:69)
    at org.elasticsearch.discovery.zen.ZenDiscovery
    $1.run(ZenDiscovery.java:239)
    at java.util.concurrent.ThreadPoolExecutor
    $Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor
    $Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
    Caused by: java.net.ConnectException: connection timed out
    at

org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink

$Boss.processConnectTimeout(NioClientSocketPipelineSink.java:371)
at

org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink

$Boss.run(NioClientSocketPipelineSink.java:283)
at

org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:

  1. at
    org.elasticsearch.common.netty.util.internal.DeadLockProofWorker
    $1.run(DeadLockProofWorker.java:44)
    ... 3 more

If I try to connect through the API it says:
Response: 500 Internal Server Error
{"error":"MasterNotDiscoveredException","status":500}

12 hours ago it was working perfectly. I am using elasticsearch
0.17.3. What has happened? I have tried upgrading to elasticsearch
0.17.4 in case it was a bug or something, but no luck. What can I do
to solve it? Thanks!