Job stuck with status "Running"

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Tobbi
Participant
Posts: 14
Joined: Fri Oct 31, 2003 9:33 am
Location: Sweden, Stockholm

Job stuck with status "Running"

Post by Tobbi »

Hi!

I'm having a problem with a job that is stuck with the status "Running" when I know it is not! (I've shut down the DS demon and restarted it).

To complicate things (I think) this job is a "phantom" job??!! We use an external scheduler that starts a control job that then creates a "phantom" instance of the actual job being run. Now, since this phantom job is stuck in a "running" mode I cannot run it (and the most annoying part) STOP IT!

NB: the original job is ok but since our external scheduler tryes to run the "phantom" job - nothing works!

Example:
My job is called: FDMAllocatePrevProcRecords
Phantom name: ControlJob.FDMAllocatePrevProcRecords

So, the question is - is there any way to remove my "ControlJob.FDMAllocatePrevProcRecords" or "force" data stage to change the status of it? (it's okay to bring the DS deamon down)

All help appreciated!

BR
Tobbi
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

Hi Tobbi,

a Job remaining in the Status running happens from time to time and the subject is discussed already several times here, so by doing a search you could have got already an answer.

If you have set on "Job administration in Director" you can cleanup ressources or clear status file.

If that doesn't help you can do some activities with DS.TOOLS in a telnet session.

And finaly you can kill DS processes on your machine.

After all that a restart would be good. (Wait 5 Minutes after shut down)

Wolfgang
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
just wanted to point out that there is no real reson for restart.
you need to clear the status file and then it should be fine.
you can do that as metioned already via director if the alow job administration in director option is checked in the administrator options of your project.
or via DS.TOOLS, which can be invoked via DS telent or simply setting the environmnet, running uv, logging in to the project and running DS.TOOLS.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

ALL jobs are "phantom" jobs. "Phantom" is the DataStage term for background process.
The status you see in Director is a record from the RT_STATUSnn table for the job. It is not necessarily the actual status of the job. If the job was terminated abnormally, then it may not have had a chance to update this record. Hence you perceive the status as "running".
Resetting the job may work.
Clearing the status file will definitely work. But you should make sure, by checking processes or looking for activity in the job log, that the job really isn't running.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Tobbi
Participant
Posts: 14
Joined: Fri Oct 31, 2003 9:33 am
Location: Sweden, Stockholm

Post by Tobbi »

Thanks for the input but guys - but I'm still stuck.

1: "Job administration in director" has always been checked
-> "clear status file" option is greyed out anyway
-> "cleanup resources" wount help - there are no processess active

2: i've learned that the way I'm running the job is called a job innvocation (if that explains anything). It's the innvocated job that has it's status stuck in "Running" mode, not the original job.

3: there are no processess to kill (before or after i take down the DS server)

4: so far I haven't been able to use the DS.TOOLS to force status change or an "abort" - when I do a dsjob -stop I get the following error:

Error stopping job

Status code = -99 DSJE_REPERROR

just as if the job doesn't exist (but I've tripple checked the spelling)!

---

so, finally - the only thing I haven't been able to do is "Clear Status File" but that is impossible as it is grayed out (even though #1 above).

any ideas?

Thanks
Tobbi
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Try clearing the status of the original job name, not the entry with the Invocation ID associated with it. They are, after all, in essence the same job. Either that or simply recompile or reset the original job and that will clear all Invocations, from what I remember.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Tobbi
Participant
Posts: 14
Joined: Fri Oct 31, 2003 9:33 am
Location: Sweden, Stockholm

Post by Tobbi »

True, and I've tried all- recompiling, resetting and "clear status file" of the original job - no success!

Although this is happening in our production environment I'm gonna start exporting and deleting stuff to try to solve this - if that doesn't help I guess I'll try to change the name of the job and hope it doesn't happen again.

If I come up with a solution I'll post it here!

Thanks!
Tobbi
Participant
Posts: 14
Joined: Fri Oct 31, 2003 9:33 am
Location: Sweden, Stockholm

(Problem solved)

Post by Tobbi »

Okay,

the solution in this case was to export the ControlJob (DSControlJob), delete it in Designer, import it again, compile and everything was fine!

man, why didn't I do this in the first place!

Lesson - when all else fails, export, delete, import =D

Thanks for your input guys!
/Tobbi
Post Reply