gpt4 book ai didi

elasticsearch - 为什么我的Elastic Enterprise搜索配置不起作用?

转载 作者:行者123 更新时间:2023-12-02 23:07:43 27 4
gpt4 key购买 nike

我现在尝试设置Elastic Enterprise Search的部署,因为它是标准许可证的一部分,它是免费的。在我的一生中,我无法获得该服务来查看我们的Elasticsearch集群,也无法弄清楚原因。
我有一个看起来像这样的配置文件:

elasticsearch.ssl.enabled: true
elasticsearch.ssl.verify: false

ent_search.auth.source: standard

secret_management.encryption_keys: [secret]

allow_es_settings_modification: true

elasticsearch.host: https://monitoring.internal
elasticsearch.username: elastic
elasticsearch.password: secret
当我分别尝试使用 curl从尝试运行服务的服务器访问资源时,它工作得很好:
$ curl --user elastic:secret https://monitoring.internal -k
{
"name" : "monitoring-es-client-0",
"cluster_name" : "monitoring",
"cluster_uuid" : "XXX",
"version" : {
"number" : "7.9.0",
"build_flavor" : "default",
"build_type" : "docker",
"build_hash" : "a479a2a7fce0389512d6a9361301708b92dff667",
"build_date" : "2020-08-11T21:36:48.204330Z",
"build_snapshot" : false,
"lucene_version" : "8.6.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
但是,当我尝试运行企业搜索服务时,它无法完全启动并显示无用的错误消息:
[2020-09-16T20:25:21.546+00:00][42859][2002][app-server][INFO]: Failed to connect to Elasticsearch backend. Make sure it is running.
诊断报告功能并没有太大帮助:
$ sudo bin/enterprise-search --diagnostic-report
Found java executable in PATH
Java version detected: 11.0.8 (major version: 11)
Enterprise Search is starting...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.headius.backport9.modules.Modules (file:/usr/share/enterprise-search/lib/war/lib/jruby-core-9.2.9.0-complete.jar) to method sun.nio.ch.NativeThread.signal(long)
WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
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
[2020-09-16T20:29:50.258+00:00][43020][2002][script][INFO]: Enterprise Search version=7.9.1, JRuby version=9.2.9.0, Ruby version=2.5.7, Rails version=4.2.11.3
[2020-09-16T20:29:51.158+00:00][43020][2002][script][INFO]: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[2020-09-16T20:29:51.160+00:00][43020][2002][script][ERROR]:
--------------------------------------------------------------------------------

Error: Enterprise Search is unable to connect to Elasticsearch. Ensure a healthy Elasticsearch cluster is running at https://monitoring.internal for user elastic.

--------------------------------------------------------------------------------
我在配置文件中做错了什么?

最佳答案

我遇到了同样的错误。通过启用以下设置,我可以让Enterprise-search与elasticsearch数据库对话
config / enterprise-search.yml文件。
我有一个PKCS12信任库,并使用以下命令来提取所需的文件:

openssl pkcs12 -in elasticsearch-certificates.p12 -out outfile.crt -nokeys
openssl pkcs12 -in elasticsearch-certificates.p12 -out outfile.key -nodes -nocerts
openssl pkcs12 -in elasticsearch-certificates.p12 -cacerts -nokeys -out ca.crt
我还对这些文件使用chown enterprise-search:enterprise-search进行了很好的评估。
elasticsearch.ssl.enabled: true
elasticsearch.ssl.certificate: "/usr/share/enterprise-search/outfile.crt"
elasticsearch.ssl.certificate_authority: "/usr/share/enterprise-search/ca.crt"
elasticsearch.ssl.key: "/usr/share/enterprise-search/outfile.key"
elasticsearch.ssl.key_passphrase: [key password]
elasticsearch.ssl.verify: false
您还需要为企业搜索网站加载SSL证书
ent_search.ssl.enabled: true
ent_search.ssl.keystore.path: "/home/<user>/http.p12"
ent_search.ssl.keystore.password: [password]

关于elasticsearch - 为什么我的Elastic Enterprise搜索配置不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63927566/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com