ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » 2010 error . Urgent help need

Post new topic  Reply to topic
 2010 error . Urgent help need « View previous topic :: View next topic » 
Author Message
007_pandi
PostPosted: Sun Feb 01, 2004 8:35 pm    Post subject: 2010 error . Urgent help need Reply with quote

Novice

Joined: 29 Jul 2002
Posts: 23

Hi,

I am facing a problem with the client error code 2010.

OS: windows 2000 server with service pack 4
MQ : version 5.2.1


I am using same m/c as MQ server and client. Client code in C/C++ . I have declared MQMD and MQPMO option is default. I am Using server connection channel and its maxmsgl attribute values is 50MB. Both Queue and QueueManager maxmsgl is 80MB. I am trying to put 20 MB file size data. Getting client error code 2010 and error in server log is AMQ 9208.

There is no problem of transferring 4MB data.

I am not using MQSERVER environment variable.

Can anybody please help to solve this problem.

Thanks in Advance.

by
Pandiarajan.J
Back to top
View user's profile Send private message Send e-mail
leongor
PostPosted: Sun Feb 01, 2004 11:55 pm    Post subject: Reply with quote

Master

Joined: 13 May 2002
Posts: 264
Location: Israel

It looks like channel message size problem. Double check that you are using the right message channel.
May be you have multiple definitions in a channel table ?
Check what CCSID you use (Unicode maybe ?). Try increasing to maximum 100 MB size.
_________________
Regards.
Leonid.

IBM Certified MQSeries Specialist.
Back to top
View user's profile Send private message
007_pandi
PostPosted: Mon Feb 02, 2004 2:17 am    Post subject: Reply with quote

Novice

Joined: 29 Jul 2002
Posts: 23

Hi,

Server connection channel name is correct. (using default. SYSTEM.DEF.SVRCONN). Channel size is 50 MB which is more than enough for transfer 20 MB data.

Thing is I have changed the MAXMSGL attribut eto 50 MB from 4MB. Will it create multiple definition in CHLTAB?. In that case how to trace or to specify to take latest definition?.

I haven't specified anything in CCSID field. But while 2010 problem, the CCSID field in MQMD seems to tbe the value '0'. What correct value and where I have to specify for this?.


The last thing, I have tried from java program. It is working perfectly. Only thing is i have given the option java -Xms to 200MB. And also i have increased the MQ primary and secondary log file size to enough.
In java i am using the same Channel (SYSTEM.DEF.SVRCONN).(client mode connection).

-----------------------------------------------------------------
The following code i am using in my C/C++

MQMD md = {MQMD_DEFAULT}; // Message Descriptor
MQPMO pmo = {MQPMO_DEFAULT}; // put message options
MQLONG CompCode; // completion code
MQLONG Reason; // reason code
MQLONG BCompCode;
MQLONG BReason;
MQLONG messlen = len; // message length
PMQVOID mqpv=NULL;
mqpv=chpmsg;

//md.Version = MQMD_VERSION_2;
try
{


if (len >0)
{

//pmo.Options = MQPMO_SYNCPOINT | MQPMO_FAIL_IF_QUIESCING | MQPMO_NEW_MSG_ID ; // Put Message Option
pmo.Options =MQPMO_FAIL_IF_QUIESCING ;
// character string format
//memcpy(md.Format, MQFMT_STRING, ((size_t)MQ_FORMAT_LENGTH));


MQPUT(_hcon, // connection handle
m_Putobj, // object handle
&md, // message descriptor
&pmo, // default options (datagram)
messlen, // message length
mqpv,// unsigned char pointer message buffer
&CompCode, // completion code
&Reason); // reason code
-----------------------------------------------------------------


My doubt is I am using VC++ compiler for running this pgm. Any memory restriction is there for unsigned char * variable?. Because in my above code, unsigned char pointter variable is holding data.

Even If I am tring to put 4MB+1 byte data, it is failing with the error code 2010.

Error from server log is
-------------------------------------------------------
AMQ9208: Error on receive from host satyamqp (172.24.8.45).

EXPLANATION:
An error occurred receiving data from pandianhost (172.24.8.45) over TCP/IP. This
may be due to a communications failure.
ACTION:
The return code from the TCP/IP (recv) call was 10054 (X'2746'). Record these
values and tell the systems administrator.
---------------------------------------------------------------

Thanks for any reply.

by
Pandiarajan.J
Back to top
View user's profile Send private message Send e-mail
mqonnet
PostPosted: Mon Feb 02, 2004 6:24 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

Havent come accross this earlier, but here's what is in than manuals.


2010 X'07DA' MQRC_DATA_LENGTH_ERROR
The DataLength parameter is not valid. Either the parameter pointer is not valid, or it points to read-only storage. (It is not always possible to detect parameter pointers that are not valid; if not detected, unpredictable results occur.)

This reason can also be returned to an MQ client program on the MQGET , MQPUT , or MQPUT1 call, if the BufferLength parameter exceeds the maximum message size that was negotiated for the client channel.

Corrective action: Correct the parameter.

If the error occurs for a WebSphere MQ client program, also check that the maximum message size for the channel is big enough to accommodate the message being sent; if it is not big enough, increase the maximum message size for the channel.



Might help track the problem.

By the way, can you post your java app code here as well. Just was curious to see if there were any differences.

But it sure sounds like the size did upset the channel.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
007_pandi
PostPosted: Mon Feb 02, 2004 5:56 pm    Post subject: Reply with quote

Novice

Joined: 29 Jul 2002
Posts: 23

Hi Kumrar,

Thanks for reply. But already I saw error description from ibm docs. Afterthat only I have changed channel maxmsgl attribute.
And also error description 'DataLength parameter is not valid...Either the parameter pointer is not valid......' , I couldn't understand this one. If pointer is invalid means, it should throw error while transfer < 4MB data . But there is no problem of transferring <= 4MB data. But problem arise evern if i transfer 4MB+1 byte data. So any special configuration or special option to be set in program for C/C++ code?.

by
Pandiarajan.J
Back to top
View user's profile Send private message Send e-mail
mqonnet
PostPosted: Tue Feb 03, 2004 5:57 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

Well, since you "say" that it works using Java app and fails with C++ apps, i wouldnt really go into the configuration part, at least initially. And would compare the 2 sources instead and figure out whats different. Thats the very reason i asked you to post your java code as well.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
007_pandi
PostPosted: Wed Feb 04, 2004 10:19 pm    Post subject: Reply with quote

Novice

Joined: 29 Jul 2002
Posts: 23

mqonnet wrote:
post your java code as well.

Cheers
Kumar


--------------------java code----------------------
// Local queue - Client Mode


import com.ibm.mq.*; // Include the MQ package
import java.io.*;

public class SampleServerCnCHL{

public static void main(String s[]){

MQQueueManager qMgr = null;
MQQueue m_cQueue = null;
MQMessage mQMsg = null;

String QManager = s[0];
String QName = s[1];
//String Message = s[2];

System.out.println("Qmanager Name is : <" + QManager + ">");
System.out.println("QName is : <" + QName + ">");

try{

MQEnvironment.hostname ="pandianhost";
MQEnvironment.port = 1414;
MQEnvironment.channel ="SYSTEM.DEF.SVRCONN";

qMgr = new MQQueueManager(QManager);

int openOptions = MQC.MQOO_OUTPUT | MQC.MQOO_FAIL_IF_QUIESCING;

m_cQueue = qMgr.accessQueue(QName, openOptions);
MQPutMessageOptions putOpt = new MQPutMessageOptions();
putOpt.options= MQC.MQPMO_FAIL_IF_QUIESCING;
File tiff = new File("c:\\a.txt");
FileInputStream stream = new FileInputStream(tiff);
byte[] b = new byte[(int)tiff.length()];
stream.read(b);
stream.close();

MQMessage message = new MQMessage();
String fileName = tiff.getName();
int fileNameLength = fileName.length();
message.write(b);
// Put the message in the queue
m_cQueue.put(message,putOpt);
qMgr.commit();

m_cQueue.close();

System.out.println("Queue closed");

qMgr.disconnect();

} catch(MQException ex)
{
}
catch(java.io.IOException ex)
{
}
}
}


-----------------------------------------
c++ code in put message part
PutMessage(unsigned char * chpmsg,long len)
{
// Declare MQI structures needed
MQMD md = {MQMD_DEFAULT};// Message Descriptor
MQPMO pmo = {MQPMO_DEFAULT};// put message options
MQLONG CompCode;// completion code
MQLONG Reason;// reason code
MQLONG BCompCode;
MQLONG BReason;
MQLONG messlen = len; // message length
md.Version = MQMD_VERSION_2;
try
{


if (len >0)
{

//pmo.Options = MQPMO_SYNCPOINT | MQPMO_FAIL_IF_QUIESCING |
//MQPMO_NEW_MSG_ID | MQPMO_NEW_CORREL_ID;// Put Message Option
//memcpy(md.Format, MQFMT_STRING, ((size_t)MQ_FORMAT_LENGTH));
// character string format

MQPUT(_hcon, // connection handle
m_Putobj, // object handle
&md, // message descriptor
&pmo, // default options (datagram)
messlen, // message length
chpmsg,// message buffer
&CompCode, // completion code
&Reason); // reason code

----------------------------

----C++ Code in getting connection handle---------
Connect_options.Version = MQCNO_VERSION_2;
MQCONNX(QMName,// queue manager
&Connect_options,// options for connection
&Hcon,// connection handle
&CompCode,// completion code
&Reason);
------------------------------------
--------C++ Code in getting Object handle part---------
MQOD od = {MQOD_DEFAULT}; // Object Descriptor

MQLONG OpenCode; // MQOPEN completion code

MQLONG Reason; // reason code
try
{

// Use parameter as the name of the target queue


strncpy(od.ObjectName, chpQueueName, (size_t)MQ_Q_NAME_LENGTH);

// Open the target message queue for output

MQOPEN(_hcon, // connection handle
&od, // object descriptor for queue
O_options, // open options
&m_Getobj, // object handle
&OpenCode, // MQOPEN completion code
&Reason); // reason code
-----------------------------------------------


Once again I am remainding that no problem still putting <=4mB data.
Back to top
View user's profile Send private message Send e-mail
fschofer
PostPosted: Thu Feb 05, 2004 2:21 am    Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

Hi,
for your C/C++ programs you have do define a client-connection channel with the same name as your server-connection channel and set the appropriate max message length.

The client-connection channel definition is written to the AMQCLCHL.TAB file not the server-connection channel.

As an alternative you can use a MQCONNX call in your c-code
to define your client-connection channel at runtime like the java programs do.

Greetings Frank
Back to top
View user's profile Send private message Send e-mail
007_pandi
PostPosted: Thu Feb 05, 2004 6:02 pm    Post subject: Reply with quote

Novice

Joined: 29 Jul 2002
Posts: 23

Hi,

I am getting totally confused . If you see my C++ code, already i am using MQCONNX mode.

My client program & server program is running in the same m/c.

Clear my following doubts.

1. Is it must to define client connection channel for c++ code?.
2. Any special option to be set in MQCONNX call?. if so, what it is?.


In that case , why it is not throwing error while transfering <=4MB data.

by
Pandiarajan.J
Back to top
View user's profile Send private message Send e-mail
JasonE
PostPosted: Mon Feb 09, 2004 4:32 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

A connection in CONNX mode does nothing special unless you are supplying an MQCD. If you are supplying an MQCD (clientconnoffset/clinetconnptr), then you need to increase the MQCD.MaxMsgLength field prior to the connect.

Changing the svrconn is also required, but I believe this value is negotiated, and the MQCD default is 4mb - ie if one side (svrconn) says 50mb but the clientconn (MQCD) says 4mb, we only allow 4mb).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » 2010 error . Urgent help need
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.