Elasticsearch Failed connect to localhost:9200; Connection refused

August 9, 2017 104 views
Elasticsearch CentOS

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.

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...

Have another answer? Share your knowledge.