Author |
Message
|
mqmhr |
Posted: Fri Dec 15, 2006 5:12 pm Post subject: 2010 Error |
|
|
Centurion
Joined: 28 Dec 2004 Posts: 105
|
Here is our scenario
MaxMsgLength on Server Connection channel , Queue Manager and Queue - 100 MB
Both client and server are in HP-UX platform
Trying to put a 180 MB message to the queue from a Java application using MQMF_SEGMENTATION_ALLOWED, but this results in a 2010.
Any pointers to the problem would be greatly helpful.
Thanks |
|
Back to top |
|
 |
wschutz |
Posted: Fri Dec 15, 2006 6:13 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
How is the client connecting? MQSERVER, client channel table, mqconnx? Most likely the problem is that the CLNTCONN end of the channel is defaulting to 4M. _________________ -wayne |
|
Back to top |
|
 |
mqmhr |
Posted: Fri Dec 15, 2006 6:56 pm Post subject: |
|
|
Centurion
Joined: 28 Dec 2004 Posts: 105
|
We have defined a client connection channel at the server with the same name as the server connection channel and have given 100MB as the max message length. |
|
Back to top |
|
 |
wschutz |
Posted: Fri Dec 15, 2006 7:03 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Please explain a lot more about what you are doing. Is the a "c" program? How exactly are you using the CLNTCONN definition?
Defining the CLNTCONN channel at the server end is not enough, you must use the definition at the client end. _________________ -wayne |
|
Back to top |
|
 |
mqmhr |
Posted: Fri Dec 15, 2006 7:53 pm Post subject: |
|
|
Centurion
Joined: 28 Dec 2004 Posts: 105
|
At the client machine, the application is written in Java.
Also, at the client machine, we have copied the client channel definition table and we are using the environment variables MQCHLTAB = AMQCLCHL.TAB and
MQCHLLIB = /var/mqm/qmgrs/<QMName>/@ipcc
We do not have an MQSERVER Environment variable. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Dec 16, 2006 3:25 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Java programs do not use the MQSERVER or MQCHLTAB and MQCHLLIB environment variables.
You can, in v6, set specific options in the MQEnvironment object, to use a client table. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wschutz |
Posted: Sat Dec 16, 2006 3:53 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Are you doing this?
Code: |
URL channel = new URL("file://localhost/tmp/AMQCLCHL.TAB");
// Create a connection to the QueueManager
System.out.println("Connecting to queue manager: "+qManager);
MQQueueManager qMgr = new MQQueueManager(qManager, channel); |
_________________ -wayne |
|
Back to top |
|
 |
mqmhr |
Posted: Mon Dec 18, 2006 6:43 pm Post subject: |
|
|
Centurion
Joined: 28 Dec 2004 Posts: 105
|
We modified the Java program to use the client channel table, still we are encountering 2010 error. I am pasting the code snippet
public void runSample() {
try {
// Create a connection to the QueueManager
System.out.println("Connecting to queue manager: " + qManager);
URL channel = new URL("file://localhost/var/mqm/qmgrs/AIQM/@ipcc/AMQCLCHL.TAB");
// Create a connection to the QueueManager
qMgr = new MQQueueManager(qManager, channel);
// Set up the options on the queue we wish to open
int openOptions = MQC.MQOO_OUTPUT;
// Now specify the queue that we wish to open and the open options
System.out.println("Accessing queue: " + qName);
MQQueue queue = qMgr.accessQueue(qName, openOptions);
StringBuffer message = new StringBuffer("");
try {
BufferedReader in = new BufferedReader(new FileReader("test.txt"));
String str;
while ((str = in.readLine()) != null)
{
message.append(str);
}
in.close();
}
catch (IOException e) {
e.printStackTrace();
}
// Define a simple WebSphere MQ Message ...
MQMessage msg = new MQMessage();
msg.messageFlags = MQC.MQMF_SEGMENTATION_ALLOWED;
msg.writeString(new String(message));
// Specify the default put message options
MQPutMessageOptions pmo = new MQPutMessageOptions();
// Put the message to the queue
System.out.println("Sending a message...");
queue.put(msg, pmo);
// Close the queue
System.out.println("Closing the queue");
queue.close();
}
catch (MQException ex) {
System.out
.println("A WebSphere MQ Error occured : Completion Code "
+ ex.completionCode + " Reason Code "
+ ex.reasonCode);
ex.printStackTrace();
} catch (java.io.IOException ex) {
System.out
.println("An IOException occured whilst writing to the message buffer: "
+ ex);
}
}
MaxmsgLength on Queue manager, Queue, CLNTCONN and SVRCONN channels is 100 MB |
|
Back to top |
|
 |
AkankshA |
Posted: Mon Dec 18, 2006 9:08 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
A small query...
MaxMsg length u have specified is 100MB and you are trying to send 180 MB... Shouldn't MQ crib and throw error(as happening) in this case
MaxMsgLength on Server Connection channel , Queue Manager and Queue - 100 MB
Trying to put a 180 MB message to the queue from a Java application |
|
Back to top |
|
 |
mqmhr |
Posted: Mon Dec 18, 2006 9:20 pm Post subject: |
|
|
Centurion
Joined: 28 Dec 2004 Posts: 105
|
I am using MQMF_SEGMENTATION_ALLOWED, which means the upper limit for the message length is 999999999 bytes.
Moreover, I changed the channel maxmsglenth (of the server conn and client conn channels) to 999999999 and still it throws a 2010 error. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Dec 19, 2006 4:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Review what the manuals have to say about segmentation. I believe the qmgr will segment automatically but first you have to get the message to the qmgr.
This still means that if your message is over the limit for the clnt channel you cannot get it to the qmgr.... and have to segment it yourself...?
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
wschutz |
Posted: Tue Dec 19, 2006 4:14 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
fjb_saper wrote: |
Review what the manuals have to say about segmentation. I believe the qmgr will segment automatically but first you have to get the message to the qmgr.
This still means that if your message is over the limit for the clnt channel you cannot get it to the qmgr.... and have to segment it yourself...?
Enjoy  |
I think fj hit the nail on the head .... what happens if you try a 90Meg message, that shuold work.... _________________ -wayne |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Dec 19, 2006 4:25 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
wschutz wrote: |
fjb_saper wrote: |
Review what the manuals have to say about segmentation. I believe the qmgr will segment automatically but first you have to get the message to the qmgr.
This still means that if your message is over the limit for the clnt channel you cannot get it to the qmgr.... and have to segment it yourself...?
Enjoy  |
I think fj hit the nail on the head .... what happens if you try a 90Meg message, that shuold work.... |
He would have to lower the queue's max to less than the max (100MB) to achieve segmentation (Queue max < message length <= clnt channel ==> segmentation)
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
wschutz |
Posted: Tue Dec 19, 2006 4:29 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
fjb_saper wrote: |
wschutz wrote: |
fjb_saper wrote: |
Review what the manuals have to say about segmentation. I believe the qmgr will segment automatically but first you have to get the message to the qmgr.
This still means that if your message is over the limit for the clnt channel you cannot get it to the qmgr.... and have to segment it yourself...?
Enjoy  |
I think fj hit the nail on the head .... what happens if you try a 90Meg message, that shuold work.... |
He would have to lower the queue's max to less than the max (100MB) to achieve segmentation (Queue max < message length <= clnt channel ==> segmentation)
Enjoy  |
Yes, of course, I just wanted to see that the changes he made for 100M msg were in effect (using the correct channel ,etc...need more coffee). _________________ -wayne |
|
Back to top |
|
 |
mqmhr |
Posted: Tue Dec 19, 2006 9:08 am Post subject: |
|
|
Centurion
Joined: 28 Dec 2004 Posts: 105
|
I am able to send a message wiith size <= 100 MB successfully, and also able to segment it. But my requirement is to segment a message of size 180MB.
If I define the channel maxmessagelengths to say, 200MB, isnt that enough to get a 180 MB message from the client to the server ?
I had increased the channel maxmsglenth to > 180 MB (have tried giving 200MB and 999999999). In spite of this, can the channel be the limiting factor here ? Or am I missing some other configuration detail ? |
|
Back to top |
|
 |
|