Issue
- When starting up Liferay DXP 7.3 with a clean database, I'm encountering a Red Health status for my embedded Elasticsearch server:
2021-04-08 18:27:44.067 ERROR [main][ElasticsearchEngineConfigurator:93] bundle com.liferay.portal.search.elasticsearch7.impl:5.0.17 (1217)[com.liferay.portal.search.elasticsearch7.internal.ElasticsearchEngine
Configurator(2923)] : The activate method has thrown an exception
java.lang.IllegalStateException: Unable to initialize Elasticsearch cluster: {_clusterHealthStatus=RED,_healthStatusMessage='{"cluster_name":
"LiferayElasticsearchCluster","status":"red","timed_out":true,"number_of_nodes"
:1,"number_of_data_nodes":1,"active_primary_shards":2,"active_shards":2,
"relocating_shards":0,"initializing_shards":0,"unassigned_shards":19,
"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":9.523809523809524}'}
Environment
- Liferay DXP 7.3
Resolution
- There may be some stale or bad data in the embedded Elasticsearch server that is causing this error. To clear the Elasticsearch server data, navigate to
data/elasticsearch7/indices/nodes
in your Liferay bundle and clear all the contents in this folder.