:IMPORT script function fails with '0000000002 No such file or directory'

book

Article ID: 208234

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

Scenario:

When utilizing :IMPORT script function to import objects or folder structures from an XML file, the job fails with the following error in the Activation Report:

U00020692 Runtime error in object 'JOBS.SAMPLE', line '00003'. Error when reading the file: 'C:\Users\Administrator\Downloads\test.xml'. Error message: '0000000002 No such file or directory'.

Cause

Configuration

Environment

Release : 12.3.X

Component : AUTOMATION ENGINE

Resolution

The error 'U00020692 Runtime error in object 'JOBS.SAMPLE', line '00003'. Error when reading the file: 'C:\Users\Administrator\Downloads\test.xml'. Error message: '0000000002 No such file or directory'.' means that the file is not present on the system. 

Step 1. The first troubleshooting step is to check if the path provided in the script is correct. If that is the case, move to step 2.

Step 2. If you have multiple servers Automation Engine is running on (Active-Active set up), and the job fails intermittently, it is an indication that the import is being performed by a WP that is running on the server where file is not present. Since the import functionality is done though WP, in a case of Active-Active system, if the import gets picked by the WP that is running on server 1 while the file is located on server 2, the following error will be present in the Activation Report: 

U00020692 Runtime error in object 'JOBS.SAMPLE', line '00003'. Error when reading the file: 'C:\Users\Administrator\Downloads\test.xml'. Error message: '0000000002 No such file or directory'.

This behavior is expected, and there are 2 ways to solve this issue:

1) You must define on which computer the export is made in your script.

Windows: Specify the UNC path under Windows. The server should run under an appropriate domain user so that the UNC names can be accessed.

UNIX: Indicate the absolute path in UNIX notation. The file system needs to be accessible (NFS; mount command) but it is not important on which computer it is located. This is the only way to assure that the actually required file is used. Please see this documentation page for reference. 

2) Make a copy of the export that needs to be imported and put it on second Automation Engine server in the same exact location, so the path used in the script will be applicable for both servers. As a result, you will have export on both Automation Engine servers, and the job will succeed at all times.