Troubleshooting
Problem
You are receiving an error ECONNRESET econnreset intermittently from TCP/IP on an IBM MQ client channel connection to a local server.
.
Note:
TCP/IP error ECONNRESET -- Connection reset by peer. This occurs when an established connection is shut down for some reason by the remote computer.
Symptom
The most common scenario shows the error:
AMQ9208I: Error on receive from host <host>.
EXPLANATION: An error occurred receiving data from <host> over TCP/IP. This may be due to a communications failure.
ACTION: The return code from the TCP/IP recv() call was <xxxxx>.
Record these values and tell the systems administrator.
Other scenarios show error:
AMQ9209I: Connection to host <host> for channel <channel> closed.
The following table shows the return codes for various operating systems for the error ECONNRESET Connection Reset by Peer:
ECONNRESET return codes
|
||
Operating system | Decimal code | Hexadecimal code |
AIX | 73 | x49 |
IBM i (iSeries) | 3426 | xD62 |
Linux | 104 | x68 |
Solaris | 131 | x83 |
Windows | 10054 | x2746 |
z/OS | 1121 | x461 |
Diagnosing The Problem
ECONNRESET -- Connection reset by peer. This occurs when an established connection is shut down for some reason by the remote computer.
This usually indicates a problem in the TCP/IP network. There are numerous reasons TCP/IP will sent a reset.
Reasons For TCP/IP Resets:
- An unorderly connection termination, such as a rebooting the client box, can cause a reset.
- An application request a connect to a port and IP address for which no server is listening.
- An application closes a socket with data still in the application receive buffer. The connection is reset to allow the remote partner to know that the data was not delivered.
- Any data that arrives for a connection that has been closed can cause a reset.
- An application closes a socket and sets the linger socket option to zero. This will notify TCP/IP that the connection should not linger.
Note: MQ does not code the linger socket option, therefore MQ will not cause a reset.
- An invalid TCP segment arrives for a connection, for example, a bad acknowledge or sequence number can cause a reset.
- The connect request times out. TCP gives up trying to connect to an particular port and IP address and resets the connection.
- A Firewall can reset connections if the packet does not adhere to the firewall rules and policies. For example a source or destination port or ipaddress does not match the firewall rule or policy.
- The retransmit timer expires. TCP gives up trying to retransmit a packet and resets the connection.
- A bad hardware device can cause resets
++ Diagnostic hints and tips:
- Consult with your network administrator, who can use TCP/IP packet and a sniffer traces to determine why the reset occurred.
- For z/OS, see:
https://www.ibm.com/support/pages/node/659211#1
Instructions for setting a SLIP on an IBM MQ error message and including TCP/IP CTRACE and TCP/IP PACKET trace
https://www.ibm.com/docs/en/zos/2.4.0?topic=errnojrs-zos-unix-reason-codes
z/OS / 2.4.0
z/OS UNIX reason codes
Resolving The Problem
This is working as designed.
This type of errors are NOT generated by MQ:
MQ is JUST telling you that the network is having a problem.
This problem is beyond the scope of MQ Support and there is nothing that can be done from the MQ perspective to resolve this network problem: you need to work with your Network Support Team.
The following MQ feature could be useful for your development team to use in the MQ Client applications:
https://www.ibm.com/docs/en/ibm-mq/9.3?topic=restart-automatic-client-reconnection
IBM MQ / 9.3
Automatic client reconnection
+++ end +++
Product Synonym
IBM MQ WebSphere MQ MQ
Was this topic helpful?
Document Information
Modified date:
22 April 2023
UID
swg21106218