You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Drill无法在CLI运行:执行sqlline命令时出现报错

Troubleshooting Drill CLI Connection Failures with Zookeeper Cluster

Hey Aman, let's troubleshoot why your Drill CLI connection is failing. I’ve worked through similar issues with Drill-Zookeeper setups before, so here are the most common checks and fixes to try:

  • First, fix the command syntax
    The bin> prefix in your command is just the terminal prompt, not part of the actual command. From Drill's bin directory, run this corrected version:

    ./sqlline -u "jdbc:drill:zk=<zk node1 ip>:5181,<zk node2 ip>:5181,<zk node3 ip>:5181"
    

    Double-check for typos in IP addresses—even a single wrong digit can break the connection.

  • Verify Zookeeper node reachability
    Make sure your client machine can communicate with all three ZK nodes. Test connectivity using ping and telnet for each node:

    ping <zk node1 ip>
    telnet <zk node1 ip> 5181
    

    If either test fails, you’ve got a network issue. Check firewall rules, security groups, or routing between your client and ZK cluster. Also, a common gotcha: Drill defaults to using ZK port 2181. If your ZK cluster is using 5181 intentionally, that’s fine—but if it’s using the default port, update your JDBC URL to use 2181 instead.

  • Check Zookeeper cluster health
    Even if nodes are reachable, the ZK cluster might be unhealthy. On any ZK node, run:

    zkServer.sh status
    

    You should see one node marked as "leader" and the rest as "followers". If any node shows "standalone" or "error", resolve the ZK cluster issues before trying to connect Drill.

  • Validate Drillbit registration with Zookeeper
    Ensure your Drillbits are running and registered with ZK. On a Drill node, check the Drillbit status:

    drillbit.sh status
    

    Then use the ZK CLI to confirm Drillbits are listed:

    zkCli.sh
    [zk: localhost:5181(CONNECTED) 0] ls /drill/drillbits1
    

    You should see entries for each running Drillbit. If none appear, start the Drillbits with drillbit.sh start.

  • Match Drill's ZK configuration to your CLI URL
    On your Drill nodes, open drill-override.conf and verify the zk.connect setting matches the connect string in your CLI command:

    drill.exec: {
      cluster-id: "drillbits1",
      zk.connect: "<zk node1 ip>:5181,<zk node2 ip>:5181,<zk node3 ip>:5181"
    }
    

    Mismatched strings will prevent the client from finding the Drill cluster.

  • Check for authentication requirements
    If your ZK cluster uses SASL/Kerberos authentication, you’ll need to add auth parameters to your JDBC URL. For example:

    ./sqlline -u "jdbc:drill:zk=<zk node1 ip>:5181,<zk node2 ip>:5181,<zk node3 ip>:5181;auth=kerberos;principal=drill/<hostname>@YOUR_REALM.COM"
    

    Ensure your client has a valid krb5.conf file and keytab if using Kerberos.

If you still hit issues, share the exact error message you’re seeing (e.g., connection timeout, authentication failure) — that will help narrow down the root cause faster.

内容的提问来源于stack exchange,提问作者Aman Raturi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 07:24:30