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 IndexGeneral IBM MQ SupportMQRC_DATA_LENGTH_ERROR

Post new topicReply to topic Goto page 1, 2  Next
MQRC_DATA_LENGTH_ERROR View previous topic :: View next topic
Author Message
adritownsend
PostPosted: Fri May 13, 2011 1:41 am Post subject: MQRC_DATA_LENGTH_ERROR Reply with quote

Novice

Joined: 13 May 2011
Posts: 10

I am using pymqi with python to retrieve messages from WMQ. I'm stuck now with retrieving large messages.

I get a MQRC_DATA_LENGTH_ERROR when the buffer size is set big enough to handle the message. If I set the buffer size smaller I get a MQRC_TRUNCATED_MSG_FAILED message.

IBM reason codes says that this happens if the BufferLength parameter exceeds the maximum message size that was negotiated for the client channel.

Where is this "message size that was negotiated for the client channel" set?

I specify the server channel when I connect, and the maxmsgl of this server channel more than big enough for the message. What else do I need to set for this to work?
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri May 13, 2011 4:47 am Post subject: Re: MQRC_DATA_LENGTH_ERROR Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

adritownsend wrote:

IBM reason codes says that this happens if the BufferLength parameter exceeds the maximum message size that was negotiated for the client channel.

Where is this "message size that was negotiated for the client channel" set?

I specify the server channel when I connect, and the maxmsgl of this server channel more than big enough for the message. What else do I need to set for this to work?

What maxmsgl did you specify on the CLNTCONN channel definition?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
adritownsend
PostPosted: Fri May 13, 2011 6:09 am Post subject: Reply with quote

Novice

Joined: 13 May 2011
Posts: 10

display channel(*) chltype(clntconn) maxmsgl = 104857600, way bigger than the message or buffer, so this should not be a problem either.

Any other ideas?
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri May 13, 2011 6:23 am Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

From IBMs online doc:

Quote:
010 (07DA) (RC2010): MQRC_DATA_LENGTH_ERROR
Explanation
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.

There are two possibilities for this ReasonCode.

Is this a new application?

Has this application ever worked before? If so, what has changed?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
adritownsend
PostPosted: Fri May 13, 2011 6:27 am Post subject: Reply with quote

Novice

Joined: 13 May 2011
Posts: 10

This is a reasonably new application, it works fine with small messages. Once they get big (i've tested with a 9M file) this occurs. So big messages have never worked, no.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri May 13, 2011 6:38 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

adritownsend wrote:
display channel(*) chltype(clntconn) maxmsgl = 104857600, way bigger than the message or buffer, so this should not be a problem either.

Any other ideas?


What steps did you take to make sure that the client application has access to the CLNTCONN definition?

If you are using MQSERVER or equivalent, you are using a default CLNTCONN, not the one that has the same name as the SVRCONN.

I'm not aware of how pymqi handles this.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri May 13, 2011 6:40 am Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

adritownsend wrote:
display channel(*) chltype(clntconn) maxmsgl = 104857600, way bigger than the message or buffer, so this should not be a problem either.

Any other ideas?

Exactly which SVRCONN channel is used by the app? Please DISPLAY and post the maxmsgl for this channel.

Exactly which CLNTCONN channel is used by the app? Please DISPLAY and post the maxmsgl for this channel.

What is the maxmsgl for the qmgr?

What version/release of WMQ on the client platform?

What version/release of WMQ on the server platform?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
adritownsend
PostPosted: Fri May 13, 2011 7:36 am Post subject: Reply with quote

Novice

Joined: 13 May 2011
Posts: 10

Exactly which SVRCONN channel is used by the app? Please DISPLAY and post the maxmsgl for this channel.

SYSTEM.AUTO.SVRCONN maxmsgl = 104857600

Exactly which CLNTCONN channel is used by the app? Please DISPLAY and post the maxmsgl for this channel.

I am not sure about this one. I do now specify this anywhere in my application. However, there is only one clntconn when I do a
display channel(*) chltype(clntconn) -SYSTEM.DEF.CLNTCONN - and the maxmsgl for this one is also 104857600


What is the maxmsgl for the qmgr?

104857600


What version/release of WMQ on the client platform?

7.0.1.3


What version/release of WMQ on the server platform?

7.0.1.3
Back to top
View user's profile Send private message
adritownsend
PostPosted: Fri May 13, 2011 7:49 am Post subject: Reply with quote

Novice

Joined: 13 May 2011
Posts: 10

@mqjeff - I don't specify the clntconn anywhere in my application so I guessed it must

be using the default one.

Can I specify from my application which client channel to use?

The code I use when I connect is:

qmgr = pymqi.QueueManager(None)

qmgr.connectTCPClient(self.Config.get('MQ', 'mq_queuemanager'),
pymqi.cd(), self.Config.get('MQ', 'mq_channel'), self.Config.get('MQ', 'mq_address'))

getq = pymqi.Queue(qmgr, self.Config.get('MQ', 'mq_etldatamanager_receive_queuename'))
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri May 13, 2011 7:53 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

adritownsend wrote:
@mqjeff - I don't specify the clntconn anywhere in my application so I guessed it must

be using the default one.

Can I specify from my application which client channel to use?


Probably.

But I don't know how to do it in pymqi.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri May 13, 2011 8:35 am Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

What environment variables are SET (EXPORTed) in the shell where the client application runs?

For example: SET MQSERVER=
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri May 13, 2011 8:44 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

bruce2359 wrote:
What environment variables are SET (EXPORTed) in the shell where the client application runs?

For example: SET MQSERVER=

There is no guarantee that pymqi makes any use of MQSERVER or MQCHLTAB/MQCHLLIB
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri May 13, 2011 8:52 am Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

http://packages.python.org/pymqi/ offers this example:
Quote:
Set the MQSERVER environment variable to something like “SYSTEM.DEF.SVRCONN/TCP/192.168.1.24(1414)” (or whatever your MQ Server channel/address is)."

_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
adritownsend
PostPosted: Sun May 15, 2011 11:07 pm Post subject: Reply with quote

Novice

Joined: 13 May 2011
Posts: 10

Thanks a lot for this, will try it out today.

I have made sure, however, that all conns (svrconns and clntconns) are set to 100M, am I right in saying it must be using one of these as it's working fine with smaller packets, so I'm not 100% convinced it will make a difference to actually specify which one to use?

I will give it a go anyway and let you know what happens.
Back to top
View user's profile Send private message
adritownsend
PostPosted: Mon May 16, 2011 12:12 am Post subject: Reply with quote

Novice

Joined: 13 May 2011
Posts: 10

No luck, envirenment variable MQServer =
'SYSTEM.AUTO.SVRCONN/TCP/xxx.xxx.xx.xx(1414)'

Same error

2011-05-16 10:14:33 - DEBUG - Error getting Message from Queue: MQI Error. Comp: 2, Reason 2010: FAILED: MQRC_DATA_LENGTH_ERROR

Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum IndexGeneral IBM MQ SupportMQRC_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.