Author |
Message
|
Rohit_ |
Posted: Thu Jan 10, 2008 8:33 am Post subject: MQJE016: MQ queue manager closed channel immediately during |
|
|
 Novice
Joined: 10 Jan 2008 Posts: 24
|
Group,
I am running a sample code to connect to MQ Host.
Below are the properties i am using.
MQEnvironment.hostname = "193.23.45.23";
MQEnvironment.port = 1414;
MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT);
I am geting below exceptions on console :
MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
Below is the snippet from AMQERR01.LOG
-------------------------------------------------------------------------------------
AMQ9999: Channel program ended abnormally.
EXPLANATION:
Channel program '' ended abnormally.
ACTION:
Look at previous error messages for channel program '' in the error files to determine the cause of the failure.
------------------------------------------------------------------------------------
While creating QMgr the channel was not created.
Q. Does Channel name is manadatory for client connection?
Q. Is this exception is because of absence of channel?
I get the exception very after this statement :
MQQueueManager qMgr = new MQQueueManager(qManager);
Please help me with this.
thanks,
R.
[/b] |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jan 10, 2008 8:37 am Post subject: Re: MQJE016: MQ queue manager closed channel immediately dur |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Rohit_ wrote: |
Q. Does Channel name is manadatory for client connection?
Q. Is this exception is because of absence of channel? |
Yes. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
KramJ |
Posted: Fri Jan 11, 2008 6:55 am Post subject: |
|
|
Voyager
Joined: 09 Jan 2006 Posts: 80 Location: Atlanta
|
Try adding:
MQEnvironment.channel = "SYSTEM.DEF.SVRCONN"; |
|
Back to top |
|
 |
Rohit_ |
Posted: Fri Jan 11, 2008 7:42 am Post subject: |
|
|
 Novice
Joined: 10 Jan 2008 Posts: 24
|
KramJ,
Now I am geeting this on console :
MQJE001: An MQException occurred: Completion Code 2, Reason 2058
MQJE036: Queue manager rejected connection attempt
thanks in advance |
|
Back to top |
|
 |
KramJ |
Posted: Fri Jan 11, 2008 7:49 am Post subject: |
|
|
Voyager
Joined: 09 Jan 2006 Posts: 80 Location: Atlanta
|
That's MQRC_Q_MGR_NAME_ERROR. Double check that your have the queue manager name right. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jan 11, 2008 7:55 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
KramJ wrote: |
That's MQRC_Q_MGR_NAME_ERROR. Double check that your have the queue manager name right. |
Double-check that you aren't specifying a qmgr name at all, as it's not needed for a client connection. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Rohit_ |
Posted: Fri Jan 11, 2008 8:15 am Post subject: |
|
|
 Novice
Joined: 10 Jan 2008 Posts: 24
|
jefflowrey,
How i can connect to Q manager without a name in client mode?
where can i find a sample application that uses client mode to conect to queue manager?
thanks |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jan 11, 2008 8:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Rohit_ wrote: |
where can i find a sample application that uses client mode to conect to queue manager?
|
There's sample code where the queue manager is installed, also at http://www.capitalware.biz/mqseries.html through Roger's kind efforts.
The answer to your other question can be found in the Clients manual. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Jan 11, 2008 9:19 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Rohit_ wrote: |
jefflowrey,
How i can connect to Q manager without a name in client mode?
thanks |
Only 1 QM can ever be listening on a particular hostname / port #. So IBM was kind enough to make the QM name optional for MQ Clients as long as you supply all the other parms correctly.
The only time an MQ Client needs to specify the QM Name is if it is using an MQ Client Channel table and that table was built with the QM name in the CLNTCONN channel def. In that case you must code the QM name, or some part of it with an "*" at the end. (I think maybe even just * will work, but not blank, in this scenario). _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|