Job remain in executing (yellow) status?

Everything about Control-M Enterprise Manager Server installation or setup.
Post Reply
User avatar
Dilbert
Nouveau
Nouveau
Posts: 185
Joined: 10 Jan 2007 12:00
Location: Zagreb, Croatia

Job remain in executing (yellow) status?

Post by Dilbert » 18 Jun 2007 8:29

Hello all,

I have the next situation: Control-M/Server 6.3.01.100 on Linux platform, and Agent 6.3.01.100 on Windows platform. When submitting the job (dir command), job is executing (i can open sysout window with results), but stay in yellow (executing) status. I found this was a bug in version 6.2.01, but BMC said in documentation and in knowledge base that this problem is solved.
It's impossible to kill that job, delete it...

Anybody knows how to solve that, without manually change the status of the job? I checked the KB, but nothing helps.

Thanks!

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 18 Jun 2007 1:21

Hi DIlbert

Here is the single way I know about this, wihout SQL command.

You must disable the agent using use ctm_menu on your Control-M Server.
Normally, all jobs always running should be changed in red.
After that you need to enable the Control-M Agent.

So, be carefull, that work could stop all correct jobs.

Otherwise, here is another way following that post.

User avatar
Dilbert
Nouveau
Nouveau
Posts: 185
Joined: 10 Jan 2007 12:00
Location: Zagreb, Croatia

Post by Dilbert » 19 Jun 2007 11:40

I hope BMC will fix that soon.
It works, but I can't use this method in production environment. You know the customers: everything must works perfect! ;)

User avatar
philmalmaison
Nouveau
Nouveau
Posts: 1148
Joined: 08 Jun 2007 12:00
Location: Ile de France

Post by philmalmaison » 19 Jun 2007 2:20

don't stop the agent but be carefull with my solution
first find orderno concerned by your yellow flag.
(by the sql command : select ORDERNO from CMR_AJF where JOBNAME="JOBNAME" go)
be carefull with jobs having the same jobname.
so you can do the following :
update CMR_AJF set STATE = '5', OSCOMPSTAT=1, STATUS='N' where ORDERNO = <orderno>

rdierk

Post by rdierk » 22 Jun 2007 5:38

Check on the agent that both processes are running. I the tracker is not running the completion status of a job will not be reported back to the server.

User avatar
nl03606
Nouveau
Nouveau
Posts: 3
Joined: 20 Sep 2006 12:00

Post by nl03606 » 23 Jun 2007 2:11

Hi

Regarding the following remark :

first find orderno concerned by your yellow flag.
(by the sql command : select ORDERNO from CMR_AJF where JOBNAME="JOBNAME" go)
be carefull with jobs having the same jobname.


I would to suggest look into the knowledge-base of BMC and serach for the text : p_36...... (for instance : Solution ID: SLN000000088111 /

Regards

Ton

rdierk

Post by rdierk » 25 Jun 2007 3:54

If you have checked the agent and both the listener and tracker are running, there is no way to change the status of this job other than manually. If the tracker is not running on the agent, the job completion will not be reported back to the Control-M server. Start the tracker and the job should "post" a status. If all is running correctly on the agent and the status is still running, do the following :

01) Logon to the appropriate controlm data center as the controlm admin
02) from the EM GUI you have active, right click on the job, click properties, and obtain the ORDER ID
03) from the controlm command line, enter the following command
p_36 ORDERID (substitute the order id with the id you obtained above)
04) make a note of the result - you will see something similar to the following
result = 4178 (this is the ORDER NUMBER - make a note of it)
05) enter the following commands in sequence:
sql (to ask sql question. the prompt will be returned)
1> select * from CMR_AJF where ORDERNO = 4178 (change the order number to the number you obtained above in the result)
2> go
The screen information returned should be a display of the job you are attempting to alter. If you have displayed a different job, you may not have the proper ORDER ID or ORDER NUMBER. Try the above steps again. Once you have display the correct job, proceed.
06) enter the following commands in sequence:
1> update CMR_AJF set STATE = '8' where ORDERNO = 4178
2> go
You should get the message: (1 row affected). If not, you may have entered the commands wrong. Make sure of your syntax and order number information.
07) at the sql prompt type quit to return to the unix command line.

08) Return to the EM GUI and place the job on hold (it should now turn red)
09) Delete the Job.

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 25 Jun 2007 9:03

I have the version 6.3 unix, linux and wondows and i have not esperienced problems.
Try this:
1) Look at the batch job that you run, may be the scrip look for some resource or run some subprograms that havent the correct permissions and so the job cant return the status.
2) In windows if you run the agent interface there is in 6.3 a button in the AGENT windows: "Advanced Diagnostic", create a report of all the comunication and the completion of the job, with order id look for your job and read want is reported in the logs. Maybe here you find what is the problem.
3) If this dont resolve, start the agent with a debug level 3, start the job and in the proclog directory find the log and read it.

4) The job that you order in the agent must be easy for the first time, like a command "dir" or a "type" of a script file, this command must work.

5) In the services of the agent look at the "log on" window of the traker service and clear the box "Allow service interact with the desktop", in the windows 2003 this is the problem.

Write here what you have reported following theses points.

Nancy

Attempt to delete a long running Job

Post by Nancy » 14 Oct 2009 11:04

Hi,
One job was in executing status since last 15 days.. I just hold it now..but when I am trying to execute the following query after getting the order no using P_36 command I am getting the error.

select JOBNAME from CMR_AJF where ORDERNO = 7581

Error:

Msg 208, Level 16, State 1, Line 1
Invalid object name 'CMR_AJF'.

Any sorts of suggestion would be highly appreciated.

Nancy

User avatar
markf
Nouveau
Nouveau
Posts: 134
Joined: 13 Jul 2006 12:00
Location: Switzerland
Contact:

Post by markf » 14 Oct 2009 11:11

That SQL should work. Try entering

select distinct ORDERNO from CMR_AJF

and see if your number is displayed.

User avatar
philmalmaison
Nouveau
Nouveau
Posts: 1148
Joined: 08 Jun 2007 12:00
Location: Ile de France

A

Post by philmalmaison » 15 Oct 2009 2:41

ORDERNO is the primary key from CMR_AJF no needs to select distinct ...

regards
philmalmaison

Post Reply