1

I downloaded elasticsearch-5.6.3 the other day and added it to a rails project. On this project I added full-text search.

Today I wanted to get the elasticsearch-head plugin but plugins aren't supported in this version so I git cloned git://github.com/mobz/elasticsearch-head.git and then opened index.html in my browser.

The top of my page says cluster health: not connected.

I edited the elasticsearch.yml to uncomment and give names to both cluster.name and node.name. I can verify these were set at http://localhost:9200/.

What step am I missing to connect my cluster?

user9503053
  • 107
  • 3
  • 15

2 Answers2

3

There are few things which you can check, with Elasticsearch 5.x.x version onwards you need to use Head plugin as a standalone server. To do so you can use the following steps (Considering you have installed via Git)

  1. Run the command - npm install
  2. Run the command - npm run start (This will start head as a standalone server)

Also, in elastic search.yml file please add the following 2 properties if not added-

http.cors.enabled: true

http.cors.allow-origin: "*"

After adding these properties restart the elastic search and now you would be able to connect to the cluster via head.

Yuvraj Gupta
  • 2,475
  • 16
  • 26
  • Thank you, I don't have either of those properties in elasticsearch.yml. Do you know where in the file they go? There are sections for Cluster, Node, Paths, Memory, Network, Discovery, and Gateway. – user9503053 Nov 07 '17 at 16:00
  • I went ahead and tried adding the two configs under Various and my clusters are showing in elasticsearch-head now! Thank you! The only thing I did differently was not use npm. I git cloned the repo and then opened index.html in the browser. – user9503053 Nov 07 '17 at 16:16
  • Thanks! I created a pull request to include these instructions in the manual: https://github.com/mobz/elasticsearch-head/pull/370 – Nicolas Raoul Nov 08 '17 at 05:59
0

Can you check http.cors.enabled and http.cors.allow-origin in your configuration. they might be blocking requests.

ssdev
  • 11
  • 2