Question

Elasticsearch Failed connect to localhost:9200; Connection refused

Hi,

I’ve installed my centos 7, elasticsearch. from this docs; https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-elasticsearch-on-centos-7.

All the conf are the same as shown. But when ı TRY to curl -X GET ‘http://localhost:9200’.

There’s an error as; Failed connect to localhost:9200; Connection refused

What could be the problem and how to solve this? Couldnt understand whats wrong. Everything is the same as tutorial.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

here’s log:

Aug 09 06:59:46 elasticsearch systemd[1]: Started Elasticsearch. Aug 09 06:59:46 elasticsearch systemd[1]: Starting Elasticsearch… Aug 09 07:03:28 elasticsearch systemd[1]: Stopping Elasticsearch… Aug 09 07:03:28 elasticsearch systemd[1]: Started Elasticsearch. Aug 09 07:03:28 elasticsearch systemd[1]: Starting Elasticsearch… Aug 09 07:03:29 elasticsearch elasticsearch[9511]: {1.7.3}: Initialization Failed … Aug 09 07:03:29 elasticsearch elasticsearch[9511]: - ElasticsearchIllegalStateException[Failed to created node environment] Aug 09 07:03:29 elasticsearch elasticsearch[9511]: AccessDeniedException[/media/different_media] Aug 09 07:03:29 elasticsearch systemd[1]: elasticsearch.service: main process exited, code=exited, status=3/NOTIMPLEMENTED Aug 09 07:03:29 elasticsearch systemd[1]: Unit elasticsearch.service entered failed state. Aug 09 07:03:29 elasticsearch systemd[1]: elasticsearch.service failed. Aug 09 07:03:54 elasticsearch systemd[1]: Started Elasticsearch. Aug 09 07:03:54 elasticsearch systemd[1]: Starting Elasticsearch… Aug 09 07:03:55 elasticsearch elasticsearch[9558]: {1.7.3}: Initialization Failed … Aug 09 07:03:55 elasticsearch elasticsearch[9558]: - ElasticsearchIllegalStateException[Failed to created node environment] Aug 09 07:03:55 elasticsearch elasticsearch[9558]: AccessDeniedException[/media/different_media] Aug 09 07:03:55 elasticsearch systemd[1]: elasticsearch.service: main process exited, code=exited, status=3/NOTIMPLEMENTED Aug 09 07:03:55 elasticsearch systemd[1]: Unit elasticsearch.service entered failed state. Aug 09 07:03:55 elasticsearch systemd[1]: elasticsearch.service failed. Aug 09 07:18:26 elasticsearch systemd[1]: Started Elasticsearch. Aug 09 07:18:26 elasticsearch systemd[1]: Starting Elasticsearch…