kafka运行过程中出现了java.net.UnknownHostException: localhost.localdomain: localhost.localdomain: 未知的名称或服务
[2016-01-17 23:17:52,291] ERROR Unknown error when running consumer: (kafka.tools.ConsoleConsumer$)
java.net.UnknownHostException: localhost.localdomain: localhost.localdomain: 未知的名称或服务
at java.net.InetAddress.getLocalHost(InetAddress.java:1475)
at kafka.consumer.ZookeeperConsumerConnector.<init>(ZookeeperConsumerConnector.scala:122)
at kafka.consumer.ZookeeperConsumerConnector.<init>(ZookeeperConsumerConnector.scala:146)
at kafka.consumer.Consumer$.create(ConsumerConnector.scala:109)
at kafka.consumer.OldConsumer.<init>(BaseConsumer.scala:73)
at kafka.tools.ConsoleConsumer$.run(ConsoleConsumer.scala:63)
at kafka.tools.ConsoleConsumer$.main(ConsoleConsumer.scala:47)
at kafka.tools.ConsoleConsumer.main(ConsoleConsumer.scala)
Caused by: java.net.UnknownHostException: localhost.localdomain: 未知的名称或服务
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1295)
at java.net.InetAddress.getLocalHost(InetAddress.java:1471)
... 7 more
编辑server.properties
host.name=localhost 改为ip地址
192.168.60.193 localhost.localdomain localhost