Mainframe Path Start learning free
BeginnerError and abend codesEDC8128I

EDC8128I Connection refused (ECONNREFUSED, errno 1128)

The client reached the remote host, but nothing accepted the connection on that port. Check the server is up and listening on the address and port you used.

What happened

A program on z/OS — a batch job, an FTP client, a z/OS UNIX tool, a Java or C application — tried to open a TCP connection and the connect failed at once with EDC8128I Connection refused. On z/OS this is errno ECONNREFUSED, decimal 1128 (X'0468').

Batch job output (illustrative)Illustrative example
MPSEND01 CONNECT TO 10.1.20.45 PORT 8443
MPSEND01 connect() failed: errno=1128 (EDC8128I Connection refused.)
MPSEND01 ENDING RC=12

What it means

IBM's errno table describes ECONNREFUSED as: the attempt to connect was rejected. In plain TCP terms, the packet reached a host, but no program was accepting connections on that address and port, so the host refused it. It differs from:

Some messages add an errno2 reason code; keep it, as IBM support uses it to pinpoint the exact path that failed.

Typical causes

Symptoms

Where to look

How to diagnose

  1. Confirm the address and port the client really used.
  2. On the server, check that the program is running and that Netstat shows it in Listen state on that port and address.
  3. If it listens on a specific IP, check that the client connects to that one.
  4. If the listener is present, try from another client to rule out a filter in between.

How to fix

Start or restart the server, or correct the port/address in the client configuration. If the server binds to the wrong address, fix its configuration. Then retry the client; the error clears as soon as something accepts on that port.

How to prevent

Production considerations

Interview question

What is the difference between 'connection refused' and 'connection timed out'?

Stuck on something else?
Ask the community or search the full course.

Ask a question