rep_daemon - Unable to remove file from /CATALINA_BASE/temp/xxxx.gz
search cancel

rep_daemon - Unable to remove file from /CATALINA_BASE/temp/xxxx.gz

book

Article ID: 99887

calendar_today

Updated On:

Products

CA Service Desk Manager CA Service Management - Service Desk Manager

Issue/Introduction

Customer is getting errors in the stdlog file, when rep_daemon tries to remove the .gz files from CATALINA_BSE\temp folder:

05/25 11:13:56.36 xxxx rep_daemon 8848 ERROR FileMng.c 839 DeleteFile() - Unable to remove file D:/PROGRA~2/CA/SERVIC~1/bopcfg/www/CATALINA_BASE/temp/<long hexadecimal file name>.gz (error code: 5) 

This is causing some disk space problems in Service Desk manager server.

Environment

Ca Service Desk Manager 14.1.x and up

Cause

Some possible reasons that prevent a file deletion are: 
1. file locked by another user 
2. Lack of permission 
3. invalid path to the file 
4. Antivirus blocking the deletion 
5. file does not exist 
6. Lack of permission in CATALINA_BASE\temp folder from the repository user

So, the Service Desk application is trying to delete some files from temporary folder and is receiving a message from Operating System, telling that the deletion is denied. 
 

Resolution

Some possible actions for resolution:

Check with the Security team, if there is any security policy that is preventing the application to delete files in that folder or if the Service Desk folder are protected from deletion, etc. 

Ensure that the user that was configured as repository user has necessary access and permission on the temp folder. 

Start a file monitor or something to monitor the temp folder and reproduce the problem to see what process is trying to delete the file and what is preventing the operation.

Additional Information

If the files are older than 10-30 minutes, they can be manually deleted with no side-effects.

In one recent case, the error code listed in the error message was 32.

The part at the end "error code: 32" is reflecting a Microsoft operating system error.  Checking the Microsoft website, for the meaning of the error code returns:

ERROR_SHARING_VIOLATION

32 (0x20)

The process cannot access the file because it is being used by another process.

System Error Codes (0-499)

In this situation check to see if it be possible that another process (or another part of Service Desk) has control of the file at the exact moment that Service Desk is trying to delete it, perhaps a virus scanner or backup application.  If the folder containing the file is a shared network drive and not a local drive, perhaps something on another computer sharing the same drive?