使用elasticsearch的marvel插件sense报错

今天安装了ES的marvel插件,然后用sense查询,查询内容如下: GET 9_worker_20150821/9_worker/_search { "size": 1 }出现如下错误: Request failed to get to the server (status code: 0): Elasticsearch may not be reachable or you may need to check your CORS settings.If CORS is enabled, try turning off Sense's Basic Authentication support under Setting (cog icon).This will result in a less strict CORS enforcement by the browser. Please check the marvel documentation for more information.
已邀请:

空心菜 - 心向阳光,茁壮成长

赞同来自: OpenSkill Ansible

出现这个问题应该可能有两个原因:
1.输入框地址输入错误,如下图所示
[attach]168[/attach]
2.ES配置文件设置问题
如果您使用的是访问远程集群,您将需要确保跨源资源共享(CORS)启用集群。相关设置:
http.cors.enabled: true
http.cors.allow-origin: /.*/
http.cors.allow-credentials: true[attach]169[/attach]
介绍:https://www.elastic.co/guide/en/marvel/current/configuration.html#cors

Ansible - 项目实施 系统工程师

谢谢,问题已经解决,是我输入框地址填写错误,因为我使用了代理,如果填写为http://localhost:9200是不行的。

要回复问题请先登录注册