legacy-knowledge-base
公開されました Jul. 2, 2025

Unable to initialize Elasticsearch cluster "エラーによりLiferay DXPが正常に起動できない。

written-by

Emma Liu

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • 以下のようなESエラーが発生し、サーバーが正常に起動できない。
2020-06-05 06:45:41.596 ERROR [Framework Event Dispatcher: Equinox Container: 2a6f419e-c609-4e73-a180-4e901fcc9b18][Framework:93] FrameworkEvent ERROR 
java.lang.IllegalStateException: Unable to initialize Elasticsearch cluster: {_clusterHealthStatus=RED, _healthStatusMessage='{"cluster_name":"REALCANPORTALES","status":"red","timed_out":true,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":4,"active_shards":4,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":6,"delayed_unassigned_shards":0,"number_of_pending_tasks":0,"number_of_in_flight_fetch":0,"task_max_waiting_in_queue_millis":0,"active_shards_percent_as_number":40.0}'}
at com.liferay.portal.search.elasticsearch6.internal.ElasticsearchSearchEngine.waitForYellowStatus(ElasticsearchSearchEngine.java:321)
2020-06-05 06:46:41.760 ERROR [main][PortletLocalServiceImpl:334] Unable to register remote portlet for company 20101 because it does not exist
2020-06-05 06:46:46.513 ERROR [https-jsse-nio-8843-exec-30][PortalInstances:166] com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the key {companyId=0, groupKey=Guest}

DXP 7.3の場合、以下のようなエラーが発生します。

2020-10-26 16:14:00.685 ERROR [main][ElasticsearchEngineConfigurator:93] bundle com.liferay.portal.search.elasticsearch7.impl:6.0.0 (254)[com.liferay.portal.search.elasticsearch7.internal.ElasticsearchEngineConfigurator(749)] : The activate method has thrown an exception 
java.lang.RuntimeException: org.elasticsearch.ElasticsearchStatusException: ElasticsearchStatusException[Elasticsearch exception [type=security_exception, reason=unable to authenticate user [elastic] for REST request [/_cluster/health?master_timeout=30000ms&level=cluster&timeout=30000ms&wait_for_status=yellow]]]
at org.elasticsearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:187)
at org.elasticsearch.client.RestHighLevelClient.parseEntity(RestHighLevelClient.java:1892)
at org.elasticsearch.client.RestHighLevelClient.parseResponseException(RestHighLevelClient.java:1869)
at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1626)
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1583)
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1553)
at org.elasticsearch.client.ClusterClient.health(ClusterClient.java:130)
at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.cluster.HealthClusterRequestExecutorImpl.getClusterHealthResponse(HealthClusterRequestExecutorImpl.java:98)

Environment

  • Liferay DXP 7.2
  • Liferay DXP 7.3
  • Liferay DXP 7.4

解決策

  • この問題は、主にElastic Searchのクラスタの状態に起因しています。 ログを見るとわかるように、Elastic searchのクラスタのステータスがRED( _clusterHealthStatus=RED) 、Liferayが正しく初期化できなかった原因となっています。
  • まずElastic Search Clusterの問題を解決してから、Liferayサーバーを再起動させてください。

関連

did-this-article-resolve-your-issue

legacy-knowledge-base