Issue
- If a publication on staging is made and the server is shut down, the publication will stay on queue on start-up and, even if cancelled, no more staging publications can be made.
- The following java class stays queued:
BackgroundTaskResult backgroundTaskResult =
backgroundTaskExecutor.execute(backgroundTask);
status = backgroundTaskResult.getStatus();
statusMessage = backgroundTaskResult.getStatusMessage();
}
catch (DuplicateLockException e) {
status = BackgroundTaskConstants.STATUS_QUEUED;
}
Environment
- Portal 6.2
- DXP 7.0
- DXP 7.1
- DXP 7.2
Resolution
- Cancel all pending staging publications.
- Stop all Liferay servers.
- Clear the Lock_ table on the Database (Via DB console or Groovy script)
For example, on the portal, run the following Groovy script:
com.liferay.portal.kernel.backgroundtask. BackgroundTaskManagerUtil. cleanUpBackgroundTasks();
- Start up the servers.
Additional Information
- Be careful when suggesting a DB alteration to the customer.
- On Liferay Cloud currently the only solution is via Groovy.
- Once the server is starting, it will create again a Lock_ table, but it would be empty.
- LPP-34173