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: MQRC_DATA_LENGTH_ERROR

Post new topic  Reply to topic
 2010: MQRC_DATA_LENGTH_ERROR « View previous topic :: View next topic » 
Author Message
tyuoo1
PostPosted: Mon Jul 30, 2007 5:21 am    Post subject: 2010: MQRC_DATA_LENGTH_ERROR Reply with quote

Newbie

Joined: 03 Dec 2006
Posts: 9

Hi all

Our C++ application which uses the C++ API to connect to MQ keeps failing with the following error in the application logs:

Quote:

15:54:49||DEBUG1||Error in reading File, Reason = '2010: MQRC_DATA_LENGTH_ERROR'


The application uses a client connection (using a clntconn channel definition) to connect to the server. I have specified the maxmsgl to be 100MB on both the client and server connection channels, the queue and queue manager. But when the developer tries to get a file from the server and he specifies a max_buf_size of greater than 4MB:

Quote:

#define MAX_BUF_SIZE 52428800 //50MB

gmo.Version = MQGMO_VERSION_2;
gmo.Options = MQGMO_NO_WAIT;
gmo.Options += MQGMO_BROWSE_NEXT;
gmo.Options += MQGMO_COMPLETE_MSG ;
gmo.MatchOptions = MQMO_NONE;
memcpy(md.MsgId, MQMI_NONE, sizeof(md.MsgId) );
memcpy(md.CorrelId, MQCI_NONE, sizeof(md.CorrelId) );
md.Encoding = MQENC_NATIVE;
md.CodedCharSetId = MQCCSI_Q_MGR;
md.Feedback = 0;

if ( Buffer )
{
Logger::debug3("MQChannel - deleting Buffer in readFile before setting it");
free ( Buffer ); Buffer = NULL;
}
Buffer = (char*)malloc( MAX_BUF_SIZE );
memset(Buffer,'\0',MAX_BUF_SIZE);
long buflen = MAX_BUF_SIZE ;

//--------------------------------------------------------------
//Doing a MQGET to get the message in the Queue.
//Gets message in the buffert
//--------------------------------------------------------------
MQGET(Hcon, // connection handle
Hobj, // object handle
&md, // message descriptor
&gmo, // get message options
buflen, // buffer length
Buffer, // message buffer
&messlen, // message length
&CompCode, // completion code
&Reason); // reason code



he always gets the "2010: MQRC_DATA_LENGTH_ERROR" error and the error logs for the queue manager show the following:

Quote:

----- amqccita.c : 3248 -------------------------------------------------------
07/30/07 10:25:45 - Process(430306.43) User(root) Program(amqrmppa)
AMQ9209: Connection to host 'BARZA_DR_CIT (158.1.68.16)' closed.

EXPLANATION:
An error occurred receiving data from 'BARZA_DR_CIT (158.1.68.16)' over TCP/IP.
The connection to the remote host has unexpectedly terminated.
ACTION:
Tell the systems administrator.



This does not produce any FDC files. Is there anything i'm missing or is there a problem with the application?
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jul 30, 2007 5:36 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

I'd double check everything's set to 100Mb max length, and the application is using the channel you think it's using.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
tyuoo1
PostPosted: Mon Jul 30, 2007 6:03 am    Post subject: Reply with quote

Newbie

Joined: 03 Dec 2006
Posts: 9

The channel is the right one because when he makes the max_buf_size 4MB, everything works fine.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jul 30, 2007 6:07 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

If he was using a default auto defined channel it would work fine with 4Mb because that's the default. Or connecting with the MQSERVER method. You need to be sure he's using the special one you've set up with the 100Mb limit.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
tyuoo1
PostPosted: Mon Jul 30, 2007 7:08 am    Post subject: Reply with quote

Newbie

Joined: 03 Dec 2006
Posts: 9

I don't know if this will help as i'm not a developer. Here are the connection options the developer is using:

Quote:

/* Base Class attributes explicitly initialized */
ChannelProtocol = "MQ";
/* Derived Class attributes */
QMgr = "";
Queue = "";
Connected =2;
MQOD tmpod = {MQOD_DEFAULT};
od = tmpod;
MQMD tmpmd = {MQMD_DEFAULT};
md = tmpmd;
MQGMO tmpmgmo = {MQGMO_DEFAULT};
gmo = tmpmgmo;
MQPMO tmppmo = {MQPMO_DEFAULT};
pmo = tmppmo;
NoOfMsgsPerBatch = 10; //Default 10 messages per batch
HashDupPeriod = -1;
isJMS = 0;
isBytes = 0;
MQCNO Connect_options_tmp = {MQCNO_DEFAULT} ;
Connect_options = Connect_options_tmp ;
MQCD ClientConn_tmp = {MQCD_CLIENT_CONN_DEFAULT} ;
ClientConn = ClientConn_tmp ;
strncpy(ClientConn.ConnectionName,"158.1.68.17",MQ_CONN_NAME_LENGTH);
strncpy(ClientConn.ChannelName,"TUXEDO.CLIENTS.TCP",MQ_CHANNEL_NAME_LENGTH);
ClientConn.MaxMsgLength = 100000000;
Connect_options.ClientConnPtr = &ClientConn
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jul 30, 2007 7:19 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

If he's using MQCD then a) he doesn't need to if you've set a channel up & b) he'd better be using MQCONNX rather than MQCONN.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
tyuoo1
PostPosted: Fri Aug 03, 2007 4:44 am    Post subject: Reply with quote

Newbie

Joined: 03 Dec 2006
Posts: 9

Hi

The problem was with the configuration of Tuxedo, which wasn't using the client channel table, instead it was creating connections on the fly and here is the solution we got from the IBM labs.

"My suggestion is to remove just the channel information from the
OPENINFO string. Specifically, remove
channel=TUXEDO.CLIENTS.TCP,
trptype=TCP,
conname=158.1.68.17
Leave the rest of the information in the string, including the queue
manager name"
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Aug 03, 2007 4:52 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

tyuoo1 wrote:
The problem was with the configuration of Tuxedo, which wasn't using the client channel table, instead it was creating connections on the fly and here is the solution we got from the IBM labs.


Ah - you never mentioned Tuxedo!

Well done for getting it sorted, and thank you for posting your solution for the benefit of others.
_________________
Honesty is the best policy.
Insanity is the best defence.
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: MQRC_DATA_LENGTH_ERROR
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.