/etc/hosts 文件内容
192.168.1.14 druid_master
192.168.1.75 druid_d_01
192.168.1.113 druid_q_01
druid_master 启动 coordinator 服务的时候, 只能连接本地的 zookeeper 的服务, 报的错误如下
2019-02-21T02:32:53,003 ERROR [main] org.apache.zookeeper.client.StaticHostProvider - Unable to connect to server: druid_q_01:2181
java.net.UnknownHostException: druid_q_01: 未知的名称或服务
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[?:1.8.0_191]
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929) ~[?:1.8.0_191]
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324) ~[?:1.8.0_191]
at java.net.InetAddress.getAllByName0(InetAddress.java:1277) ~[?:1.8.0_191]
at java.net.InetAddress.getAllByName(InetAddress.java:1193) ~[?:1.8.0_191]
at java.net.InetAddress.getAllByName(InetAddress.java:1127) ~[?:1.8.0_191]
at org.apache.zookeeper.client.StaticHostProvider.<init>(StaticHostProvider.java:62) [zookeeper-3.4.11.jar:3.4.11-37e277162d567b55a07d1755f0b31c32e93c01a0]
at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:449) [zookeeper-3.4.11.jar:3.4.11-37e277162d567b55a07d1755f0b31c32e93c01a0]
at org.apache.curator.utils.DefaultZookeeperFactory.newZooKeeper(DefaultZookeeperFactory.java:29) [curator-client-4.0.0.jar:?]
at org.apache.curator.framework.imps.CuratorFrameworkImpl$2.newZooKeeper(CuratorFrameworkImpl.java:191) [curator-framework-4.0.0.jar:4.0.0]
at org.apache.curator.HandleHolder$1.getZooKeeper(HandleHolder.java:101) [curator-client-4.0.0.jar:?]
at org.apache.curator.HandleHolder.getZooKeeper(HandleHolder.java:57) [curator-client-4.0.0.jar:?]
at org.apache.curator.ConnectionState.reset(ConnectionState.java:201) [curator-client-4.0.0.jar:?]
at org.apache.curator.ConnectionState.start(ConnectionState.java:111) [curator-client-4.0.0.jar:?]
at org.apache.curator.CuratorZookeeperClient.start(CuratorZookeeperClient.java:214) [curator-client-4.0.0.jar:?]
at org.apache.curator.framework.imps.CuratorFrameworkImpl.start(CuratorFrameworkImpl.java:308) [curator-framework-4.0.0.jar:4.0.0]
at org.apache.druid.curator.CuratorModule$1.start(CuratorModule.java:109) [druid-server-0.13.0-incubating-iap8.jar:0.13.0-incubating-iap8]
at org.apache.druid.java.util.common.lifecycle.Lifecycle.start(Lifecycle.java:311) [java-util-0.13.0-incubating-iap8.jar:0.13.0-incubating-iap8]
at org.apache.druid.guice.LifecycleModule$2.start(LifecycleModule.java:134) [druid-api-0.13.0-incubating-iap8.jar:0.13.0-incubating-iap8]
at org.apache.druid.cli.GuiceRunnable.initLifecycle(GuiceRunnable.java:109) [druid-services-0.13.0-incubating-iap8.jar:0.13.0-incubating-iap8]
at org.apache.druid.cli.ServerRunnable.run(ServerRunnable.java:58) [druid-services-0.13.0-incubating-iap8.jar:0.13.0-incubating-iap8]
at org.apache.druid.cli.Main.main(Main.java:118) [druid-services-0.13.0-incubating-iap8.jar:0.13.0-incubating-iap8]
druid_master ping 的通其他两台服务
PING druid_q_01 (192.168.1.113) 56(84) bytes of data.
64 bytes from druid_q_01 (192.168.1.113): icmp_seq=1 ttl=64 time=1.48 ms
64 bytes from druid_q_01 (192.168.1.113): icmp_seq=2 ttl=64 time=0.343 ms
64 bytes from druid_q_01 (192.168.1.113): icmp_seq=3 ttl=64 time=0.334 ms
--------------------------------------------------------------------------
64 bytes from druid_d_01 (192.168.1.75): icmp_seq=1 ttl=64 time=0.300 ms
64 bytes from druid_d_01 (192.168.1.75): icmp_seq=2 ttl=64 time=0.301 ms
64 bytes from druid_d_01 (192.168.1.75): icmp_seq=3 ttl=64 time=0.322 ms
64 bytes from druid_d_01 (192.168.1.75): icmp_seq=4 ttl=64 time=0.313 ms
找不到原因 求大佬指导下
1
scalaer OP 已解决, 原因是配置的时候多了空格
druid.zk.service.host=druid_master:2181, druid_d_01:2181, druid_q_01:2181 改后的配置: druid.zk.service.host=druid_master:2181,druid_d_01:2181,druid_q_01:2181 蛋疼 ... |