|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
channel closed immdiately |
« View previous topic :: View next topic » |
Author |
Message
|
madhoo |
Posted: Fri Oct 27, 2006 3:50 am Post subject: channel closed immdiately |
|
|
Newbie
Joined: 27 Oct 2006 Posts: 8
|
Hi ,
Iam new to mq with some R&D i had coded to put a message on Mqqueue
but when iam running the code in my WAS6.0 iam gettting the following error
MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
MQJE001: Completion Code 2, Reason 2009
and i checked with my MqAdmin abt the channel it was running up
MQQueue submitQueue ;
MQEnvironment.hostname = mqHostname;
MQEnvironment.channel = mqChannel;
MQEnvironment.port = Integer.parseInt(mqPort);
MQEnvironment.userID="in914299";
MQEnvironment.password="shi1ram";
MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT);
System.out.println("we are");
MQQueueManager queueMgr = new MQQueueManager(mqQManager);
System.out.println("we are");
int inputOptions = 0;
int[] inputOptsList = {MQC.MQOO_OUTPUT, MQC.MQOO_FAIL_IF_QUIESCING};
for (int i = 0; i < inputOptsList.length; i++) {
inputOptions = inputOptions + inputOptsList[i];
}
System.out.println("we are");
submitQueue = queueMgr.accessQueue(mqInputQueue, inputOptions, "", "", "");
System.out.println("we are");
MQMessage inputMsg = new MQMessage();
inputMsg.format = MQC.MQFMT_STRING;
inputMsg.messageType = MQC.MQMT_DATAGRAM;
inputMsg.persistence = MQC.MQPER_PERSISTENT;
String msgToSend = "we are using MQ";
inputMsg.writeString(msgToSend);
MQPutMessageOptions PMO = new MQPutMessageOptions();
PMO.options = MQC.MQPMO_SYNCPOINT + MQC.MQPMO_FAIL_IF_QUIESCING;
submitQueue.put(inputMsg, PMO);
please can any tell where could the problem |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 27, 2006 3:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Some basics, that you haven't said you know:
1) The channel MUST be a SVRCONN channel
2) The channel MUST be specified in the CORRECT case - it *is* case sensitive
3) The port number must be the one that the queue manager is listening to
4) The hostname must be correct
5) The hostname and port must be reachable from the client machine - try a telnet, if that doesn't work you'll never get your code to work
6) The MQRC is clearly documented in the MQ Information Center. Each RC will tell you what a likely cause of the problem is and give you a likely suggestion. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
madhoo |
Posted: Fri Oct 27, 2006 5:40 am Post subject: |
|
|
Newbie
Joined: 27 Oct 2006 Posts: 8
|
hi Jeff,
thanks for your info it helped me to put message in the Queue
I was not refering the SVR channel
thanks again |
|
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
|
|
|
|