Question

Elasticsearch Failed connect to localhost:9200; Connection refused

Posted August 9, 2017 6.2k views
CentOSElasticsearch

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.

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.

×
1 answer

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/differentmedia]
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…

Submit an Answer