ElasticSearch node shutdown problem

(Rishabh Poddar) #1

Hi. I am quite new to elastic search. However, after playing with it for sometime, I noticed a problem:
(I tested the below procedure on Mac OS X as well as Ubuntu 14.04 and they both showed the same problem)

I started an instance of elastic search, call it instance1, on localhost. I then ran the following command: curl -X GET This showed me that one node was alive. All well. I then started another instance, instance2, on the same machine and re-ran the same curl command and got 2 nodes were alive. This is all as expected. I then shut down instance1 (instance2 was still running) and ran the curl command. This should have shown me that 1 node is alive, however it showed curl: (7) Failed to connect to port 9200: Connection refused.

Also, for more information, I did the same procedure all over again and instead of shutting down instance1, I shut down instance2 and then ran the curl command. Here I had no problems and it showed that 1 node was alive. So I think this problem occurs only when the initial instance is shut down.

Is this a bug or am I doing something wrong?

(Mark Walkom) #2

When you start the second node you will notice that it runs on port 9201 and 9301, because the first instance takes 9200/9300.

So if you run after shutting down the first node you will get a response.

(Rishabh Poddar) #3

Thank you.

(system) #4