本文提供了在Elasticsearch(ES)服务未运行(通常是因为崩溃)时可能遇到的错误的解决方案。 症状可能包括使用curl运行运行状况检查时的错误、使用命令行重新编制索引、异常和PHP错误以及产品页面上的错误。 该表列出了错误以及尝试解决这些错误的资源的链接。 一个症状可能由多种不同原因引起。
{"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.\"}]
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
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?pretty
Starter帐户)会产生以下错误: 错误: curl: (7)无法连接到本地主机端口9200:连接被拒绝
命令行错误
运行$ bin/magento indexer:reindex catalogsearch_fulltext
将生成此错误 目录搜索索引器进程未知错误: 在您的群集中未找到活动节点
产品页面错误
处理您的请求时出错。 出于安全原因,默认情况下禁用异常打印