elasticsearch安装
kibana 安装
坑1:elasticsearch head插件连接es跨域问题
在使用es的head插件时,默认的9100,需要访问es的默认端口9200时,会出现跨域问题,此时只需要修改一下es的配置文件即可。
在elasticsearch.yml中添加开启跨域的配置:
http.cors.enabled: true --是否开启跨域
http.cors.allow-origin: "*" --允许谁访问,* 号是通配符
如果在使用 elasticsearch-head 还是存在跨域的问题,则可以在elasticsearch.yml配置文件继续追加配置
http.cors.allow-methods: OPTIONS,HEAD,GET,POST,PUT,DELETE
http.cors.allow-headers: Content-Type,Accept,Authorization,x-requested-with
坑2:kibana启动报索引已存在
报错内容:
Unable to connect to Elasticsearch. Error: [resource_already_exists_exception] index [.kibana_2/MrSoAJnDTxm0AxsQGk-SZg] already exists, with { index_uuid="MrSoAJnDTxm0AxsQGk-SZg" & index=".kibana_2" }
解决方法一:在elasticsearch head中删除重复索引
解决方法二:curl -X DELETE http://localhost:9200/.kibana*
参考文档一
参考文档二
813

被折叠的 条评论
为什么被折叠?



