Author |
Message
|
adritownsend |
Posted: Fri May 13, 2011 1:41 am Post subject: MQRC_DATA_LENGTH_ERROR |
|
|
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 |
|
 |
bruce2359 |
Posted: Fri May 13, 2011 4:47 am Post subject: Re: MQRC_DATA_LENGTH_ERROR |
|
|
 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 |
|
 |
adritownsend |
Posted: Fri May 13, 2011 6:09 am Post subject: |
|
|
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 |
|
 |
bruce2359 |
Posted: Fri May 13, 2011 6:23 am Post subject: |
|
|
 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 |
|
 |
adritownsend |
Posted: Fri May 13, 2011 6:27 am Post subject: |
|
|
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 |
|
 |
mqjeff |
Posted: Fri May 13, 2011 6:38 am Post subject: |
|
|
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 |
|
 |
bruce2359 |
Posted: Fri May 13, 2011 6:40 am Post subject: |
|
|
 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 |
|
 |
adritownsend |
Posted: Fri May 13, 2011 7:36 am Post subject: |
|
|
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 |
|
 |
adritownsend |
Posted: Fri May 13, 2011 7:49 am Post subject: |
|
|
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 |
|
 |
mqjeff |
Posted: Fri May 13, 2011 7:53 am Post subject: |
|
|
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 |
|
 |
bruce2359 |
Posted: Fri May 13, 2011 8:35 am Post subject: |
|
|
 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 |
|
 |
mqjeff |
Posted: Fri May 13, 2011 8:44 am Post subject: |
|
|
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 |
|
 |
bruce2359 |
Posted: Fri May 13, 2011 8:52 am Post subject: |
|
|
 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 |
|
 |
adritownsend |
Posted: Sun May 15, 2011 11:07 pm Post subject: |
|
|
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 |
|
 |
adritownsend |
Posted: Mon May 16, 2011 12:12 am Post subject: |
|
|
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 |
|
 |
|