MQRC_DATA_LENGTH_ERROR with client

We had an application working on one system, and we moved it to another system, and we got MQ RC 2010 data length error. It turns out that the

SYSTEM.DEF.SVRCONN had MAXMSGL of 1 – so the maximum message sized allowed on this channel was 1 bytes.

You can specify the maximum msg length on the client for example the MQCD or client table – but I think the negotiation is the lower of the values at each end.

 

Setting the value to one on the z/OS end was part of stopping people using the default channel definitons.

5 thoughts on “MQRC_DATA_LENGTH_ERROR with client

  1. Altering SYSTEM.DEF.SVRCONN to have MAXMSGL of 1 is a common security practice to prevent usage of this default channel, MCAUSER is also commonly set to ‘nobody’. When defining a new SVRCONN type channel, MAXMSGL and MCAUSER need to be explicitly set, to override the default. This also makes you think about the max msg length that will be required and the security implications for setting MCAUSER. This is covered in the MQ Security Scenarios redbook.

    Like

  2. Glen,
    Thank you for your comments. You are right in all you say. As part of my MQ health checks, I would ask if the options were specified as you said. I was surprised with myself for falling over this. This feels like a two brain problem. One brain used for health checks, the other brain as a struggling end user.

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s