Elasticsearchクラスタの初期化ができない」エラーが発生し、Liferay DXPが正常に起動できない

問題

  • 以下のような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)

環境への配慮

  • Liferay DXP 7.2
  • Liferay DXP 7.3

決議

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

関連する

この記事は役に立ちましたか?
4人中0人がこの記事が役に立ったと言っています