Elasticsearch服务未运行

本文提供了在Elasticsearch(ES)服务未运行(通常是因为崩溃)时可能遇到的错误的解决方案。 症状可能包括使用curl运行运行状况检查时的错误、使用命令行重新编制索引、异常和PHP错误以及产品页面上的错误。 该表列出了错误以及尝试解决这些错误的资源的链接。 一个症状可能由多种不同原因引起。

Elasticsearch版本与Adobe Commerce的兼容性

  • Adobe Commerce内部部署和Adobe Commerce on cloud基础架构:

  • Magento Open Sourcev2.3.0+支持ES 5.x和6.x (但建议使用6.x )。

ES服务未运行时的症状
详细信息
资源
异常错误
{"0":"{\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"Fielddata is disabled on text fields by default. Set fielddata=true on [%attribute_code%]] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory.\"}]
已配置Elasticsearch5,但我们的支持知识库中未加载包含“Fielddata已禁用……”错误的搜索页面。
Elasticsearch\Common\Exceptions\NoNodesAvailableException: Noticed exception 'Elasticsearch\Common\Exceptions\NoNodesAvailableException' with message 'No alive nodes found in your cluster' in /app/<projectid>/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php:51
未删除Elasticsuite索引。 查看我们的支持知识库中的ElasticSuite跟踪索引导致Elasticsearch出现问题。
PHP错误
在您的群集中未找到活动节点","1":"#0 /app/<projectid>/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php
Curl 错误
运行curl命令以检查Elasticsearch运行状况:curl -m1 localhost:9200/_cluster/health?pretty(或curl -m1 elasticsearch.internal:9200/_cluster/health?prettyStarter帐户)会产生以下错误: 错误: curl: (7)无法连接到本地主机端口9200:连接被拒绝
命令行错误
运行$ bin/magento indexer:reindex catalogsearch_fulltext将生成此错误 目录搜索索引器进程未知错误: 在您的群集中未找到活动节点
产品页面错误
处理您的请求时出错。 出于安全原因,默认情况下禁用异常打印
recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a