Author |
Message
|
edds2008 |
Posted: Thu Jun 25, 2009 1:56 am Post subject: Connection negotiation failure when connect to QM |
|
|
Newbie
Joined: 25 Jun 2009 Posts: 4
|
Hi all, I am new in QM, I have a machine setup with MQ v7.0, and the other client machine setup with MQ Client v7. For my question, I want to using a Java program in client machine to get and set message to/from MQ server. I have using some sample code from the internet. But it's flow a JmqiException and cannot connect to the QM. I have tried the sample code in C++ (imqsgetc and imqsputc), it's work fine with these two command. But it's doesn't work in the java program.
It's hard to understand what's wrong with the program. Is it the server configuration problem or anything else. It's appreciate your kindly suggestion. Thanks.
Program:
lQConnFac.setChannel("TestChannel");
lQConnFac.setQueueManager("QM_test");
lQConnFac.setPort(1414);
lQConnFac.setHostName("xxx.xxx.xxx.xxx");
lQConnFac.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
lQConnFac.setCCSID(950);
lQConn = (MQQueueConnection) lQConnFac.createQueueConnection("xxxx","xxxx"); <-- the exception is throw in this line
Here are the exception
Exception Msg: CC=2;RC=2059;AMQ9503: Channel negotiation failure。 [3=TestChannel]
com.ibm.mq.jmqi.JmqiException: CC=2;RC=2059;AMQ9503: Channel negotiation failure [3=TestChannel]
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnection.initSess(RemoteConnection.java:1520)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnection.connect(RemoteConnection.java:1074)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnectionPool.getConnection(RemoteConnectionPool.java:466)
at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:1410)
at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:335)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:7926)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:7396)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:276)
at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6076)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:144)
at MQSender.<init>(MQSender.java:66)
at MQSender.main(MQSender.java:164) |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 25, 2009 2:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Quote: |
QConnFac.setChannel("TestChannel");
lQConnFac.setQueueManager("QM_test");
lQConnFac.setPort(1414);
lQConnFac.setHostName("xxx.xxx.xxx.xxx");
lQConnFac.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP); |
Are you sure of the case of all the variables initialized here?
Does the qmgr QM_test exist on said host? Does it have a channel named TestChannel of category SVRCONN? Is it's listener running on port 1414 and is the qmgr running?
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
edds2008 |
Posted: Thu Jun 25, 2009 2:59 am Post subject: |
|
|
Newbie
Joined: 25 Jun 2009 Posts: 4
|
Yes, I have set all these variable , and checked many many times for the correctness.A QM_Test is started, a server connection channel TestChannel is created and started, a listener is set at 1414 port and ready. It's work fine in c++, but it don't work in java. I feel confused on that. And I have read others post with the same problem, and try many many different method. But still no cue.
I have read the log file, it have a error:
Process(616.39) User(MUSR_MQADMIN) Program(amqrmppa.exe)
AMQ9208: ........error
TCP/IP (recv) .....10054(X'2746')
Can anyone help.....Thanks.
 |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 25, 2009 3:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
So what happens if you leave the CCSID field of the qcf blank? or set it to 1208 ? Does your java implementation have ccsid 950 installed ? What is your default locale?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jun 25, 2009 3:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Does it work in C++ then immediately fail in Java? Or did it work a few days ago in C++ and the Java's never worked?
See if the C++ works now, then try the Java. If both fail, ask your network people what they've changed since your last successful test in C++. Do not accept "we've not changed anything" as an answer; network people always say that.
If c++ works & Java doesn't you need someone who knows more Java than me! _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
edds2008 |
Posted: Thu Jun 25, 2009 7:15 am Post subject: |
|
|
Newbie
Joined: 25 Jun 2009 Posts: 4
|
I have tried to leave blank for the CCSID, it throw the same exception. For the locale of the server is 950.
For the C++ program, it always can connect to qm. I have create a new Queue and Server connection channel to test the c++ program, it's work fine for get and set message from queue. But the Java program can't work.
I have also try create a new mquser and assign to the msm group, it's also not working.
I have tried to catch all the exception throws by the JMSException and jmsqi exception, it state that connection reject, cannot establish connection with "TestChannel", most of the error message are same.
Can anyone help.....Thanks. |
|
Back to top |
|
 |
rekarm01 |
Posted: Thu Jun 25, 2009 7:14 pm Post subject: Re: Connection negotiation failure when connect to QM |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
fjb_saper wrote: |
edds2008 wrote: |
lQConnFac.setQueueManager("QM_test"); |
Are you sure of the case of all the variables initialized here?
Does the qmgr QM_test exist on said host? |
edds2008 wrote: |
Yes, I have set all these variable, and checked many many times for the correctness. A QM_Test is started ... |
One likely reason for fjb_saper's question was the inconsistent spelling between "QM_test" and "QM_Test". Either the posted commentary is wrong, or the posted code is wrong, or both. Which is it? |
|
Back to top |
|
 |
edds2008 |
Posted: Thu Jun 25, 2009 7:49 pm Post subject: |
|
|
Newbie
Joined: 25 Jun 2009 Posts: 4
|
It's QM_test in both MQ server and Java code. I have check the spelling and all the channel, queue are with equal case.
Can anyone help? Thanks |
|
Back to top |
|
 |
rekarm01 |
Posted: Fri Jun 26, 2009 2:35 am Post subject: Re: Connection negotiation failure when connect to QM |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
edds2008 wrote: |
com.ibm.mq.jmqi.JmqiException: CC=2;RC=2059;AMQ9503: Channel negotiation failure [3=TestChannel] |
Is this useful?
Code: |
AMQ9503
Channel negotiation failed.
Severity
30 : Severe error
Explanation
Channel <insert_3> between this machine and the remote machine could not be established due to a negotiation failure.
Response
Tell the systems administrator, who should attempt to identify the cause of the channel failure using problem determination techniques. For example, look for FFST files, and examine the error logs on the local and remote systems where there may be messages explaining the cause of failure. More information may be obtained by repeating the operation with tracing enabled. |
|
|
Back to top |
|
 |
WMBDEV1 |
Posted: Fri Jun 26, 2009 3:35 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
|
Back to top |
|
 |
|