"Cannot assign requested address" (EADDRNOTAVAIL) when many TCP sessions are open

Solution Verified - Updated -

Issue

  • "Cannot assign requested address" (EADDRNOTAVAIL) when many TCP sessions are open
  • On systems running RHEL6 or RHEL7, when a large number of ESTABLISHED state connections (over 1 million) are open, then one sees errors where unrelated processes (curl, ssh, etc) are unable to bind to a local IP on the box to initiate a connection. For example, trying to execute curl to connect to a remote server, it fails with
curl: (7) Failed to connect to 10.0.0.1: Cannot assign requested address".
  • This works successfully and consistently below approximately 1 million established connections, but fails consistently when above that number.
  • However, if the application explicitly specifies the local IP to be used, then commands succeed.

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6
  • TCP (Transmission Control Protocol)
  • Many TCP channels, over 1 million

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content