_cluster/health is returning 404

Hi,

I have installed elasticsearch in ubuntu and have set the following
http.host : 0.0.0.0
http.bind_host: 0.0.0.0
http.cors.allow-origin: "*"
http.cors.enabled : true

Am using _cluster/health api

When I do curl http://localhost:9200/_cluster/health it is returning results .

When I do the same from browser passing IP http://IPADDRESS:9200/_cluster/health it is not returning anything. (404 - This site can’t be reached)

However , both http://localhost:9200, http://IPADDRESS:9200 is returning the default elasticsearch response ."You Know, for Search"

This issue is happening even with _cluster/stats api

@Igor_Motov Can you please help with this ?

it is not returning anything, 404 and This site can’t be reached are 3 completely different conditions. Can you be a bit more precise here? For example, what do you get when you run

curl -v http://IPADDRESS:9200/_cluster/health

When I try curl am getting the following response

  HTTP/1.1 200 OK
content-type: application/json; charset=UTF-8
content-length: 389
 Connection #0 to host <<IPADDRESS>> left intact
{"cluster_name":"elasticsearch","status":"green","timed_out":false,"number_of_no                                                                             des":1,"number_of_data_nodes":1,"active_primary_shards":0,"active_shards":0,"rel                                                                             ocating_shards":0,"initializing_shards":0,"unassigned_shards":0,"delayed_unassig                                                                             ned_shards":0,"number_of_pending_tasks":0,"number_of_in_flight_fetch":0,"task_ma                                                                             x_waiting_in_queue_millis":0,"active_shards_percent_as_number":100.0}

When I hit the same in the browser am getting This site can't be reached .The connection was reset

Note : When I just use http://IPADDRESS:9200 instead of using http://IPADDRESS:9200/_cluster/health am getting response in the browser

Perhaps, you have have some proxy settings or some other issues with your browser that prevent you from reaching the server. You can try analyzing the traffic between your server and the browser using wireshark or browser's development tools to see where the requests is actually getting sent and what you get back in response in both cases (when it works and when it doesn't work).

Yeah I will try that out . But when I try apis such as (http://ipaddress:9200/_node/stats) or
http://IPADDRESS:9200/INDEX/ in the browser its giving response .

I am seeing this issue when I use the cluster endpoint mainly

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.