Showing posts with label Background Processor. Show all posts
Showing posts with label Background Processor. Show all posts

Monday, September 14, 2015

Configure Metasolv Background Processor Server

PURPOSE


To configure Background Processor Server for Metasolv application.

SOLUTION


Please follow below steps to configure Background Processor Server.

STEP 1.


It is recommended that you create a separate user in M6 for configuring background processor.Lets say BPADMIN is the user.

Multiple Backgound Processors can be created seeing the business requirement.



STEP 2.


Update the jmaster.ini file in the Metasolv client directory.

[DBMS_Profiles]
[Application Servers]
J2EEProfiles= 'TEST'

[J2EEProfile TEST]
url=http://M6_Application_Server_IP:Port
database=MetasolvDB SID

[PROFILE PURGEUTIL]
DBMS=O84
Database=Oracle
UserId=
DatabasePassword=
LogPassword=
ServerName=ServerName-->to be given
LogId=
Lock=
Prompt=1
DbParm=DisableBind=0
DelimitIdentifier='No'
CommitOnDisconnect='No?
AutoCommit=0

Note:Background Processor connects to application server IP as mentioned above in jmaster.ini. Background Processor uses JDBC connection using mslvNoneTxDataSource. While creating multiple background processors keep Maximum Capacity and Initial Capacity of the DataSource in consideration. Its recommended to have sufficient Initial Capacity of the DataSource.


STEP 3. 


Go to M6 client directory and run jmanager.exe.

Login with ASAP user to launch jmanager console.




STEP 4. 

In job manager console click on Servers, then go to File--> New

Give in the details for the Background Processor Server.


Server Logical Name= Any name for your background processor
i.e. M6_BACKGROUND_PROCESSOR  etc.

Host Name= Host Name of machine where the background processor to be set up.
i.e. Alok Laptop etc.

Job Worker Exe Path = Path of M6 client directory.
i.e. c:/mss etc.

similarly provide other details.

STEP 5. 


Go to M6 client directory and in order to run Background Processor launch jmaster.exe.

Login with BPADMIN user created above. Here you go with running Background Processor server.


Note: Only one jmaster.exe will be running on one host.

STEP 6. 


In order to avoid STEPS 3-4 use below SQL( Not recommended).

Login to M6 database with ASAP user and RUN below SQL.

Insert into JOB.JOB_SERVER
 (SERVER_LOGICAL_NM, HOST_NM, SERVER_DESC, SERVER_STATUS_IND, MAX_WORKERS_ALLOWED, JOB_MASTER_REFRESH_RATE, REROUTE_JOB_MIN, LAST_MODIFIED_DATE, LAST_MODIFIED_USERID, WORKER_EXE_PATHS, ACTIVE_IND)
 Values
 ('M6_BACKGROUND_PROCESSOR', 'Alok Laptop', 'BackGround Processor', 'R', 60, 60, 15, SYSDATE, 'ASAP', 'c:/mss', 'Y');
COMMIT;


Hope above helps in configuring Background Processor for your Metasolv application, please leave your feedback or query. 

Wednesday, April 22, 2015

MetaSolv DD tasks not completed by Background Processor

In MetaSolv M6 we know that DD tasks assigned to system work queue are completed by Background Processor.

Background Processor consists of three applications that are distributed between a remote server and the system administrator's workstation. The individual applications are:

Job Master (JMASTER.EXE)
Job Worker or (JWKR.EXE)
Job Manager or (JMANAGER.EXE)

The Background Processor also includes a job queue, which is a table in the MetaSolv Solution database. DD task is a system task which is associated with job(query task table for DD task and check job_id column) the job goes into the job queue database table. Job Master checks the queue periodically. When it finds a job, Job Master initiates a Job Worker and gives it the ID of the job to be processed. Job Manager acts as a window on the job queue that lets you manipulate the queue.

I have observed from experience that sometimes DD tasks are not completing. There may be following reasons for such system task like DD are not completing.

1. Background Processor is not running.
2. Background Processor is running but still DD is not completing.

Before investigating understand below
1. DD task is associated with a job.
2. The job is completed by running jWorker.
3. To invoke jWorker , jMaster(needs jManager to be configured) needs to be up and  running.
4. In some cases(network issues, system on which Background Processor is configured is  down etc) there are issues with jWorker gets stuck or jMaster is not able to invoke them.  Also sometimes even jWorker is running and picking up the jobs but could not complete it  and which moves job status to any of  ('NOR', 'EXE', 'ERR', 'COM') statuses.

In order to fix the issue execute below queries. Below queries will help only when Background Processor is running but not able to pick or complete the jobs because of which DD task doesn't complete.

1    To Update all stuck DD tasks in M6

update job_queue jq
set jq.job_scheduled_date   = sysdate,
jq.job_start_date       = sysdate,
jq.job_queue_status     = 'REA',
jq.job_percent_change   = '0',
jq.job_percent_complete = '0'
where jq.job_id in (select t.job_id
from job_queue jq, task t
where jq.job_queue_status in ('NOR', 'EXE', 'ERR', 'COM')
and t.job_id = jq.job_id
and t.task_status = 'Ready'
and t.task_type = 'DD');        

2   To Update stuck DD task for a specific Order in M6

update job_queue jq
set jq.job_scheduled_date   = sysdate,
jq.job_start_date       = sysdate,
jq.job_queue_status     = 'REA',
jq.job_percent_change   = '0',
jq.job_percent_complete = '0'
where jq.job_id in (select t.job_id
from job_queue jq, task t
where jq.job_queue_status in ('NOR', 'EXE', 'ERR', 'COM')
and t.job_id = jq.job_id
and t.task_status = 'Ready'
and t.task_type = 'DD'
and t.document_number=give your document number);


Also look into job_error table for the job_id as mentioned above to ensure there is no validation failure for the DD task.

Hope above helps in your issues related to stuck DD tasks. Please leave your feedback or query.