apache / drill

Apache Drill is a distributed MPP query layer for self describing data
https://drill.apache.org/
Apache License 2.0
1.93k stars 980 forks source link

Cannot run dockerized Drill in detached mode #2790

Closed rstoughton closed 1 year ago

rstoughton commented 1 year ago

Describe the bug

I am trying to run Drill in docker on my local machine in detached mode. The container keeps exiting about ~12 seconds after running the command specified in the documentation (https://drill.apache.org/docs/running-drill-on-docker/#running-the-drill-docker-container-in-detached-mode)

To Reproduce

docker run --name drill-detached \
    -p 8047:8047 \
    -p 31010:31010 \
    --detach apache/drill:1.21.0

Expected behavior

The container continues to run in the background.

Error detail, log output or screenshots

The container exits after roughly 12 seconds with the following output. Note the %.

Screen Shot 2023-04-07 at 2 14 21 PM

Drill version

1.21.0

Additional context

N/A

jnturton commented 1 year ago

Here's a relevant discussion from the Drill mailing list. I think you'd need to override the container ENTRYPOINT to apply the mentioned command line to a container launch. Also consider a single-node Drill cluster (with a ZooKeeper) using the distributed mode Docker Compose scripts here.

Subject: Re: Running drill in background in embedded mode From: James Turton dzamo@apache.org Date: 2022/07/19, 07:28 To: user@drill.apache.org, Prabhakar Bhosale bhosale.p.v@gmail.com

Well if we're playing with hacks... 😄

nohup drill-embedded -f <(sleep infinity) > /dev/null

That needs a shell smart enough to do process substitution and avoids what I guess was busy wait loop in sqlline's input reader that you ran into.

Back to being boring and responsible: are you sure you want to run Drill this way? It would be a lot more natural to launch a standalone Drillbit with drillbit.sh, having started a ZooKeeper somewhere beforehand.

On 2022/07/19 05:30, Prabhakar Bhosale wrote:

Hi Luoc, When I run the drill in embedded mode as foreground process, the %CPU does not go beyond 1%. for java process. Please let me know if you need any additional information. thx

Regards Prabhakar

On Tue, Jul 19, 2022 at 6:57 AM luoc luoc@apache.org wrote:

Hi,

What is the cost of the CPU if you are running in a front process?

On Jul 18, 2022, at 14:51, Prabhakar Bhosale bhosale.p.v@gmail.com wrote: Hi Team, I am trying to run drill in embedded mode as background process with below command nohup sh drill-embedded >/dev/null 2>&1 &

My observation is that it takes too much CPU. After starting drill by above command the output of top command against java process shows %CPU anything between 150 to 175%.

So any recommended way to run drill in embedded mode in background? thanks REgards Prabhakar