|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
PCF fails to start Service - MQRCCF_COMMAND_FAILED |
« View previous topic :: View next topic » |
Author |
Message
|
rraam75 |
Posted: Wed Jan 09, 2008 11:44 am Post subject: PCF fails to start Service - MQRCCF_COMMAND_FAILED |
|
|
Novice
Joined: 18 Mar 2006 Posts: 14
|
Hello,
I use below PCF pgm to start the websphere mq service.
But ended with the error code 3008: MQRCCF_COMMAND_FAILED. The name of the service is correct and Iam able to start the service through websphere mq explorer.
Envn: windows
version : websphere mq 6
--------------------------------------------------------
PCFMessageAgent agent = new PCFMessageAgent();
agent.connect(host,port,channel,cmdq,qmgr);
System.out.println("Agent connected ...");
PCFMessage request = new PCFMessage (CMQCFC.MQCMD_START_SERVICE);
request.addParameter (CMQC.MQCA_SERVICE_NAME, "SVC.GACS01031");
PCFMessage [] responses = agent.send (request);
--------------------------------------------------------
Pls help me out on where iam doing wrong.
Advance thanks for your help. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jan 09, 2008 11:47 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
There will be additional messages in responses that tell you what the error actually is. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
rraam75 |
Posted: Wed Jan 09, 2008 1:56 pm Post subject: |
|
|
Novice
Joined: 18 Mar 2006 Posts: 14
|
Hello Jeff,
No response generated for the above code.
In fact, MQException arise while executing the below line,
Code: |
PCFMessage [] responses = agent.send (request);
|
When I looked in the doc, there is only one required parameter (ie., service name) and that I have mentioned in the code.
Any suggestion pls |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jan 09, 2008 2:58 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You see how that variable called "responses" is an ARRAY?
there's more than one response in there.
One of the other elements in that response array will tell you what the problem is. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
rraam75 |
Posted: Thu Jan 10, 2008 12:19 am Post subject: |
|
|
Novice
Joined: 18 Mar 2006 Posts: 14
|
Thanks Jeff for your support.
But you didn't get my point.
Here is my complete code,
PCFMessage [] responses = null;
try {
PCFMessageAgent agent = new PCFMessageAgent();
agent.connect(host,port,channel,cmdq,qmgr);
PCFMessage request = new PCFMessage (CMQCFC.MQCMD_START_SERVICE);
request.addParameter (CMQC.MQCA_SERVICE_NAME, "BROKER.GACS01031");
System.out.println("Before getting Response...");
responses = agent.send (request);
System.out.println("Got Response...");
for (int i = 0; i < responses.length; i++) {
PCFMessage response = responses [i];
int reason = response.getCompCode();
switch (reason) {
case CMQCFC.MQRCCF_NO_START_CMD:
System.out.println("Start command parameter of this service is blank");
break;
default:
System.out.println("Service is Running");
break;
}
}
} catch (MQException mqe) {
System.err.println ("Error caught is :"+mqe);
System.err.println (mqe + ": " + PCFConstants.lookupReasonCode (mqe.reasonCode));
System.out.println("Responses :"+responses);
}
Execution fails at the point ,
Code: |
responses = agent.send (request); |
As expected responses will be always 'null'..
Here is the result after running the above code,
----------------------------
Before getting Response...
Error caught is :com.ibm.mq.pcf.PCFException: MQJE001: Beendigungscode 2, Ursache 3008
com.ibm.mq.pcf.PCFException: MQJE001: Beendigungscode 2, Ursache 3008: MQRCCF_COMMAND_FAILED
Responses :null
--------------------------------
If you look at the above output, statement "Got Response" is not printed,
Any help pls... |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jan 10, 2008 5:00 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Okay.
If you look up documentation on that error message, it says that additional details are provided in the other responses.
But I forgot where the additional excpetion responses are stored...
Code: |
catch (MQException mqe) {
System.err.println ("Error caught is :"+mqe);
System.err.println (mqe + ": " + PCFConstants.lookupReasonCode (mqe.reasonCode));
MQException source = (MQException) (mqe.exceptionSource);
if (source != null) {
responses = (PCFMessage[]) (source.exceptionSource);
} else {
responses = (PCFMessage[]) (mqe.exceptionSource);
}
//Process/display responses in full
} |
This may not be entirely correct for all excpetions. But it's very similar to what I'm using in ms0s, so it's at least functional in most cases. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
rraam75 |
Posted: Thu Jan 10, 2008 5:29 am Post subject: |
|
|
Novice
Joined: 18 Mar 2006 Posts: 14
|
Thanks Jeff.
Here how I updated the catch block from the above...
---------
} catch (MQException mqe) {
System.err.println ("Error caught is :"+mqe);
System.err.println (mqe + ": " + PCFConstants.lookupReasonCode (mqe.reasonCode));
System.out.println("Responses :"+responses);
responses = (PCFMessage[])mqe.exceptionSource;
for(int i=0;i<responses.length;i++){
System.out.println(responses[i]);
}
-------------------
Here is the output of this:
---------
[PCFMessage:
MQCFH: type: 2, strucLength: 36, version: 1, command: 155 = MQCMD_START_SERVICE, msgSeqNumber: 1, control: 0, compCode: 2, reason: 3008, parameterCount: 0, PCFMessage:
MQCFH: type: 2, strucLength: 36, version: 1, command: 155 = MQCMD_START_SERVICE, msgSeqNumber: 2, control: 1, compCode: 2, reason: 3008, parameterCount: 0]
--------
I couldn't draw any conclusion from this output.
Could you help me again. thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jan 10, 2008 5:48 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The information you need is in there somewhere... I'd recommend using a visual debugger and looking at the returned exception object. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
rraam75 |
Posted: Thu Jan 10, 2008 6:36 am Post subject: |
|
|
Novice
Joined: 18 Mar 2006 Posts: 14
|
Thanks again Jeff.
In debugging mode,
Below values are noted for varibles
a) variable = request
PCFMessage:
MQCFH: type: 1, strucLength: 36, version: 1, command: 155 = MQCMD_START_SERVICE, msgSeqNumber: 1, control: 1, compCode: 0, reason: 0, parameterCount: 1
MQCFST: type: 4, strucLength: 36, parameter: 2077 = MQCA_SERVICE_NAME, codedCharSetId: 0, stringLength: 16, string: 'BROKER.GACS01031'
b) varibale =responses
null
Above variable values captured before executing the line,
Quote: |
responses = agent.send (request); |
Variable values in catch block,
------------------------------
In variable mqe,
cause = com.ibm.mq.pcf.PCFException: MQJE001: Beendigungscode 2, Ursache 3008
completionCode =2
detailMessage = null
exceptionSource =
[PCFMessage:
MQCFH: type: 2, strucLength: 36, version: 1, command: 155 = MQCMD_START_SERVICE, msgSeqNumber: 1, control: 0, compCode: 2, reason: 3008, parameterCount: 0, PCFMessage:
MQCFH: type: 2, strucLength: 36, version: 1, command: 155 = MQCMD_START_SERVICE, msgSeqNumber: 2, control: 1, compCode: 2, reason: 3008, parameterCount: 0]
insert1=null
insert2=null
msgid=0
numinserts=0
ostrMessage=MQJE001: Beendigungscode 2, Ursache 3008
reasonCode=3008
stackTrace=null
underlyingException=null
underlyingSet=false
--------------------------------------
I didn't find any useful information in debugging mode. Everywhere reasoncode "3008" is given and no info for the reason for that. Very vague details..
Jeff are you able to run the above piece of code in your systems successfully.
Thanks... |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jan 10, 2008 6:48 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I haven't tried it yet... I'll give it a rip when I get a chance.
What version of MQ v6, btw? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jan 10, 2008 7:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Quote: |
=>mqrc 3008
3008 0x00000bc0 MQRCCF_COMMAND_FAILED |
You would have to investigate why the start service command failed.
Does that mean the service is already running??
Is the environment (when you execute this command) the same as when you run it interactively from MQExplorer?
Are the users/user group membership the same?
Is there a problem in the way you build your PCF command (see parameter count 0 in the 3008 message...) ? _________________ MQ & Broker admin |
|
Back to top |
|
 |
rraam75 |
Posted: Thu Jan 10, 2008 8:24 am Post subject: |
|
|
Novice
Joined: 18 Mar 2006 Posts: 14
|
Thanks fjb.
Code: |
Does that mean the service is already running?? |
No.
Code: |
Is the environment (when you execute this command) the same as when you run it interactively from MQExplorer? |
Websphere mq 6 & the PCF code I execute are having same windows environment. But both are in different boxes.
Code: |
Are the users/user group membership the same? |
Sorry,I don't know how to check.
But I have another PCF pgm to check the channel status and that was running without any error.
Only problem arise when I try to use to the PCF command to start (or) stop mq objects like Listener, Services and not any error while enquiring mq objects.
If at all there is any lack of permission then I should be ended with the reason code (2035, X’7F3’) Not authorized for access. Isn't ?
Code: |
Is there a problem in the way you build your PCF command (see parameter count 0 in the 3008 message...) ? |
If you look at the variable request there the parameter count is "1", i think which is correct. (Here the parameter is, ServiceName->"BROKER.GACS01031")
And, the parameter count in the response is "0", I think during exception condition there will not be any parameter's.
Again thanks... |
|
Back to top |
|
 |
rraam75 |
Posted: Thu Jan 10, 2008 11:38 am Post subject: |
|
|
Novice
Joined: 18 Mar 2006 Posts: 14
|
Any other suggestion pls...
If anyone has started the websphere mq services through PCF api, then pls share your code.. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|