IBM Support

java.net.BindException: Cannot assign requested address: NET_Bind when attempting to bind a socket.

Troubleshooting


Problem

This problem might happen on any operation that is attempting to open a server socket.

Symptom

The Java™ stack that occurs is below:
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:357)
at java.net.Socket.bind(Socket.java:524)
at com.ibm.rmi.transport.TCPTransportConnection.createSocket(TCPTransportConnection.java:165)

Cause

There are some different possible causes for this problem. One is that the local (loopback) socket configuration has been removed from the IP configuration for the system that is logging this message.

Another possible cause is that the default IP configuration for the JVM is IPv6 and the IP address is in IPv4 format. The IPv6 format is the newer 128-bit IP address format, such as 111:222:333:44:5:6:7788:99aa, whereas the IPv4 format is the older 32-bit IP address format, such as 127.0.0.1.  For additional information regarding IPv6 address formats, see IPv6 address formats.

Resolving The Problem

There are a number of possible solutions to this problem.
  1. Check the IP configuration for the localhost.
  2. Set the following flag on the JVM to set the ip encoding to IPV4. For instructions, use this technote, HostName lookup causes a JVM hang or slow response.
  3. There have also been some SDK bugs that have been fixed that may cause a problem like this. As an example see the following describing a bug that has a similar symptom, http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6226918

Upgrade WebSphere Application Server's SDK to determine whether the issues are resolved in the latest maintenance. To determine the latest SDK maintenance level for your WebSphere Application Server and SDK level, go to the Recommended Fixes for WebSphere Application Server link: http://www.ibm.com/support/docview.wss?uid=swg27004980

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Java SDK","Platform":[{"code":"PF033","label":"Windows"}],"Version":"9.0.0.0;8.5.5;8.5;8.0;7.0;6.1","Edition":"Base;Express;Network Deployment","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Java SDK","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
14 September 2021

UID

swg21233733