4

I have elasticsearch running on EC2 (Fedora),

I am unable to connect externally using the public ip or hostname.

ElasticSearch starts correctly and I can access locally on the machine using: curl -XGET http://localhost:9200

{
  "name" : "Prodigy",
  "cluster_name" : "awstutorialseries",
  "version" : {
    "number" : "2.1.0",
    "build_hash" : "72cd1f1a3eee09505e036106146dc1949dc5dc87",
    "build_timestamp" : "2015-11-18T22:40:03Z",
    "build_snapshot" : false,
    "lucene_version" : "5.3.1"
  },
  "tagline" : "You Know, for Search"
}

And I do follow all the steps explained here: elasticsearch on Ec2 cannot hit public IP(timeout)

like

  1. Do what TJ said in his comment, + restart the instance. I wasn't sure if this was/is necessary, but I did it for good measure.
  2. I made sure that the following is set in the elasticsearch.yml file: a. http.enabled: true b. http.cors.enabled: true c. http.cors.allow-origin: "*"
  3. Restarted elasticsearch (service elasticsearch restart)

I can connect kibanaenter image description here But I can't connect to elasticsearchenter image description here

my inbound and outbound are wide open for this instance:enter image description here enter image description here

this is my elasticsearch.yml file enter image description here

Community
  • 1
  • 1
ck reddy
  • 494
  • 7
  • 17

1 Answers1

0

For EC2 you need to install the AWS Plugin that is provided by elasticsearch. Once plugin is installed, you need to generate secret-key and access-key from EC2. This link should help you generate the required keys. After this you need to configure following settings in your elasticsearch.yml : network.host: ec2,network.publish_host: "", discovery.type: ec2,cloud.aws.access_key: , cloud.aws.secret_key: ,discovery.ec2.groups: ,discovery.ec2.host_type: "public_ip", discovery.ec2.ping_timeout: "10s"

This should get you up and running. Connect from your client using the ip address of your machine.