Support Questions

Find answers, ask questions, and share your expertise

How to install or start Elasticsearch in HDP 2.4 sandbox

avatar
Contributor

I have tried to install the Elastcsearch from https://www.elastic.co/downloads/elasticsearch as well as Kibana. i placed the both the file in Desktop and when i tried to start the service by command ./elasticsearch . It showing the right downloaded version as started .But when i checks the in ui http://100.96.156.198:9200/ it shows the older version ..Due to which Kibana unable to start ..I have performed the same step in Clouderaquickstart vm everything works perfect.I have tried to follow the step in https://github.com/Symantec/ambari-elasticsearch-service but still no luck. I placed the downloaded version this time in "/var/lib/ambari-server/resources/stacks/HDP/${hdp.version}/services/ELASTICSEARCH/"

{
  "status" : 200,
  "name" : "Captain Barracuda",
  "version" : {
    "number" : "1.2.1",
    "build_hash" : "6c95b759f9e7ef0f8e17f77d850da43ce8a4b364",
    "build_timestamp" : "2014-06-03T15:02:52Z",
    "build_snapshot" : false,
    "lucene_version" : "4.8"
  },
  "tagline" : "You Know, for Search"
}
1 ACCEPTED SOLUTION

avatar

Hi @Indrajit swain,

You are hitting the ElasticSearch that Atlas is running in background for its operations. This is why you get an older version of ES when you curl port 9200.

To check it, stop your ES instance and check if you have something listening to port 9200

netstat -npl | grep 9200

You should still have something listening even when your ES is down.

You can see the configuration of existing ES in Atlas configuration in Ambari

4076-screen-shot-2016-05-06-at-65847-pm.png

When ES starts and find its port used (9200) it picks the next available one. So your ES instance will be running on port 9201. You can see it in the starting logs (like in my example) :

[2016-05-06 17:09:41,452][INFO ][http                     ] [Speedball] publish_address {127.0.0.1:9201}, bound_addresses {127.0.0.1:9201}

You can try to curl the two ports to test:

[root@sandbox ~]# curl localhost:9200
{
  "status" : 200,
  "name" : "Gravity",
  "version" : {
    "number" : "1.2.1",
    "build_hash" : "6c95b759f9e7ef0f8e17f77d850da43ce8a4b364",
    "build_timestamp" : "2014-06-03T15:02:52Z",
    "build_snapshot" : false,
    "lucene_version" : "4.8"
  },
  "tagline" : "You Know, for Search"
}
[root@sandbox ~]# curl localhost:9201
{
  "name" : "Speedball",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "2.3.2",
    "build_hash" : "b9e4a6acad4008027e4038f6abed7f7dba346f94",
    "build_timestamp" : "2016-04-21T16:03:47Z",
    "build_snapshot" : false,
    "lucene_version" : "5.5.0"
  },
  "tagline" : "You Know, for Search"
}

You can also change the port of ES to something you want in the yaml file.

Hope this helps

View solution in original post

1 REPLY 1

avatar

Hi @Indrajit swain,

You are hitting the ElasticSearch that Atlas is running in background for its operations. This is why you get an older version of ES when you curl port 9200.

To check it, stop your ES instance and check if you have something listening to port 9200

netstat -npl | grep 9200

You should still have something listening even when your ES is down.

You can see the configuration of existing ES in Atlas configuration in Ambari

4076-screen-shot-2016-05-06-at-65847-pm.png

When ES starts and find its port used (9200) it picks the next available one. So your ES instance will be running on port 9201. You can see it in the starting logs (like in my example) :

[2016-05-06 17:09:41,452][INFO ][http                     ] [Speedball] publish_address {127.0.0.1:9201}, bound_addresses {127.0.0.1:9201}

You can try to curl the two ports to test:

[root@sandbox ~]# curl localhost:9200
{
  "status" : 200,
  "name" : "Gravity",
  "version" : {
    "number" : "1.2.1",
    "build_hash" : "6c95b759f9e7ef0f8e17f77d850da43ce8a4b364",
    "build_timestamp" : "2014-06-03T15:02:52Z",
    "build_snapshot" : false,
    "lucene_version" : "4.8"
  },
  "tagline" : "You Know, for Search"
}
[root@sandbox ~]# curl localhost:9201
{
  "name" : "Speedball",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "2.3.2",
    "build_hash" : "b9e4a6acad4008027e4038f6abed7f7dba346f94",
    "build_timestamp" : "2016-04-21T16:03:47Z",
    "build_snapshot" : false,
    "lucene_version" : "5.5.0"
  },
  "tagline" : "You Know, for Search"
}

You can also change the port of ES to something you want in the yaml file.

Hope this helps