我正在设置6.1.2 Windows群集并拥有金牌许可证。这是集群中的第一台计算机,因此我已经生成了带有密码的CA证书,并将其放置在ES_HOME config目录中。
来自elasticsearch.yml文件的相关键:
xpack.ssl.keystore.path:弹性堆栈测试ca.p12
xpack.ssl.truststore.path:弹性堆栈测试ca.p12
xpack.security.transport.ssl.enabled:true
xpack.security.transport.ssl.verification_mode:证书
xpack.security.http.ssl.enabled:true
我已经阅读了文档,并且目前正在尝试完成Elasticsearch安装的第7步。
不幸的是,此命令“ Elasticsearch \ 6.1.2 \ bin \ x-pack \ setup-passwords auto”抛出异常。
例外:
Exception in thread "main" ElasticsearchException[failed to initialize a TrustManagerFactory]; nested: IOException[keystore password was incorrect]; nested: UnrecoverableKeyException[failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded];
at org.elasticsearch.xpack.ssl.StoreTrustConfig.createTrustManager(StoreTrustConfig.java:61)
at org.elasticsearch.xpack.ssl.SSLService.createSslContext(SSLService.java:408)
at org.elasticsearch.xpack.ssl.SSLService.loadSSLConfigurations(SSLService.java:444)
at org.elasticsearch.xpack.ssl.SSLService.(SSLService.java:87)
at org.elasticsearch.xpack.security.authc.esnative.tool.CommandLineHttpClient.postURL(CommandLineHttpClient.java:91)
at org.elasticsearch.xpack.security.authc.esnative.tool.SetupPasswordTool$SetupCommand.checkElasticKeystorePasswordValid(SetupPasswordTool.java:278)
at org.elasticsearch.xpack.security.authc.esnative.tool.SetupPasswordTool$AutoSetup.execute(SetupPasswordTool.java:127)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:75)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.xpack.security.authc.esnative.tool.SetupPasswordTool.main(SetupPasswordTool.java:105)
Caused by: java.io.IOException: keystore password was incorrect
at sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2059)
at java.security.KeyStore.load(KeyStore.java:1445)
at org.elasticsearch.xpack.ssl.CertUtils.readKeyStore(CertUtils.java:230)
at org.elasticsearch.xpack.ssl.CertUtils.trustManager(CertUtils.java:221)
at org.elasticsearch.xpack.ssl.StoreTrustConfig.createTrustManager(StoreTrustConfig.java:59)
我在“设置密码”命令中的任何地方都没有看到您传递密钥库密码的地方。
希望有人可以阐明我可能做错了什么或下一步。此错误使我无法安装Kibana和Logstash。
谢谢斯蒂芬
深入研究后发现,我的JAVA HOME指向的是9.x版本,一旦我将HOME更改为兼容版本(在这种情况下为8),一切就如文档所述。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句