Cannot check clusters health

#1

Hello guys, I installed “Open Distro for Elasticsearch” via RPM package on Centos 7. Followed those basic steps from the documentation. Everything went fine. The problem now is that when I try to check clusters health with the command:
curl localhost:9200/_cluster/health?pretty=true
I get an empty response:
curl: (52) Empty reply from server
So I guess something is not working? Or I do not know something? That’s also possible because I’m quite new to Elasticsearch.

I also just for comparison installed “original” Elasticsearch and run this curl check, and get a good informative response.

UPDATE:
ok, I’m getting somewhere with this. Problem is that curl is working via HTTP and now as I understand Open Distro for Elasticsearch is set for HTTPS. So I think that is why I am getting an empty response. So I set this line to false in elasticsearch.yaml:
opendistro_security.ssl.http.enabled: false
and now instead of empty I get Unauthorized response. So as I understand I need to allow some kind off anonymous access…

#2

Hi @genericsimon if you are using the default configuration, you will need to authenticate with the server. Try the following:

curl -XGET localhost:9200/_cluster/health?pretty=true -u admin:admin --insecure
#3

Thank you @elifish, it works. I tried Elasticsearch before and I thought that same commands will work for Open Distro. But I’m a noob and I forgot that I used Elasticsearch without xpack plugin, without security stuff. So yeah, thank you again.

#4

@genericsimon, awesome! Glad to hear things are now working :slight_smile:

#5

So I needed to create new cluster and unfortunately again starting to have the same issue. This time when i use command:
curl -XGET localhost:9200/_cluster/health?pretty=true -u admin:admin --insecure

Tailing the log file I can see this error:
...speaks http plaintext instead of ssl, will close the channel

Maybe there is another way to check the status of my cluster, like how many nodes I have and etc?

#6

I had that issue too. Try adding https:// before your url

1 Like
#7

Thank you @ecklf it does the job. Really simple, stupid me :slight_smile: