Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-1545

java.net.InetAddress.getLocalHost in KafkaHealthcheck.register may fail on some irregular hostnames

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 0.8.1.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      For example:

      kafka.server.LogOffsetTest > testGetOffsetsForUnknownTopic FAILED
      java.net.UnknownHostException: guwang-mn2: guwang-mn2: nodename nor servname provided, or not known
      at java.net.InetAddress.getLocalHost(InetAddress.java:1473)
      at kafka.server.KafkaHealthcheck.register(KafkaHealthcheck.scala:59)
      at kafka.server.KafkaHealthcheck.startup(KafkaHealthcheck.scala:45)
      at kafka.server.KafkaServer.startup(KafkaServer.scala:121)
      at kafka.utils.TestUtils$.createServer(TestUtils.scala:130)
      at kafka.server.LogOffsetTest.setUp(LogOffsetTest.scala:53)

      Caused by:
      java.net.UnknownHostException: guwang-mn2: nodename nor servname provided, or not known
      at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
      at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
      at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
      at java.net.InetAddress.getLocalHost(InetAddress.java:1469)
      ... 5 more

        Attachments

          Activity

            People

            • Assignee:
              rekhajoshm Rekha Joshi
              Reporter:
              guozhang Guozhang Wang
              Reviewer:
              Guozhang Wang
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: