Sysout handling problems in postprocessing (UNIX)... help!

Everything about Control-M Server installation or setup.
Post Reply
processing

Sysout handling problems in postprocessing (UNIX)... help!

Post by processing » 13 Mar 2012 4:19

I have a job on a Control-M server with owner 'abc'.

Sysout Handling in Post Processing tab is set to Copy, and a path is defined to /home/abc/job.out

Once the job ends OK, the sysout can be viewed just fine in Control-M and is saved in the controlm directory, but the sysout handling produces an error which is visible in the Control-M log. The copy or move handling options don't work. Deletion works fine.

The only way I was able to get the sysout to copy was by changing the job's owner temporarily to 'root'. 'ctmagent' or 'controlm' didn't work either.

Thinking it might be some kind of permission issue, I even tried specifying /tmp as the destination (that's rwxrwxrwx by default) and it still wasn't successful with original owner 'abc'.

If I log onto UNIX with abc, I am able to cp controlm/sysout/job.out /home/abc/job.out just fine.

I've been racking my brain over this for over 10 hours... can anyone help me?

processing

Post by processing » 14 Mar 2012 4:56

Hi chookgate, thanks for your input!

I considered the path being too long, but I tried multiple paths and filenames, as well as /tmp, and nothing worked.

The file doesn't exist already at the destination, no.

The ownership of the sysout in the controlm directory is set to whatever owner is defined in the job definition. abc:abc in the case of abc, and root:admin in the case of root.

I tried specifying just a path, that didn't work either.

The error message in the CM log doesn't give any clues. I can't reproduce it verbatim right now as I'm away from the office, but it's something along the lines of "JOB LOG COPY FAILED; CANNOT COPY LOG TO <PATH>", and then a subsequent one "CANNOT CHANGE JOB LOG PERMISSONS TO <octalvalue> and <octalvalue>" (the latter error presumably occurs because the file is not there).

I will post it here word for word when I get back to the office.

If you or anyone else has any other ideas, feel free to shoot them my way.

User avatar
Walty
Nouveau
Nouveau
Posts: 473
Joined: 20 Jan 2006 12:00

Post by Walty » 15 Mar 2012 7:39

Hi processing,

I 've encountered one similar issue impacted by the sticky bit.
Verify that the sticky bit is not set for the destination directory: /home/abc
If yes,remove the sticky bit.
Best regards
Walty

processing

Post by processing » 15 Mar 2012 5:50

Oh my gosh, Walty! This might just be it!

I'll let you know as soon as I get back on Friday! :-)

Thanks for your input! (And for probably solving my problem!)

processing

Post by processing » 17 Mar 2012 10:30

It wasn't the sticky bit. :(

The error is as follows:

3/17/2012 5:34:24 AM LG0012 JOB LOG COPY TO /home/abc/abc.out FAILED Can not copy sysout of order 009uk run 2 to /home/abc/abc.out.Error: OS_JOBLOG_copy: chown /home/abc/abc.out to uid 412, gid 236 failed : No such file or directory

processing

Post by processing » 17 Mar 2012 10:56

Does anyone know what user CTM uses to perform sysout copying during postprocessing? Is it the same as the job's owner, or is it something else entirely, like ctmagent?
Last edited by processing on 17 Mar 2012 1:20, edited 1 time in total.

processing

Post by processing » 17 Mar 2012 1:15

Another shot in the dark here, but the CTM Agent version seems to be 6.31, and CM Server is 6.4.01 ... could that be the problem?

processing

Post by processing » 18 Mar 2012 7:18

This is the first time I see it too!

But if post-processing is being done by the agent with the root uid as you suggest, then it does seem to make sense, as the file might inherit root's (or, as I previously thought, the agent's) uid and gid during the copy process.

The uid/gid values in the error log correspond with abc's uid/gid. But if the agent performs post-processing as root, then I really don't understand why it's producing the error. And the fact that changing the job owner to 'root' produces no error just throws me off even further. I can't figure it out!

The job is running on the same host as the agent, yes.

processing

Post by processing » 18 Mar 2012 11:49

Kludge solution: %%POSTCMD with cp <agentdir>/ctm/sysout/%%JOBNAME..LOG_*%%ORDERID._*%%RUNCOUNT /home/abc/

The wildcards are there because the default sysout file name has leading zeroes in it which don't get generated by the relevant parameters.

Ugly but it works...

Post Reply