IBM Support

IT30847: MQ Managed .Net client connecting to queue manager fails intermittently with MQRC 2195

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • MQ Managed .Net client application while authenticating the
    connection, intermittently fails with MQRC
    2195(MQRC_UNEXPECTED_ERROR).
    
    MQ trace shows below errors :-
    
    00000484 17:17:15.206717  7924.20     Data Length --> 48
    00000485 17:17:15.206717  7924.20    Send >>
    00000486 17:17:15.206717  7924.20   -----------{
    MQEncryptedSocket..Write(byte[], int, int)
    00000487 17:17:15.206717  7924.20    Writing 48 bytes onto wire
    0000050E 17:17:15.220717  7924.20
    System.NotSupportedException: The BeginWrite method cannot be
    called when another write operation is pending.
      at System.Net.Security._SslStream.ProcessWrite(Byte[] buffer,
    Int32 offset, Int32 count, AsyncProtocolRequest asy
    ncRequest)
      at System.Net.Security._SslStream.BeginWrite(Byte[] buffer,
    Int32 offset, Int32 count, AsyncCallback asyncCallback, Object
    asyncState)
      at IBM.WMQ.Nmqi.MQEncryptedSocket.Write(Byte[] buffer, Int32
    offset, Int32 length)
    0000050F 17:17:15.221717  7924.20   -----------}
    MQEncryptedSocket..Write(byte[], int, int) rc=OK
    00000510 17:17:15.221717  7924.20    Send << - n = 0
    00000511 17:17:15.221717  7924.20
    System.NotSupportedException: The BeginWrite method cannot be
    called when another write operation is pending.
      at IBM.WMQ.Nmqi.MQEncryptedSocket.Write(Byte[] buffer, Int32
    offset, Int32 length)
      at IBM.WMQ.MQTCPConnection.Send(Byte[] bytes, Int32 offset,
    Int32 length, Int32 segmentType, Int32 tshType)
    00000512 17:17:15.222717  7924.20    New MQException CompCode: 2
    Reason: 2195
    00000513 17:17:15.222717  7924.20    New NmqiException CompCode:
    2 Reason: 2195
    

Local fix

  • Alter the channel definition to use SHARECNV(1) so that each
    logical connection within the .NET application uses a unique
    socket.
    

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    Users who are using managed MQ .Net application.
    
    
    Platforms affected:
    Windows
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    A logic error within the managed .NET client meant that when
    multiple logical connections were opearting over the same
    channel instance (SHARECNV > 1), it was possible for 2 threads
    to attempt to concurrently write to the socket used for that
    channel instance. This resulted in the .NET runtime reporting
    the following error:
    
    " System.NotSupportedException: The BeginWrite method cannot be
    called when another write operation is pending. "
    

Problem conclusion

  • The locking mechanism in managed MQ .NET code has been corrected
    to correctly serialize writes to the socket when multiple
    connections are using the socket with SHARECNV > 1.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v9.0 LTS   9.0.0.11
    v9.1 LTS   9.1.0.6
    v9.x CD    9.2.0
    
    The latest available maintenance can be obtained from
    'WebSphere MQ Recommended Fixes'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006037
    
    If the maintenance level is not yet available information on
    its planned availability can be found in 'WebSphere MQ
    Planned Maintenance Release Dates'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006309
    ---------------------------------------------------------------
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT30847

  • Reported component name

    IBM MQ BASE MP

  • Reported component ID

    5724H7271

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-11-05

  • Closed date

    2020-04-02

  • Last modified date

    2020-10-20

  • APAR is sysrouted FROM one or more of the following:

    IT30163

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    IBM MQ BASE MP

  • Fixed component ID

    5724H7271

Applicable component levels

[{"Line of Business":{"code":"LOB36","label":"IBM Automation"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"910"}]

Document Information

Modified date:
21 October 2020