Deleting pages fail: "We couldn't delete your pages. Try again"
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Users are unable to delete pages in Confluence. When attempting to do it, they are presented with the following pop-up message:
Environment
Confluence Server or Data Center
Diagnosis
Capturing a HAR file while trying to delete a page, we can see that the POST request returns an HTTP 200, everything seems to be working as expected:
200 POST https://confluence.domain.com/rest/page-hierarchy/delete
However, crossing the timestamp of the HAR file with the information in the application logs, we can see the following error:
2021-07-30 15:21:04,868 ERROR [Long running task: Delete page hierarchy long running task] [dao.bulk.delete.DefaultBulkPageDelete] deepDeleteInternal Failed to acquire lock for delete page hierarchy: [com.atlassian.confluence.cluster.hazelcast.JvmDualLock@5d28f9f1]
-- url: /rest/page-hierarchy/delete | referer: https://confluence.domain.com/pages/viewinfo.action?pageId=450581647 | traceId: 63b896bb0a835843 | userName: admin
Cause
The root cause for this problem is yet unknown, but it is possibly related to corruption in the plugin cache, at the OS level.
Solution
Clearing Confluence's plugin cache is known to resolve the problem:
- Shutdown Confluence
- Ensure the user running Confluence has full read/write privileges to the confluence-home directory.
- Remove the following directories (we recommend creating a temporary backup, in case some of the plugins stores metadata in these directories):
- <confluence-home>/bundled-plugins
- <confluence-home>/plugins-cache
- <confluence-home>/plugins-osgi-cache
- <confluence-home>/plugins-temp
- <confluence-home>/bundled-plugins_language
- Start Confluence
- Re-attempt to delete the page