分布式模式下无法启动Drill

Unable to start Drill in distributed mode

我正在尝试设置 drillv1.18 运行。遇到以下错误。

drill-override.conf 指向在端口 12181 上运行的 zookeeper。在分布式模式下启动时,它会失败并输出以下日志。但是嵌入式模式没有问题。 看起来像是权限问题,但是 zookeeper、drill、zookeeper data-dir 都在同一用户下 运行。

2020-05-10 16:23:01,160 [main] DEBUG o.apache.drill.exec.server.Drillbit - Construction started.
2020-05-10 16:23:01,448 [main] DEBUG o.a.d.e.c.zk.ZKClusterCoordinator - Connect localhost:12181, zkRoot drill, clusterId: drillbits1
2020-05-10 16:23:01,531 [main] INFO  o.a.d.e.s.s.PersistentStoreRegistry - Using the configured PStoreProvider class: 'org.apache.drill.exec.store.sys.store.provider.ZookeeperPersistentStoreProvider'.
2020-05-10 16:23:01,718 [main] DEBUG o.a.drill.exec.ssl.SSLConfigServer - Using Hadoop configuration for SSL
2020-05-10 16:23:01,718 [main] DEBUG o.a.drill.exec.ssl.SSLConfigServer - Hadoop SSL configuration file: ssl-server.xml
2020-05-10 16:23:01,731 [main] DEBUG org.apache.drill.exec.ssl.SSLConfig - Initialized SSL context.
2020-05-10 16:23:01,731 [main] INFO  o.a.drill.exec.rpc.user.UserServer - Rpc server configured to use TLS protocol 'TLSv1.2'
2020-05-10 16:23:01,738 [main] INFO  o.apache.drill.exec.server.Drillbit - Construction completed (577 ms).
2020-05-10 16:23:01,738 [main] DEBUG o.apache.drill.exec.server.Drillbit - Startup begun.
2020-05-10 16:23:01,738 [main] DEBUG o.a.d.e.c.zk.ZKClusterCoordinator - Starting ZKClusterCoordination.
2020-05-10 16:23:03,775 [main] ERROR o.apache.drill.exec.server.Drillbit - Failure during initial startup of Drillbit.
org.apache.zookeeper.KeeperException$UnimplementedException: KeeperErrorCode = Unimplemented for /drill
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:106)
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:54)
    at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:1538)
    at org.apache.curator.utils.ZKPaths.mkdirs(ZKPaths.java:351)
    at org.apache.curator.framework.imps.ExistsBuilderImpl.call(ExistsBuilderImpl.java:230)
    at org.apache.curator.framework.imps.ExistsBuilderImpl.call(ExistsBuilderImpl.java:224)
    at org.apache.curator.connection.StandardConnectionHandlingPolicy.callWithRetry(StandardConnectionHandlingPolicy.java:67)
    at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:81)
    at org.apache.curator.framework.imps.ExistsBuilderImpl.pathInForeground(ExistsBuilderImpl.java:221)
    at org.apache.curator.framework.imps.ExistsBuilderImpl.forPath(ExistsBuilderImpl.java:206)
    at org.apache.curator.framework.imps.ExistsBuilderImpl.forPath(ExistsBuilderImpl.java:35)
    at org.apache.curator.framework.imps.CuratorFrameworkImpl.createContainers(CuratorFrameworkImpl.java:265)
    at org.apache.curator.framework.EnsureContainers.internalEnsure(EnsureContainers.java:69)
    at org.apache.curator.framework.EnsureContainers.ensure(EnsureContainers.java:53)
    at org.apache.curator.framework.recipes.cache.PathChildrenCache.ensurePath(PathChildrenCache.java:596)
    at org.apache.curator.framework.recipes.cache.PathChildrenCache.rebuild(PathChildrenCache.java:327)
    at org.apache.curator.framework.recipes.cache.PathChildrenCache.start(PathChildrenCache.java:304)
    at org.apache.curator.framework.recipes.cache.PathChildrenCache.start(PathChildrenCache.java:252)
    at org.apache.curator.x.discovery.details.ServiceCacheImpl.start(ServiceCacheImpl.java:99)
    at org.apache.drill.exec.coord.zk.ZKClusterCoordinator.start(ZKClusterCoordinator.java:145)
    at org.apache.drill.exec.server.Drillbit.run(Drillbit.java:220)
    at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:584)
    at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:554)
    at org.apache.drill.exec.server.Drillbit.main(Drillbit.java:550)

版本 1.17 在分布式模式下启动没有问题。

此处的问题与 zookeeper 版本有关。也许你使用的是 3.4.X 版本,但是当前版本的 Drill 需要 3.5.X。作为解决方法,您可以将 jars/ext/zookeeper-3.5.7.jarjars/ext/zookeeper-jute-3.5.7.jar 中的 zookeeper jar 替换为与您的 zookeeper 版本对应的 jar。

除了 Vova Vysotskyi 的回答之外,您还可以在 Drill 文档中找到有关此问题的更多信息:

https://drill.apache.org/docs/distributed-mode-prerequisites/

Starting in Drill 1.18 the bundled ZooKeeper libraries are upgraded to version 3.5.7, preventing connections to older (< 3.5) ZooKeeper clusters. In order to connect to a ZooKeeper < 3.5 cluster, replace the ZooKeeper library JARs in ${DRILL_HOME}/jars/ext with zookeeper-3.4.x.jar then restart the cluster.