java.net.UnknownHostException

huey: huey: nodename nor servname provided, or not known

Samebug tips1

When kafka creates new consumers, it simply concatenate the name of your VM to generate the consumer id. So, your VM resolves localhost as the name of your VM, not whatever you had set. To solve, add kafka(or the name of VM) plus address to /etc/hosts

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web462

  • via Stack Overflow by Huey
    , 10 months ago
    huey: huey: nodename nor servname provided, or not known
  • **********: nodename nor servname provided, or not known
  • via GitHub by wandell
    , 10 months ago
    Macula: Macula: nodename nor servname provided, or not known
  • Stack trace

    • java.net.UnknownHostException: huey: huey: nodename nor servname provided, or not known at java.net.InetAddress.getLocalHost(InetAddress.java:1473) at org.apache.spark.util.Utils$.findLocalInetAddress(Utils.scala:846) at org.apache.spark.util.Utils$.org$apache$spark$util$Utils$$localIpAddress$lzycompute(Utils.scala:839) at org.apache.spark.util.Utils$.org$apache$spark$util$Utils$$localIpAddress(Utils.scala:839) at org.apache.spark.util.Utils$$anonfun$localHostName$1.apply(Utils.scala:896) at org.apache.spark.util.Utils$$anonfun$localHostName$1.apply(Utils.scala:896) at scala.Option.getOrElse(Option.scala:121) at org.apache.spark.util.Utils$.localHostName(Utils.scala:896) at org.apache.spark.SparkContext.<init>(SparkContext.scala:388) at org.apache.spark.api.java.JavaSparkContext.<init>(JavaSparkContext.scala:58) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:240) at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357) at py4j.Gateway.invoke(Gateway.java:236) at py4j.commands.ConstructorCommand.invokeConstructor(ConstructorCommand.java:80) at py4j.commands.ConstructorCommand.execute(ConstructorCommand.java:69) at py4j.GatewayConnection.run(GatewayConnection.java:211) at java.lang.Thread.run(Thread.java:745) Caused by: java.net.UnknownHostException: huey: 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) ... 20 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 10 months ago
    Unknown user
    Once, 1 year ago
    5 times, 2 days ago
    2 times, 1 month ago
    2 times, 7 months ago
    66 more bugmates