[英]Elasticsearch-head cluster health: not connected
I downloaded elasticsearch-5.6.3 the other day and added it to a rails project.我前几天下载了 elasticsearch-5.6.3 并将其添加到一个 rails 项目中。 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.今天我想获得elasticsearch-head插件,但这个版本不支持插件,所以我git克隆了git://github.com/mobz/elasticsearch-head.git,然后在我的浏览器中打开了index.html。
The top of my page says cluster health: not connected
.我的页面顶部显示cluster health: not connected
。
I edited the elasticsearch.yml to uncomment and give names to both cluster.name and node.name.我编辑了 elasticsearch.yml 以取消注释并为 cluster.name 和 node.name 命名。 I can verify these were set at http://localhost:9200/ .我可以验证这些设置在http://localhost:9200/ 。
What step am I missing to connect my cluster?我缺少连接集群的哪一步?
There are few things which you can check, with Elasticsearch 5.xx version onwards you need to use Head plugin as a standalone server.您可以检查的内容很少,从 Elasticsearch 5.xx 版本开始,您需要将 Head 插件用作独立服务器。 To do so you can use the following steps (Considering you have installed via Git)为此,您可以使用以下步骤(考虑到您已通过 Git 安装)
Also, in elastic search.yml file please add the following 2 properties if not added-另外,在 elasticsearch.yml 文件中,如果没有添加,请添加以下 2 个属性 -
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.添加这些属性后,重新启动弹性搜索,现在您可以通过 head 连接到集群。
Can you check http.cors.enabled and http.cors.allow-origin in your configuration.你能在你的配置中检查 http.cors.enabled 和 http.cors.allow-origin 吗? they might be blocking requests.他们可能会阻止请求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.