Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
jboss-fuse-6.1
-
None
-
%
-
-
6.3 Sprint 2 (1-Feb - 26-Feb)
Description
After mentioned steps root container has provisioning failure stating NullPointerException in io.fabric8.git.internal.GitDataStore at line 1512:
1502 try { 1503 Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces(); 1504 while (interfaces.hasMoreElements()) { 1505 NetworkInterface iface = interfaces.nextElement(); 1506 if (iface.isLoopback() || !iface.isUp()) { 1507 continue; 1508 } 1509 Enumeration<InetAddress> addresses = iface.getInetAddresses(); 1510 while (addresses.hasMoreElements()) { 1511 InetAddress addr = addresses.nextElement(); 1512 if (hostname.equals(addr.getHostAddress())) { 1513 return true; 1514 } 1515 } 1516 } 1517 } catch (SocketException e) { 1518 // ignore 1519 }
This is caused by URI.getHost() (line 1459) returning null for local URIs containing ENV1_FUSE.
This blocks any modifications/additions to profiles. After renaming the machine to ENV1-FUSE the problem went away.
There is obvious workaround, but it might get very confusing and hard to trace down the root cause due to having NPE instead of some more descriptive Exception.
It would be great if you could assert URI.getHost() for null values or handle the situation in more descriptive way.
BR, Miloš