Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-4841

Fabric8 - NullPointerException from GitDataStore when having hostname with underscore

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • jboss-fuse-6.1
    • Fabric8 v1
    • None
    • % %
    • Hide

      Steps in Fuse:

      esb:create-admin-user --new-user admin --new-user-password admin --new-user-role admin
      fabric:create --wait-for-provisioning
      
      profile-edit --bundles wrap:mvn:com.oracle/ojdbc6/11.2.0.3.0 mq-base
      
      Show
      Steps in Fuse: esb:create-admin-user -- new -user admin -- new -user-password admin -- new -user-role admin fabric:create --wait- for -provisioning profile-edit --bundles wrap:mvn:com.oracle/ojdbc6/11.2.0.3.0 mq-base
    • 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š

      Attachments

        Activity

          People

            acosenti Andrea Cosentino
            milos.zubal_jira Miloš Zubal (Inactive)
            Roman Jakubco Roman Jakubco (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: