Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ingestion task can't be launched in docker #13057

Closed
FrankChen021 opened this issue Sep 8, 2022 · 2 comments · Fixed by #13059
Closed

Ingestion task can't be launched in docker #13057

FrankChen021 opened this issue Sep 8, 2022 · 2 comments · Fixed by #13059
Labels
Bug Docker https://hub.docker.com/r/apache/druid
Milestone

Comments

@FrankChen021
Copy link
Member

#12839 introduces a script run-java to start the peon tasks, and this script requires bash to execute it.

However, the busybox that docker images installs does not ship bash but sh, so when a task is launched by middle manager, following exception is thrown.

middlemanager    | java.io.IOException: Cannot run program "bin/run-java": error=2, No such file or directory
middlemanager    |      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1128) ~[?:?]
middlemanager    |      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1071) ~[?:?]
middlemanager    |      at org.apache.druid.indexing.overlord.ForkingTaskRunner.runTaskProcess(ForkingTaskRunner.java:491) ~[druid-indexing-service-25.0.0-SNAPSHOT.jar:25.0.0-SNAPSHOT]
middlemanager    |      at org.apache.druid.indexing.overlord.ForkingTaskRunner$1.call(ForkingTaskRunner.java:390) ~[druid-indexing-service-25.0.0-SNAPSHOT.jar:25.0.0-SNAPSHOT]
middlemanager    |      at org.apache.druid.indexing.overlord.ForkingTaskRunner$1.call(ForkingTaskRunner.java:153) ~[druid-indexing-service-25.0.0-SNAPSHOT.jar:25.0.0-SNAPSHOT]
middlemanager    |      at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
middlemanager    |      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
middlemanager    |      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
middlemanager    |      at java.lang.Thread.run(Thread.java:829) ~[?:?]
middlemanager    | Caused by: java.io.IOException: error=2, No such file or directory
middlemanager    |      at java.lang.ProcessImpl.forkAndExec(Native Method) ~[?:?]
middlemanager    |      at java.lang.ProcessImpl.<init>(ProcessImpl.java:340) ~[?:?]
middlemanager    |      at java.lang.ProcessImpl.start(ProcessImpl.java:271) ~[?:?]
middlemanager    |      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1107) ~[?:?]

The solution is:

  1. replace the directive of #!/bin/bash -eu of run-java file to #!/bin/sh
  2. Or install bash to docker

I think the 2nd alternative is better.

@FrankChen021 FrankChen021 added Bug Docker https://hub.docker.com/r/apache/druid labels Sep 8, 2022
@FrankChen021 FrankChen021 added this to the 24.0.0 milestone Sep 8, 2022
@FrankChen021
Copy link
Member Author

24.0.0 is also affected

@FrankChen021
Copy link
Member Author

Actually, the startup script druid.sh in docker is declared using sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Docker https://hub.docker.com/r/apache/druid
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant