Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Elasticserach error
hi
i am using liferay 7.4 ga31. now i backup db from prud and resotre to dev, after i restart server, basically, it work fine, but there has an error seems form elasticserach.
2023-03-10 08:24:01.737 ERROR [https-jsse-nio-443-exec-26][BulkDocumentRequestExecutorImpl:57] failure in bulk execution:_[0]: index [liferay-36339], type [LiferayDocumentType], id [com.liferay.portal.kernel.model.Layout_PORTLET_263], message [ElasticsearchException[Elasticsearch exception [type=unavailable_shards_exception, reason=[liferay-36339][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[liferay-36339][0]] containing [2] requests and a refresh]]]]_[1]: index [liferay-36339], type [LiferayDocumentType], id [com.liferay.portal.kernel.model.Layout_PORTLET_263], message [ElasticsearchException[Elasticsearch exception [type=unavailable_shards_exception, reason=[liferay-36339][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[liferay-36339][0]] containing [2] requests and a refresh]]]] [Sanitized]
2023-03-10 08:24:01.743 ERROR [https-jsse-nio-443-exec-26][ElasticsearchIndexWriter:361] Update failed
all funciton still work well.
why it's happen and how to fix it?
I would first check if Elasticsearch is available. Is the server running, reachable and working? What does the Search page (In the Menu, Control Panel -> Search) say. Is it Green?
Second, I would check the logs on the Elasticsearch server. Maybe an error there gives some hints.
When you restored the prod db to dev, you restored the OSGi configuration.
Liferay uses the last updated source (file or UI), so even if you have a .config file that points to a dev ES, I'm sure if you check in the control panel that the prod ES is listed, and the failure points to the dev server not being able to connect to the prod instance.
Just update your configuration so it points at the dev instance of ES, reindex, then you should be right as rain.
Powered by Liferay™