java.net.UnknownHostException

Princess-Mahtab: Princess-Mahtab: unknown error

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 web350

  • via Stack Overflow by Mahtab
    , 11 months ago
    Princess-Mahtab: Princess-Mahtab: unknown error
  • via Coderanch by Mandar Khire, 1 year ago
    time-a.nist.gov: unknown error
  • via GitHub by fangzhining
    , 1 year ago
    http: unknown error
  • Stack trace

    • java.net.UnknownHostException: Princess-Mahtab: Princess-Mahtab: unknown error at java.net.InetAddress.getLocalHost(InetAddress.java:1505) 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)

    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
    5 times, 4 days ago
    2 times, 1 month ago
    2 times, 7 months ago
    Unknown user
    Once, 11 months ago
    10 more bugmates