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

book

Article ID: 206985

calendar_today

Updated On:

Products

CA XCOM Data Transport - Windows

Issue/Introduction

The following messages are in the GatewayControlServer.log when a file is not processed once in the Directory Watcher:

[INFO ][com.ca.xcom.gateway.autoFileInsertion.PolicyWatcher] Scheduling the upload of file "filename" to the Policy "policy name"
[INFO ][com.ca.xcom.gateway.daoservice.impl.GatewayTransferFileServiceImpl] Session Id 'Mzg5N2M2YTM6MTc1YzIyNXC3ZGE6LTdmZjEtMjIxMDcxMFhDT01OQw==' is uploading the file '"filename"' to Policy '"policy name"'.
com.ca.xcom.logging.exception.SystemException: Error occurred while writing the file ["filename"] in un-encrypted mode.
Caused by: com.ca.xcom.logging.exception.SystemException: java.io.FileNotFoundException: D:\dir1\dir2\in\"filename" (The process cannot access the file because it is being used by another process)
Caused by: java.io.FileNotFoundException: D:\dir1\dir2\in\"filename" (The process cannot access the file because it is being used by another process)
[INFO ][com.ca.xcom.gateway.autoFileInsertion.AutoFileTransfer] File: ["filename"] for policy:["policy name"] could not be uploaded to its realm ...

Cause

In this case, it could be that the SSH is not closing the handle and the Directory Watcher is picking up the file before it leaves the handle.

Environment

Release : 12.0

Component : CA XCOM DATA TRANSPORT GATEWAY FOR WINDOWS

Resolution

Review and adjust the Watcher Folder Interval timer configuration for the policy's Directory Watcher:

  1. Logon to the Gateway UI
  2. Click on the Administration tab and Manage Policies tab
  3. Select the policy in question and Edit
  4. Select Directory Watcher Info and modify the timer interval in the Timer Configuration section of the screen.