Cluster name in config file not updated (first install)


(Ebarrier) #1

Hi,
I am running Ubuntu 16.04 LTS.
I have started to install Graylog which need Elasticsearch, following this tutorial (http://docs.graylog.org/en/2.1/pages/installation/os/ubuntu.html).
As it says, in the /etc/elasticsearch/elasticsearch.yml config file, I set "graylog" as for cluster.name.

But when I do curl 'localhost:9200' I get the output

"name" : "Topaz", "cluster_name" : "elasticsearch", ...

The cluster name is not the one I have set up.

Doing systemctl daemon-reload or systemctl enable elasticsearch.service or systemctl start elasticsearch.service does not fix it.

I cannot find any similar problem on internet. I guess the fix is super easy but I can't figure it out.
Thanks in advance


(Daniel Mitterdorfer) #2

Hi @ebarrier,

is it possible that you have another Elasticsearch process running on this machine? Can you just stop your server and check if you still get a response? If yes, then somewhere on your system another Elasticsearch process is still running. Alternatively you can also check with ps.

Daniel


(Ebarrier) #3

Thank you for your response Daniel.
With ps aux I could find only one process called "elastic+".
After killing it, curl 'localhost:9200'did not work as expected (Connection refused).


(Daniel Mitterdorfer) #4

Hi @ebarrier,

ok, this means you don't have another process running, that's good. Does Elasticsearch pick up the new name now after you've started it again?

Daniel


(Ebarrier) #5

Unfortunately no.
Reloading or restarting the service does not show me the cluster name that I have written in the config file.


(Daniel Mitterdorfer) #6

Hi @ebarrier,

ok, just double checking: You did install Elasticsearch from the deb package, didn't you? Can you please set temporarily in your elasticsearch.yml:

http.port: 10200

Then restart the node and issue curl 'localhost:10200'? I am just curious whether this is the correct config file (it should be for the deb package...).

Daniel


(Ebarrier) #7

Thanks Daniel, I found my mistake (very stupid and trivial as I assumed...).
I searched my disk for all files that could be duplicated but nothing. There is only one conf file as it should be.
I changed the config file with port 10200 like you said, but port 9200 works, not 10200. So the config was ignored somehow.

Then it hit me that the lines were still commented out... So stupid...
Thank you for your time Daniel, you put my mind on the right tracks.
I hope at least I made you laugh a bit : )


(Daniel Mitterdorfer) #8

Hi @ebarrier,

we've all been there, no worries.

Oh, yes. :slight_smile:

Good luck now!

Daniel


(system) #9