File: ... does not exist

Everything about Control-M Enterprise Manager Server installation or setup.
Post Reply
User avatar
rombapa
Nouveau
Nouveau
Posts: 24
Joined: 28 Jun 2011 12:00

File: ... does not exist

Post by rombapa » 18 Oct 2011 4:06

Hi all,


I have the following job definition:

task type: job
file name: myscript.sh
file path: /data/mydir
ownner: pro

Here is the script on the host:

Code: Select all

bash-3.00$ ls -l /data/mydir/myscript.sh
-rwxr-xr-x   1 pro     pro         146 Oct 17 09:48 myscript.sh
The log of the job in EM shows the following:

Code: Select all

18/10/11 08:00:06   TR5080                 FAILED TO SUBMIT JOB myscript.sh. Message from Agent follows
18/10/11 08:00:06   TR5167                 File: /myscript.sh does not exist
18/10/11 08:00:06   TR5134                 ENDED NOTOK
(so as if myscript.sh was located in the root directory?!!)


Can anyone please help?

Thanks

User avatar
philhaut
Nouveau
Nouveau
Posts: 32
Joined: 06 Feb 2007 12:00
Location: VALENCIENNES

Post by philhaut » 18 Oct 2011 4:49

hello

could you connect with the user pro into the agent, and type the command pwd in the directory where the file is stored
are you sure there are nothing before the directory /data? (ie /export/home/data...)

User avatar
rombapa
Nouveau
Nouveau
Posts: 24
Joined: 28 Jun 2011 12:00

Post by rombapa » 19 Oct 2011 11:01

Thanks for your reply philaut.

I confirm that there is nothing before directory /data when I login as user pro on agent, cd to directory where script is stored and do a pwd (I get the same path as in the job definition: /data/mydir)

What is very strange is that I have another script with EXACTLY the same job parameters (except file name of course): same task type (job), same owner (pro) , same filepath (/data/mydir). This one is executed on the same agent without any problem.

In proclog directory of the agent I have found this file but it doesn't say much more than the EM log :

Code: Select all

bash-3.00$ cat /opt_local/controlm/ag/ctm/proclog/AG_10965.log
1018 08:00:05:47 AG:ag_create_script_nm: File: /myscript.sh does not exist
Do you have any idea wherelse I could look?

Thanks

User avatar
gglau
Nouveau
Nouveau
Posts: 317
Joined: 13 Jun 2007 12:00

Post by gglau » 19 Oct 2011 4:54

It does not make sense to have this problem.

Do you see this path in "File Path" of active job or of Desktop? (Maybe you have not uploaded the change :lol: ) What does log say if you change the path to something else in active job and rerun? Can you turn on debug when rerun to see what is going on?

User avatar
rombapa
Nouveau
Nouveau
Posts: 24
Joined: 28 Jun 2011 12:00

Post by rombapa » 20 Oct 2011 2:00

Thanks for your reply gglau.
It does not make sense to have this problem.
I totally agree with you, which is why this is driving me crazy!!!
Do you see this path in "File Path" of active job or of Desktop? (Maybe you have not uploaded the change )
I am positive that the file path is the same in both the permanent and active job definitions.

Sorry but I don't exactly understand the following:
What does log say if you change the path to something else in active job and rerun?
1) By "change the path to something else", do you mean change it to an incorrect/non-existent path ?
Can you turn on debug when rerun to see what is going on?
2) Do you suggest to turn on debug after changing the path to "something else" or using the path of my current job definition?

Thanks

User avatar
gglau
Nouveau
Nouveau
Posts: 317
Joined: 13 Jun 2007 12:00

Post by gglau » 20 Oct 2011 4:32

Changing the path at active job to something else just to make sure it is what it is. The path does not need to be an existing one (like /abc/def). Turn on debug at agent then rerun the job. If there is error in log saying /abc/def/myscript.sh does not exist, then something is wrong with your original job definition. If you still see /myscript.sh does not exist, debug log can give you more details what has been going on.

User avatar
rombapa
Nouveau
Nouveau
Posts: 24
Joined: 28 Jun 2011 12:00

Post by rombapa » 20 Oct 2011 5:19

Ok so I did the first part of the test (changed the file path to "/bla/bla/bla" then reran the script). The log file in the proclog directory still says the same:

Code: Select all

$ cat AG_5355.log
1020 16:48:14:16 AG:ag_create_script_nm: File: /myscript.sh does not exist
So I'll next try to increase the debug level on the agent (which I won't be able to do that before next week).

Thanks for time!

User avatar
gglau
Nouveau
Nouveau
Posts: 317
Joined: 13 Jun 2007 12:00

Post by gglau » 20 Oct 2011 8:16

I google the error ag_create_script_nm and it shows release notes of V7 FP1.

(UNIX only) Control-M/Agent might fail to submit a job, and errors similar
to the following appear in the debug log for the job:
AS:OS_FILE_check_existence: file '/apps/saversplus/
purge/p.ksh' doesn't exist
AS:ag_create_script_nm: File: /apps/saversplus/purge/
p.ksh does not exist
This occurs when the job script file is located on an NFS file system and
Control-M/Agent does not have permissions to view the script file.

User avatar
rombapa
Nouveau
Nouveau
Posts: 24
Joined: 28 Jun 2011 12:00

Post by rombapa » 24 Oct 2011 2:50

Thanks for the info. However I don't understand how it could be a permission issue. There is no problem with the second script listed below and both have the same permissions:

Code: Select all

bash-3.00$ ls -l /data/mydir/myscript* 
-rwxr-xr-x   1 pro     pro         146 Oct 17 09:48 myscript.sh
-rwxr-xr-x   1 pro     pro         226 Oct 17 10:08 myscript2.sh
I'll try to increase the debug level as you suggested. Now am I right to think that this is done with the ctmcfg utility on the agent?. It doesn't seem possible in the Configuration Manager (where the only agent listed in the Control-M/Agent Debug window is the Control-M Server).

User avatar
Hagar
Nouveau
Nouveau
Posts: 27
Joined: 19 Feb 2009 12:00

Post by Hagar » 24 Oct 2011 2:59

Just a long shot

Can it be that you have gotten some "garbage" in the file name, try and rename it and see if it helps.

User avatar
rombapa
Nouveau
Nouveau
Posts: 24
Joined: 28 Jun 2011 12:00

Post by rombapa » 25 Oct 2011 11:29

As suggested by gglau, I have increased the debug level to 4 on the agent (ctmcfg -TABLE CONFIG -ACTION UPDATE -PARAMETER "DBGLVL" -VALUE "4") after changing the path to '/bla/bla/bla' then rerun the job.

Here are the lines preceding and including the message "... /myscript.sh does not exist"

Code: Select all

...
1025 11:05:23:59 AG:call to IOAAPI
1025 11:05:23:59 AG:==============
1025 11:05:23:59 AG:ObjectType = JOB
1025 11:05:23:59 AG:Action = SUBMIT
1025 11:05:23:59 AG:>>>>> In Attrs:
1025 11:05:23:59 AG:AG_DSECT_print_attr
1025 11:05:23:59 AG:Attributes begin
1025 11:05:23:59 AG:    'MEMNAME' = 'myscript.sh'
1025 11:05:23:59 AG:    'JOBNAME' = 'myscript'
1025 11:05:23:59 AG:    'TASKTYPE' = 'B'
1025 11:05:23:59 AG:    'CMDLINE' = ''
1025 11:05:23:60 AG:    'MEMLIB' = '/bla/bla/bla'
1025 11:05:23:60 AG:    'OVERLIB' = ''
1025 11:05:23:60 AG:    'OWNER' = 'pro'
1025 11:05:23:60 AG:    'ORDERNO' = '01q0z'
1025 11:05:23:60 AG:    'RUNNO' = '00002'
1025 11:05:23:60 AG:    'START_TIME' = '20111025110523'
1025 11:05:23:60 AG:    'JOBSTATUS' = '3'
1025 11:05:23:60 AG:    'REQTYPE' = 'SUBMIT'
1025 11:05:23:60 AG:Attributes end
1025 11:05:23:60 AG:>>IOAAPI_JOB_ACTION
1025 11:05:23:60 AG:CLASS: JOB, ACTION: SUBMIT
1025 11:05:23:60 AG:BE_job_action_submit
1025 11:05:23:60 AG:be_job:::ag_create_script_nm
1025 11:05:23:60 AG:OS_FILE_create: task_type:B
1025 11:05:23:60 AG:ag_create_script_nm: memlib: /bla/bla/bla. overlib: . full-file-nm: /myscript.sh.
1025 11:05:23:60 AG:ag_create_script_nm: File: /myscript.sh does not exist
1025 11:05:23:60 AG:ErrorSet: File: /myscript.sh does not exist
...
The error seems to appear on the 3rd line from the bottom, where the file path is present (/bla/bla/bla) but yet is not inserted in front of the script name.

Also when I ask to View the job's JCL/Script in the Control-M/EM, I get the following error message:
Request rejected by Data Center
CTM5507 AGENT ENCOUNTERED ERROR
Failed to read file
Can anyone make sense of this?

Thanks

User avatar
gglau
Nouveau
Nouveau
Posts: 317
Joined: 13 Jun 2007 12:00

Post by gglau » 25 Oct 2011 5:12

Do you have FP1 installed to the agent? There is a fix that seems to address the situation you are having.

User avatar
rombapa
Nouveau
Nouveau
Posts: 24
Joined: 28 Jun 2011 12:00

Post by rombapa » 25 Oct 2011 5:20

Sorry but how/where can I see if I have the FP1 installed? :?

The file ~/ctm/scripts/VERSION contains the following:
#FD PLATFORM CONTROL-M DATE INSTALLATION VERSION COMMENTS
------------ -------- ------------- ------------ ------- --------
FD4767_AGENT Solaris Sep-2001 YYYYMMDD 6.1.01
FD4767_AGENT HP-UX-10 Sep-2001 YYYYMMDD 6.1.01
FD4767_AGENT HP-UX-11 Sep-2001 YYYYMMDD 6.1.01
FD4767_AGENT Linux-s390 Sep-2001 YYYYMMDD 6.1.01
FD4767_AGENT Linux-i386 Sep-2001 YYYYMMDD 6.1.01
FD4767_AGENT OSF1 Sep-2001 YYYYMMDD 6.1.01
FD4767_AGENT NCR Sep-2001 YYYYMMDD 6.1.01
FD4767_AGENT AIX Sep-2001 YYYYMMDD 6.1.01
FD4767_AGENT Pyr Sep-2001 YYYYMMDD 6.1.01
FD4767_AGENT dgux Sep-2001 YYYYMMDD 6.1.01
FD4767_AGENT sequent Sep-2001 YYYYMMDD 6.1.01
FD4767_AGENT IRIX Sep-2001 YYYYMMDD 6.1.01
FD4767_AGENT UnixWare Sep-2001 YYYYMMDD 6.1.01
Is 6.1 the version of the Control-M agent and .01 the FP?

Post Reply