Author |
Message
|
hilltops |
Posted: Fri Feb 02, 2007 3:21 am Post subject: AMQ9492 and AMQ9208 when using MQ Client with channel tables |
|
|
Centurion
Joined: 01 Mar 2006 Posts: 112
|
I am having what appears to be network problem with I try to connect to queue managers over MQI channels configured for SSL. I have got a infrastructure that involves a client machine (hosting a java application), an IP load balancer (CSS) and two mahines hosting two server queue managers. The idea is to let CSS distributed the load to the queue managers using a round-robin algorithm.
On QM1
DEFINE CHANNEL(TEST.SVRCONN.SSL) CHLTYPE(SVRCONN) TRPTYPE(TCP) +
DESCR('Server connection on queue manager QM1) +
SSLCIPH(RC4_MD5_EXPORT) +
SSLCAUTH(REQUIRED) +
MCAUSER('myuser') +
REPLACE
DEFINE CHANNEL(TEST.SVRCONN.SSL) CHLTYPE(CLNTCONN) TRPTYPE(TCP) +
DESCR('Client connection to queue managers QM1or QM2) +
CONNAME('CSS_MACHINE_HOSTNAME(15030)') +
QMNAME(' ') +
SSLCIPH(RC4_MD5_EXPORT) +
REPLACE
DEFINE QL(TEST)
The channel definition table (AMQCLCHL.TAB) was copied from the QM1 machine to the client machine. The location of AMQCLCHL.TAB is reference in the java code as a URL in the constructor of the queue manager object.
On QM2
DEFINE CHANNEL(TEST.SVRCONN.SSL) CHLTYPE(SVRCONN) TRPTYPE(TCP) +
DESCR('Server connection on queue manager QM2') +
SSLCIPH(RC4_MD5_EXPORT) +
SSLCAUTH(REQUIRED) +
MCAUSER('myuser') +
REPLACE
DEFINE QL(TEST)
The are certificate stores and certificate on the client and server side. Upon running the code I have observer the following in the queue manager error logs. Any Ideas?
02/02/07 10:02:02 - Process(23498.23179) User(myuser) Program(amqrmppa)
AMQ9492: The TCP/IP responder program encountered an error.
EXPLANATION:
The responder program was started but detected an error.
ACTION:
Look at previous error messages in the error files to determine the error
encountered by the responder program.
----- amqrmrsa.c : 459 --------------------------------------------------------
02/02/07 10:02:04 - Process(23498.23180) User(myuser) Program(amqrmppa)
AMQ9208: Error on receive from host myhostname(***.***.***.***).
EXPLANATION:
An error occurred receiving data from myhostname(***.***.***.***) over TCP/IP.
This may be due to a communications failure.
ACTION:
The return code from the TCP/IP (read) call was 104 (X'68'). Record these
values and tell the systems administrator. |
|
Back to top |
|
 |
exerk |
Posted: Fri Feb 02, 2007 3:30 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
The TCP error code translates to:
Quote: |
M104, IPC event identifier is not a valid job-number
This error occurs when an attempt is made to trigger an event for another process (see the ETRIGGER command), and the value of the process-identifier is not a valid job-number. |
Have you tried it without SSL first to ensure the set-up works, although you're post is not showing any explicit SSL errors generated?
Have you tried direct connection first, i.e. without the load-balancer, to remove that from the equation? _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Feb 02, 2007 3:35 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The loadbalancer is only coming into effect when the client establishes a connection, right? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
hilltops |
Posted: Fri Feb 02, 2007 4:22 am Post subject: |
|
|
Centurion
Joined: 01 Mar 2006 Posts: 112
|
I am able to successfully connecting and puting messages (alternately) to the queue managers. So it appears the SSL configurations and channel definitions are correct. But I get these worrying messages in the error logs. My sample application is as follows. Is it an appication problem?
Code: |
import com.ibm.mq.*;
import java.net.*;
public class SSLMultiPutSample {
private static final String reqQName = "TEST";
private static final String qmgrName = "";
private static final String url = "file:///D:/Program Files/IBM/WebSphere MQ/Clients/channeltable/AMQCLCHL.TAB";
private static final int numThreads = 20;
private static final String sslkeyr = "D:\\Program Files\\IBM\\WebSphere MQ\\Clients\\ssl\\store.jks";
private static final String sslpass = "mypassword";
public static void main(String args[]) {
for(int i = 1; i <= numThreads; i++){
PutThread putThread = new PutThread(i);
putThread.start();
}
}
public static class PutThread extends Thread {
private int number;
public PutThread(int threadNo){
number = threadNo;
}
public void run(){
System.setProperty("javax.net.ssl.trustStore", sslkeyr );
System.setProperty("javax.net.ssl.trustStorePassword", sslpass );
System.setProperty("javax.net.ssl.keyStore", sslkeyr );
System.setProperty("javax.net.ssl.keyStorePassword", sslpass );
System.out.println("Thread number "+ number + " Connecting to the queue manager ...");
java.net.URL chldefurl = null;
try
{
chldefurl = new URL(url);
}
catch(Exception e){
System.out.println("Malformed URL...Quiting");
System.exit(1);
}
try {
MQQueueManager qMgr = new MQQueueManager(qmgrName, chldefurl);
int openOptions = MQC.MQOO_OUTPUT ;
MQQueue reqQueue = qMgr.accessQueue(reqQName, openOptions);
MQMessage myMessage = new MQMessage();
myMessage.writeUTF("Testing");
MQPutMessageOptions pmo = new MQPutMessageOptions();
reqQueue.put(myMessage,pmo);
reqQueue.close();
System.out.println("Thread number "+ number + " Connection successful!");
if(number == 10 || number == 15){
try{
System.out.println("Hold connection open for 60s. Go check that the SVRCONN is running!");
Thread.sleep(60000);
}
catch(Exception e){
}
}
System.out.println("Thread number "+ number +" Disconnecting from the Queue Manager");
qMgr.disconnect();
System.out.println("Done!");
}
catch (Exception ex) {
System.out.println("A WebSphere MQ Error occured : ..................");
ex.printStackTrace();
}
}
}
} |
|
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Feb 02, 2007 4:31 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
...
What are the design requirements for this code?
There's a lot of odd stuff in there.
Are you sure you don't want to be using a connection pool? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
hilltops |
Posted: Fri Feb 02, 2007 5:08 am Post subject: |
|
|
Centurion
Joined: 01 Mar 2006 Posts: 112
|
This code is just basic stuff to test the MQ infrastructure (SSL, load-balancing etc). It is not intended as production code. Eventually I intend to use some sort of connection pooling. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Feb 02, 2007 5:29 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
That's a relief.
Otherwise, the only thing I think might be causing an issue is that sleep. That could be causing the load balancer or a network firewall to assume that the connection is dead and close it out from under you. Or the load balancer to assume that you're creating a new connection, and thus switch your client channel to the other machine. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
hilltops |
Posted: Wed Feb 14, 2007 2:57 am Post subject: |
|
|
Centurion
Joined: 01 Mar 2006 Posts: 112
|
It turns out these errors messages are due to MQ responding to the probe messages from CSS, the load-balancer. These probes are sent every few seconds directly to the MQ port on the server. Because these error outputs cannot be suppressed, it has become evident that MQ cannot be used in combination with this load-balancer.
Thanks |
|
Back to top |
|
 |
|