首页 > 其他 > 详细

Elastic Search添加X-Pack插件后,head无法访问的问题

时间:2018-01-04 18:51:23      阅读:436      评论:0      收藏:0      [点我收藏+]

版本5.4.1

最近调试ElasticSearch集群时,为了监控方便部署了X-Pack,然后因为验证的问题,head无法正确连接集群了。

查了一些中文资料给出的方法是在elasticsearch.yml中添加如下三行

(1)

http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization

然后用(2)

http://localhost:9100/?auth_user=elastic&auth_password=changeme

的方式访问head,发现并不能解决问题,依然还是无法连接。

研究后发现,需要将上面的elasticsearch.yml中的三行变更为

(3)

http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type 

 此后可以正确通过(2)的访问方式访问head,成功连接,问题解决

Elastic Search添加X-Pack插件后,head无法访问的问题

原文:https://www.cnblogs.com/zym1414/p/8194948.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!