Linux Agent File Transfer fails to find files on NFS shares
search cancel

Linux Agent File Transfer fails to find files on NFS shares

book

Article ID: 434048

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

A File Transfer (JOBF) fails with a "does not exist" error when the file is located on an NFS-mounted directory:

U00063016 FT '394981476': The file '/path/to/a/file.txt' does not exist.

 

  • The file physically exists and is visible via CLI on the target agent's server.
  • The job succeeds if manually restarted after a few seconds.
  • The job succeeds immediately if wildcards (e.g., file*) are used in the File Transfer object instead of an explicit filename.

 

Cause

This behavior is caused by NFS attribute caching (stale cache). When a file is created by one NFS client another other clients may not immediately see the new file because their local kernel cache for the directory's attributes has not yet expired.

Using a wildcard forces the Agent to perform a directory listing (equivalent to an ls operation), which triggers the NFS client to refresh its attribute cache from the server. A direct file lookup with an explicit path often relies on the existing, possibly stale, cache, resulting in the "file not found" error.

 

Resolution

To resolve this environmental timing issue, you can implement one of the following solutions:

1. Adjust NFS Mount Options (Recommended)

Modify the NFS mount configuration on the agent's host to reduce or disable attribute caching.

  • Option noac: Disables all attribute and directory caching. This ensures immediate visibility but may impact performance for high-volume file systems.
  • Option actimeo=0: Sets the timeout for all attributes to zero seconds, forcing a refresh on every access.

2. Use Wildcards in Automic

If the environment cannot be modified, configure the File Transfer (JOBF) object to use a wildcard in the source file name (e.g., file.txt* or file*.txt). This forces the agent to refresh the directory metadata during the file sampling phase.

3. Add a Delay

Insert a brief delay in the workflow between the file creation job and the transfer job to allow the NFS cache to expire naturally.