"Unable to initialize Elasticsearch cluster" error occurs after installing a new Fix Pack
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
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- After installing a new Fix Pack on your current environment you might encounter the following errors in the logs due to Liferay Connector to Elasticsearch version update:
2021-01-30 23:49:07.944 ERROR [Framework Event Dispatcher: Equinox Container: 3ebebf27-a7c4-4221-8b93-6f35077ca1cb][Framework:93] FrameworkEvent ERROR
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":1,"active_shards":1,"relocating_shards":0,"initializing_shards":1,"unassigned_shards":0,"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":50.0}'}
at com.liferay.portal.search.elasticsearch6.internal.ElasticsearchSearchEngine.waitForYellowStatus(ElasticsearchSearchEngine.java:295)
at com.liferay.portal.search.elasticsearch6.internal.ElasticsearchSearchEngine.initialize(ElasticsearchSearchEngine.java:107)
at com.liferay.portal.kernel.search.SearchEngineProxyWrapper.initialize(SearchEngineProxyWrapper.java:95)
...
Resolution
- Delete the indices and lock folders from Elasticsearch.
Did this article resolve your issue ?