elasticsearch - 连接到elasticsearch集群时docker ELK stack的Search-guard插件出现问题
问题描述
几分钟前,我search guard branch
从这里克隆,我想尽一切办法README
。
在docker-compose up -d
所有服务正常运行后,elasticsearch_1
每隔几秒记录一个错误:
弹性搜索_1 | [2018-09-14T08:59:49,614][ERROR][cfsaBackendRegistry] 尚未初始化(您可能需要运行 sgadmin)
之后我运行docker-compose exec -T elasticsearch bin/init_sg.sh
,输出:
Search Guard Admin v6
Will connect to localhost:9300 ... done
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/usr/share/elasticsearch/plugins/search-guard-6/netty-common-4.1.16.Final.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Elasticsearch Version: 6.3.2
Search Guard Version: 6.3.2-23.0
Connected as CN=kirk,OU=client,O=client,L=Test,C=DE
Contacting elasticsearch cluster 'elasticsearch' and wait for YELLOW clusterstate ...
ERR: Timed out while waiting for a green or yellow cluster state.
* Try running sgadmin.sh with -icl (but no -cl) and -nhnv (If that works you need to check your clustername as well as hostnames in your TLS certificates)
* Make also sure that your keystore or PEM certificate is a client certificate (not a node certificate) and configured properly in elasticsearch.yml
* If this is not working, try running sgadmin.sh with --diagnose and see diagnose trace log file)
* Add --accept-red-cluster to allow sgadmin to operate on a red cluster.
我猜想 sgadmin 无法连接到 elasticsearch 集群,但我确实按照自述文件所说的那样做。
任何建议如何解决这个问题?感谢您的回答。
解决方案
我已经解决了这个问题。你的产品,工作得很好。我的索引 win Kibana 有错误,它使elasticsearch cluster
红色状态 - 从不黄色。
如果你想在不等待黄色状态的情况下连接你sgadmin
的使用 line:在脚本中:elasticsearch cluster
--accept-red-cluster
init_sg.sh
#!/bin/sh
plugins/search-guard-6/tools/sgadmin.sh \
-cd config/sg/ \
-ts config/sg/truststore.jks \
-ks config/sg/kirk-keystore.jks \
-nhnv \
-icl \
--accept-red-cluster
然后一切正常,Kibana 会告诉你为什么你有 RED 状态——在我的例子中是 kibana 索引问题。
推荐阅读
- android - 如何查看应用程序支持的方案?
- java - 如何在模型映射器转换器中保留异常消息
- reactjs - 如何在 Amazon Cloudfront 的 React 应用程序中提供静态博客
- c# - AnalysisContext.EnableConcurrentExecution() - 它到底是做什么的?
- directx-12 - 在 DX12 中,多个 ExecuteCommandLists 调用提供哪些订购保证?
- r - 是否可以按设备类型自动对用户代理进行分类?
- java - 如何通过正则表达式从字符串上的多个相同字符中找到一个字符
- angular - 用于字段验证的 ANTLR4 语法
- swift - 从下载 URL 播放视频
- php - Symfony 3:SQLSTATE [HY000] [2006] MySQL 服务器在更新模式期间消失了