CleanTempDirectoryJob Errors After Upgrading Confluence

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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

After upgrading Confluence, several CleanTempDirectoryJob errors are shown in the logs.

Environment

Confluence 7.4.5

Diagnosis

The following appears in atlassian-confluence.log:

1 2 2020-12-09 04:00:00,013 ERROR [Caesium-1-3] [confluence.importexport.impl.CleanTempDirectoryJob] runJob Failed to delete /var/atlassian/application-data/confluence/temp/scaledImages 2020-12-09 04:00:00,014 ERROR [Caesium-1-3] [confluence.importexport.impl.CleanTempDirectoryJob] runJob Failed to delete /var/atlassian/application-data/confluence/temp/plantuml656436246909289525.png

Cause 1

The user running Confluence does not have permissions to the temp directory.

Cause 2

If permissions are correct, check if the temp folder is symlinked to another directory outside of the local home as follows:

1 lrwxrwxrwx 1 ubuntu ubuntu 23 Oct 1 16:15 temp -> shared-home/node1-temp/

Solution for Cause 1 - Permissions

Please verify that the user running Confluence has full permissions for the Confluence Install and Home directory covered in Confluence Home and other important directories.

As a best-practice, clear out the <confluence-home>/temp directory.

As described in the following document, it is not possible to symlink the contents of the local home folder. With that in mind, remove the symlink and move the contents back to local-home/temp, or perform a manual clean-up.

Updated on April 1, 2025

Still need help?

The Atlassian Community is here for you.