GOOGLE cloud ES cluster are not able to access from outside

Hi All,

I have installed ES 2.4.5 in google cloud VM and the ES instances are up and running fine without issues.

But i couldn't able to access it from outside and below is the URL i am trying access it in the browser.
http://10.128.0.4:9200

Error throwing as,
This site can’t be reached

10.128.0.4 took too long to respond.
Search Google for 128 9200
ERR_CONNECTION_TIMED_OUT

I have installed GCE Plugin in each node and restarted the ES and the following config changes were added in the elasticsearch.yml file,

cloud:
  gce:
      project_id: tribal-firefly-170712
      zone: us-central1-c
discovery:
      type: gce
network.host: _gce_

I can able to access the ES using the curl command, but not able to access in the browser

babu.ganesh0708@esgraylog1:~/elasticsearch-2.4.5/bin$ curl -XGET 'http://10.128.0.4:9200/_cluster/health?pretty=true'
{
"cluster_name" : "ES_GRAYLOG_DEV",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 0,
"active_primary_shards" : 0,
"active_shards" : 0,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}

Please correct me if i am doing anything wrong in the configuration changes.
It would be really helpful.

Thanks,
Ganeshbabu R

I guess you ran the curl command from the machine where elasticsearch is running, right?

May be you did not open port 9200 to internet on GCP? (Well this is dangerous to do)

Yes @dadoonet I ran the command from the machine.

So you want me to add the new firewall rule in the GCP so that it can be accessible from outside.

Based on the documentation it looks like _gce_ binds to the private IP only. Where are you trying to connect from?

Hi @Christian_Dahlqvist

Below are the Internal IP -> 10.128.0.4 & External IP -> 104.154.145.13 of my Google cloud Platform.

After the ES started the following logs are generated,

[2017-06-20 12:03:04,455][INFO ][node                     ] [esgraylog1_DEV_DATA] initialized
[2017-06-20 12:03:04,455][INFO ][node                     ] [esgraylog1_DEV_DATA] starting ...
[2017-06-20 12:03:05,290][INFO ][transport                ] [esgraylog1_DEV_DATA] publish_address {10.128.0.4:9301}, bound_addresses {10.128.0.4:9301}
[2017-06-20 12:03:05,302][INFO ][discovery                ] [esgraylog1_DEV_DATA] ES_GRAYLOG_DEV/crNzuNGiRKyiEWqKYmYIFQ
[2017-06-20 12:03:05,357][INFO ][cloud.gce                ] [esgraylog1_DEV_DATA] starting GCE discovery service
[2017-06-20 12:03:06,293][WARN ][cloud.gce                ] [esgraylog1_DEV_DATA] Problem fetching instance list for zone us-central1-c
[2017-06-20 12:03:06,293][WARN ][cloud.gce                ] [esgraylog1_DEV_DATA] disabling GCE discovery. Can not get list of nodes
[2017-06-20 12:03:17,394][INFO ][cloud.gce                ] [esgraylog1_DEV_MASTER] starting GCE discovery service
[2017-06-20 12:03:17,450][WARN ][cloud.gce                ] [esgraylog1_DEV_MASTER] Problem fetching instance list for zone us-central1-c
[2017-06-20 12:03:17,450][WARN ][cloud.gce                ] [esgraylog1_DEV_MASTER] disabling GCE discovery. Can not get list of nodes
[2017-06-20 12:03:21,327][INFO ][cloud.gce                ] [esgraylog1_DEV_DATA] starting GCE discovery service
[2017-06-20 12:03:21,391][WARN ][cloud.gce                ] [esgraylog1_DEV_DATA] Problem fetching instance list for zone us-central1-c
[2017-06-20 12:03:21,391][WARN ][cloud.gce                ] [esgraylog1_DEV_DATA] disabling GCE discovery. Can not get list of nodes
[2017-06-20 12:03:30,134][WARN ][discovery                ] [esgraylog1_DEV_MASTER] waited for 30s and no initial state was set by the discovery
[2017-06-20 12:03:30,173][INFO ][http                     ] [esgraylog1_DEV_MASTER] publish_address {10.128.0.4:9200}, bound_addresses {10.128.0.4:9200}

So after ES instance started I tried accessing from the chrome browser with the URL -- http://10.128.0.4:9200 to check the ES node details from outside.

Please correct me if i am doing anything wrong.

Regards,
Ganeshbabu R

Hi @dadoonet

I tried adding the new firewall setup in the GCP but still i am unable to access from outside

Below are the screenshot of Firewall rules GCP

Could you please help me to resolve this issue?

Thanks,
Ganeshbabu R

I wonder if you should try this instead:

network.host: _gce:hostname_

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