Running a job on Unix Box as a Remote Agent

Everything about Control-M agents installation or setup.
Post Reply
User avatar
Hubba
Nouveau
Nouveau
Posts: 69
Joined: 10 Dec 2007 12:00
Location: Boston

Running a job on Unix Box as a Remote Agent

Post by Hubba » 24 Jan 2008 3:13

I'm trying to run a Unix job from Windows platform. After the AFT process, which work successfully, I'm trying to run a command on the Unix box, setup as a remote host. I keep receiving the message "NO mode given" Tried researching but can't find anything. Any Ideas ?

+ /apps/OFAC/batch/processOfac.pl
NO mode given
+ 1> ./APHCMAPP01_005nq_00001.fin


Remote Host connection details
==============================
CONTROL-M/Agent: APHCMAPP01
Protocol: SSH
SSH Port: 22
SSH Algorithm: DES
Compression: N

TIA
Hubba

hipikll

Post by hipikll » 24 Jan 2008 3:27

Can you run a simple command like "id" on your remote agent?
Just to determine, that the agent is defined correctly.
And what the Log is saing?

If everything is ok, than I will try to run your command /apps/OFAC/batch/processOfac.pl on your Unix platform under the defined job owner.

Give us a feedback.

bye

User avatar
Hubba
Nouveau
Nouveau
Posts: 69
Joined: 10 Dec 2007 12:00
Location: Boston

Post by Hubba » 24 Jan 2008 5:39

My Log says

Date Time Code Job Name Job Id ----- Message -----

24/01/08 08:02:35 CD5065 ORDERED JOB:4560; DAILY SYSTEM, ODATE 20080124
24/01/08 08:03:19 SL5120 JOB STATE CHANGED TO Wait Condition
24/01/08 11:00:13 SL5208 QUANTITATIVE RESOURCE ALL QUANTITY 1 ALLOCATED
24/01/08 11:00:14 SL5208 QUANTITATIVE RESOURCE OFAC QUANTITY 1 ALLOCATED
24/01/08 11:00:14 SL5208 QUANTITATIVE RESOURCE UFXCPIAP1 QUANTITY 1 ALLOCATED
24/01/08 11:00:14 SL5208 QUANTITATIVE RESOURCE UFXCPIDEV QUANTITY 1 ALLOCATED
24/01/08 11:00:15 SL5911 SUBMITTED TO ufxcpidev through afxcmapp01
24/01/08 11:00:20 TR5101 STARTED AT 20080124110015 ON ufxcpidev
24/01/08 11:00:20 TR5120 JOB STATE CHANGED TO Executing
24/01/08 11:00:25 TR5100 ENDED AT 20080124110025. OSCOMPSTAT 1. RUNCNT 1
24/01/08 11:00:25 TR5134 ENDED NOTOK
24/01/08 11:00:25 TR5120 JOB STATE CHANGED TO Analyzed
24/01/08 11:00:28 SL5214 QUANTITATIVE RESOURCES RELEASED
24/01/08 11:00:28 SL5120 JOB STATE CHANGED TO Post processed[/size][/size][/size]

User avatar
Hubba
Nouveau
Nouveau
Posts: 69
Joined: 10 Dec 2007 12:00
Location: Boston

Post by Hubba » 24 Jan 2008 5:44

Here is the simple command of LS

24/01/08 11:42:23 SL5120 JOB STATE CHANGED TO Wait Condition
24/01/08 11:42:45 SL5208 QUANTITATIVE RESOURCE ALL QUANTITY 1 ALLOCATED
24/01/08 11:42:46 SL5208 QUANTITATIVE RESOURCE OFAC QUANTITY 1 ALLOCATED
24/01/08 11:42:46 SL5208 QUANTITATIVE RESOURCE UFXCPIAP1 QUANTITY 1 ALLOCATED
24/01/08 11:42:46 SL5208 QUANTITATIVE RESOURCE UFXCPIDEV QUANTITY 1 ALLOCATED
24/01/08 11:42:47 SL5911 SUBMITTED TO ufxcpidev through aphcmapp01
24/01/08 11:42:53 TR5101 STARTED AT 20080124114247 ON ufxcpidev
24/01/08 11:42:53 TR5120 JOB STATE CHANGED TO Executing
24/01/08 11:43:09 TR5100 ENDED AT 20080124114309. OSCOMPSTAT 127. RUNCNT 2
24/01/08 11:43:09 TR5134 ENDED NOTOK
24/01/08 11:43:09 TR5120 JOB STATE CHANGED TO Analyzed
24/01/08 11:43:10 SL5214 QUANTITATIVE RESOURCES RELEASED
24/01/08 11:43:11 SL5120 JOB STATE CHANGED TO Post processed

hipikll

Post by hipikll » 24 Jan 2008 7:42

Right. On command LS you can something see:
24/01/08 11:43:09 TR5100 ENDED AT 20080124114309. OSCOMPSTAT 127. RUNCNT 2
It means, that agent is working properly, but :wink: you released a command which is not found.
'LS' - command not found.

So agent is returning right value of RC.
Now, as I said, try to run command 'ls' and watch the sysout and log. It will end in OSCOMPSTAT 0.

In previous command OSCOMPSTAT is 1. It means, that your script exited with RC=1.

Run your command as user on UNIX and after that run echo $? to see, that the '1' will be printed.
Edit your script - i think, there is a problem.

Give me a feedback again.

Servus :)

User avatar
Hubba
Nouveau
Nouveau
Posts: 69
Joined: 10 Dec 2007 12:00
Location: Boston

Post by Hubba » 24 Jan 2008 8:54

Servus,

You are absolutely correct. I ran the ls and returned a 0 !!! I will review the script and get back...

Thanks for now :-)

Hubba

hipikll

Post by hipikll » 24 Jan 2008 9:00

Servus.

Yes, sometimes i'm right :twisted:

You have to ask a developers who created this script for solving your problem.

Nazdar :)

User avatar
Hubba
Nouveau
Nouveau
Posts: 69
Joined: 10 Dec 2007 12:00
Location: Boston

Post by Hubba » 29 Jan 2008 5:19

They are now saying it may be a security issue ... I dont think so. I'm wondering where its getting the +1 field from?

+ /apps/OFAC/batch/processOfac.pl DAILY
Daily Mode
HISTORY: /ofac/current
FTP: /home/ftp/ofac/daily
ARCHIVE: /ofac/archive/daily
INPUT: /ofac/current
Tue Jan 29 11:13:03 EST 2008
didnt rename A file or directory in the path name does not exist.
...Processing
Renaming /home/ftp/ofac/daily to /ofac/current
+ 1> ./AFXCMAPP01_005zg_00004.fin ((((((((( 005zg is the order number


Remote Host connection details
==============================
CONTROL-M/Agent: AFXAPP01
Protocol: SSH
SSH Port: 22
SSH Algorithm: DES
Compression: N

hipikll

Post by hipikll » 29 Jan 2008 9:41

Can you ansver to these questions:
1) If you run this script as a local user on this machine, does it run successfully? (how is the output)
2) Do you have correctly defined remote agent - sysout file (there is an options, where to write the sysout).

(because, it seems, that 1> is a standart STDOUT redirection and this can be what are you asking)

-- i will check it tomorow in work, now it is too late to have a look in manual docs ;)

Give a feedback.

nazdar.

User avatar
Hubba
Nouveau
Nouveau
Posts: 69
Joined: 10 Dec 2007 12:00
Location: Boston

Post by Hubba » 31 Jan 2008 2:51

I have no Unix access personally. The application is looking into security on their end. I have the Unix Server entered as a remote host. How would you install an agent there?



[/img]

hipikll

Post by hipikll » 31 Jan 2008 3:48

Do you want to install local agent there on server?
Install it as it described in manual, it is really easy :).

Local agent uses "su -" command, it completly takes user environment and rights. So i hope, that any security issues will disappear.
If there will be a problem after local user, then really is a need to talk with developers.

Post Reply