Uploaded image for project: 'Policy Framework'
  1. Policy Framework
  2. POLICY-1879

ApexPDP - Build/Test fails in Nordix - InetAddress.getLocalHost() fails

XMLWordPrintable

      Test failure in Nordix Jenkins.

      Test passes in most other situations, e.g. local machine, ONAP jenkins etc.

      getLocalHost() can fail on some embedded executors e.g. where /etc/hosts does not exist, is not correct, etc.

       

      Test fails:
      org.onap.policy.apex.core.infrastructure.messaging.EndToEndStringMessagingTest

      java.net.UnknownHostException: onap-build-ubuntu1604-241: onap-build-ubuntu1604-241: Name or service not known
      at java.net.InetAddress.getLocalHost(InetAddress.java:1506)
      at org.onap.policy.apex.core.infrastructure.messaging.stringmessaging.WsStringMessageServer.start(WsStringMessageServer.java:76)
      at org.onap.policy.apex.core.infrastructure.messaging.EndToEndStringMessagingTest.testEndToEndMessaging(EndToEndStringMessagingTest.java:53)

      ...

      Caused by: java.net.UnknownHostException: onap-build-ubuntu1604-241: Name or service not known
      at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
      at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929)
      at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324)
      at java.net.InetAddress.getLocalHost(InetAddress.java:1501)

       

            JohnKeeney John Keeney
            JohnKeeney John Keeney
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: