run rexec in execute command stage

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
caola
Participant
Posts: 10
Joined: Tue Jul 24, 2007 3:42 am

run rexec in execute command stage

Post by caola »

I have a ksh as below to run rexec command.
When I run the ksh in command line, it can finish successfully. But when I login to Datastage with the same user AA and invoke it from execute command stage, it gives an error:
Password: 3004-303 There have been too many unsuccessful login attempts; please see
rexec: Error in rexec system call,
rexec: (The following system error may itself be in error)
rexec: Inappropriate ioctl for device


The ksh is:

#!/bin/ksh

export HOME=XXXX
export USER=AA

SERVER=$1
Command=$2

rexec $SERVER "$Command"

return $?


I don't understand why...it's the same user, the same server...Can anybody help me out. Great thanks!
:)
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Doesn't really matter what user you log in with, the jobs run under whatever user ('engine credentials') has been setup for running jobs. Guessing that's your issue here.
-craig

"You can never have too many knives" -- Logan Nine Fingers
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Double click a detailed job log entry to see which user it executes under.
Choose a job you love, and you will never have to work a day in your life. - Confucius
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Does the rexec session require a password? Authentication key?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rkashyap
Premium Member
Premium Member
Posts: 532
Joined: Fri Dec 02, 2011 12:02 pm
Location: Richmond VA

Post by rkashyap »

You are using which flavor of Unix?

Confirm that a valid entry in the .netrc file for the remote host and user actually running the job exists.
Adding to previous posts ... Information used by the automatic login feature of the rexec is in .netrc file. DataStage jobs run as phantoms and not necessarily under the login-user, consequently their UNIX environment is different than that of login-user. The .netrc is only for a specific user.
caola
Participant
Posts: 10
Joined: Tue Jul 24, 2007 3:42 am

Post by caola »

chulett wrote:Doesn't really matter what user you log in with, the jobs run under whatever user ('engine credentials') has been setup for running jobs. Guessing that's your issue here.
Yes. When checking the environment variables of the job, it has
USER=dsadm1
HOME=/home/dsadm1
ISUSER=AA

That's why I export HOME and USER to AA in the ksh. Then it should go to the HOME directory looking for the .netrc file and run rexec.
:)
rkashyap
Premium Member
Premium Member
Posts: 532
Joined: Fri Dec 02, 2011 12:02 pm
Location: Richmond VA

Post by rkashyap »

Which flavor of Unix? What are the permissions on .netrc?
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Double click a detailed job log entry, and look up top, at the field named "User." What is the value in that field?
Choose a job you love, and you will never have to work a day in your life. - Confucius
Post Reply