apache / apache/drill

Drill Embedded with TLS: Impossible?

Open
#2,816 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
2k
Forks
990
Avg merge
1d 8h
Merged PRs (30d)
5

Description

**Describe the bug**
To secure the communication between client and server, drill-embedded is to be configured with TLS. Following the instructions on the website (https://drill.apache.org/docs/configuring-ssl-tls-for-encryption/) I always get the error message: `Error: Failure in connecting to Drill: org.apache.drill.exec.rpc.RpcException: CONNECTION : io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:31010 (state=,code=0)`

**To Reproduce**
Steps to reproduce the behavior:
1. Download Apache Drill from Drill website
2. Create keystore.jks and truststore.jks via `keytool`
3. Create drill-override.conf (see "Additional context" below)
4. Start drill-embedded with required "-u" JDBC parameter to define TLS (see "Additional context" below)
5. See error

**Expected behavior**
drill-embedded starts without any error message, sqlline interface is available, respective ports (8047, 31010) are bound

**Error detail, log output or screenshots**
`Error: Failure in connecting to Drill: org.apache.drill.exec.rpc.RpcException: CONNECTION : io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:31010 (state=,code=0)`

**Drill version**
1.21.1

**Additional context**
1. drill-override.conf:
```
drill.exec: {
cluster-id: "drillbits1",
zk.connect: "localhost:2181",
security.user.encryption.ssl.enabled: true,
ssl: {
protocol: "TLSv1.2",
keyStoreType: "JKS",
keyStorePath: "/InstallFolder/apache-drill-1.21.1/conf/keystore.jks",
keyStorePassword: "securePasswd",
keyPassword: "securePasswd",
trustStoreType: "JKS",
trustStorePath: "/InstallFolder/apache-drill-1.21.1/conf/truststore.jks"
trustStorePassword: "securePasswd",
provider: "JDK",
useHadoopConfig: false
}
}
```
2. drill-embedded:
```
cd /InstallFolder/apache-drill-1.21.1
bin/drill-embedded -u "jdbc:drill:schema=data.query;drillbit=localhost:31010;enableTLS=true;trustStorePath=/InstallFolder/apache-drill-1.21.1/conf/truststore.jks;trustStorePassword=securePasswd"
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the drill-override.conf TLS settings and the bin/drill-embedded command, then compare the JDBC URL parameters with the TLS configuration described in the linked documentation. Reproduce on Drill 1.21.1 and inspect startup output around the failed connection to localhost:31010. Done means drill-embedded starts, sqlline is available, and ports 8047 and 31010 are bound.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.