IBM Support

IC97627: .NET APPLICATION FAILS WITH ERROR MQRC_HOST_NOT_AVAILABLE AND THE SOCKETEXCEPTION (0X80004005)

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When an MQ .Net client application connects to a queue manager
    wherein an IP address is specified in the connection
    properties of the channel, the following error is reported:
    
    MQRC_HOST_NOT_AVAILABLE error and the SocketException
    (0x80004005)
    
    Traces show the following stack:
    [Date/Time] 00000006 X UOW= source=IBM.WMQ.MQTCPConnection
    org=IBM prod=WebSphere component=Message Service Client for .NET
    thread=[1 : 0]
    System.Net.Sockets.SocketException (0x80004005): No such host is
    known
     at System.Net.Dns.InternalGetHostByAddress(IPAddress address,
    Boolean includeIPv6)
     at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
     at IBM.WMQ.MQTCPConnection.ConnectSocket(String localAddr,
    String connectionName, Int32 options)
    
    This is caused by the new behaviour of Dns.GetHostEntry().
    Microsoft .NET 4.0 Framework has become stricter in its
    validation while parsing the IP address to improve security.
    This problem only occurs when using an IP address rather than
    hostname for the connection properties of the channel.
    .
    Additional keywords:
    Reason 2538
    

Local fix

  • Replace the IP address with host-name in the CONNAME parameter.
    Create/modify your local hosts file on Windows and add your IP
    address with host-name, if you need to use an IP address.
    

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    WebSphere MQ .NET application users using .NET framework 3.5 and
    above
    
    
    Platforms affected:
    Windows
    
    ****************************************************************
    PROBLEM SUMMARY:
    MQ .NET applications that use framework 3.5 or higher may fail
    with MQRC_HOST_NOT_AVAILABLE error while connecting to MQ
    queue manager which runs on a server that is behind firewall.
    The Dns.GetHostEntry() method invoked by the MQ .NET code to
    resolve the host name or IP address of the server to an
    IPHostEntry instance fails with the below error
    System.Net.Sockets.SocketException (0x80004005).
    
    The implementation of the Dns.GetHostEntry() has been changed
    since the .Net framework 3.5 and the latest code fails to
    resolve the host name if the server is behind a firewall. It
    is noticed that application works if it is compiled with .Net
    framework 2.0.
    

Problem conclusion

  • The MQ .NET code is modified to invoke Dns.GetHostEntry() method
    in place of Dns.GetHostAddresses() to fix this problem.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v7.0       7.0.1.13
    v7.1       7.1.0.5
    v7.5       7.5.0.4
    
    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

    IC97627

  • Reported component name

    WMQ WINDOWS V7

  • Reported component ID

    5724H7220

  • Reported release

    701

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-11-13

  • Closed date

    2014-01-29

  • Last modified date

    2014-01-29

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

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

Fix information

  • Fixed component name

    WMQ WINDOWS V7

  • Fixed component ID

    5724H7220

Applicable component levels

  • R701 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCPQ63","label":"APAR \/ Maintenance"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.0.1","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
29 January 2014