Issue
- You click in the "Reindex all search indexes" button but the progress bar is stuck in the 0% and the process is not executed
Environment
- DXP 7.2
Resolution
-
In some cases this is produced because a "com.liferay.portal.search.internal.background.task.ReindexPortalBackgroundTaskExecutor" type background task remains in the database.
-
Portal is prepared to only allow one of these tasks to run at a time, so if one them is not properly closed (that could be produced, for example, if the node crashes) and remains in the database the following tasks will not be triggered.
-
To check if that's de case you could check if the Lock_ table has a row similar to this one:
lockId companyId userId userName createDate key_ 3267730
10154
0
NULL
2021-06-30 08:56:01.029000
com.liferay.portal.search.internal.background.task.ReindexPortalBackgroundTaskExecutor#10154
- If its createDate doesn't match with the current process (or if there is no reindex process running) you could remove it.
To do so you could use the LockLocalService API and it's delete methods:
import com.liferay.portal.lock.service.LockLocalServiceUtil;
LockLocalServiceUtil.deleteLock(lockId); -
If you need assistance to do it, you could create a new ticket to the Liferay Support Service.
Additional Information
- For more information, see article: