Project: springxd
Issue XD-2239: Fix incorrect IP Address associated with containers
The XD Container IP address displayed on both 'singlenode' and Distributed modes are incorrect both on _Shell_ as well as _Admin-UI_. *Example:* Noticed IP address as 10.10.10.* Following function in [RuntimeUtils|http://docs.spring.io/autorepo/docs/spring-xd/1.0.1.RELEASE/api/org/springframework/xd/dirt/util/RuntimeUtils.html] could be flawed: {code} public static String getIpAddress() {	try {	for(Enumeration enumNic = NetworkInterface.getNetworkInterfaces();	enumNic.hasMoreElements();) {	NetworkInterface ifc = enumNic.nextElement();	if (ifc.isUp()) {	for (Enumeration enumAddr = ifc.getInetAddresses();	enumAddr.hasMoreElements(); ) {	InetAddress address = enumAddr.nextElement();	if (address instanceof Inet4Address && !address.isLoopbackAddress()) {	return address.getHostAddress();	}	}	}	}	}	catch (IOException e) {	// ignore	}	return "unknown"; } {code}
Story points: 5