Can not run dremio in docker

While trying to run dremio in docker versin 23.0 I have this error message "Java not found or Java binary not executable at JAVA_HOME=/opt/java/openjdk/JAVA=/opt/java/openjdk/bin/java.
"

@elshafey

Just tried this

% export JAVA_HOME=/opt/java/openjdk/JAVA=/opt/java/openjdk/bin/java

% env | grep JAVA_HOME

JAVA_HOME=/opt/java/openjdk/JAVA=/opt/java/openjdk/bin/java

Get the below error

% /Users/balaji/Downloads/dremio-enterprise-21.5.0-202209162221110829-7167c14a/bin/dremio restart

find: /opt/java/openjdk/JAVA=/opt/java/openjdk/bin/java: No such file or directory

Java not found or Java binary not executable at JAVA_HOME=/opt/java/openjdk/JAVA=/opt/java/openjdk/bin/java/JAVA=.

It looks like the syntax of you setting JAVA_HOME is incorrect

all you need is something like below

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_341.jdk/Contents/Home

what i am trying to run is docker run -p 9047:9047 -p 31010:31010 -p 45678:45678 dremio/dremio-oss and I have the mentioned error

Can you try logging into the container and checking if Java exists?

C:\Users\btcho>docker exec --user=root -it d9e475fdf7295050c363263768ca2c6fd2d21de1425fff2eb240c1c59a2ac8bb /bin/bash
root@d9e475fdf729:/opt/dremio# which java
/opt/java/openjdk/bin/java
root@d9e475fdf729:/opt/dremio# ps -efl | grep java
4 S dremio       1     0  1  80   0 - 1908660 -    Jan12 pts/0    01:07:42 /opt/java/openjdk/bin/java -Djava.util.logging.config.class=org.slf4j.bridge.SLF4JBridgeHandler -Djava.library.path=/opt/dremio/lib -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Ddremio.plugins.path=/opt/dremio/plugins -Xmx4096m -XX:MaxDirectMemorySize=8192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/dremio -Dio.netty.maxDirectMemory=0 -Dio.netty.tryReflectionSetAccessible=true -DMAPR_IMPALA_RA_THROTTLE -DMAPR_MAX_RA_STREAMS=400 -XX:+UseG1GC -XX:+PrintClassHistogramBeforeFullGC -XX:+PrintClassHistogramAfterFullGC -cp /opt/dremio/conf:/opt/dremio/jars/*:/opt/dremio/jars/ext/*:/opt/dremio/jars/3rdparty/*:/opt/java/openjdk/lib/tools.jar com.dremio.dac.daemon.DremioDaemon
0 S root      7122  7111  0  80   0 -  1618 pipe_r 00:31 pts/2    00:00:00 grep --color=auto java
root@d9e475fdf729:/opt/dremio#

This is from the latest OSS image.

I am using the latest image from OSS alredy. But the docker run command cann’t be executed due to the mentioned error Java not found or Java binary not executable at JAVA_HOME=/opt/java/openjdk/JAVA=/opt/java/openjdk/bin/java

Hello @elshafey,

Could you share your execution environment details with us?

Operating System vendor and version - looks like Windows, but what version?
Docker Version

I’m not able to reproduce this issue with either OSS or EE releases of the same 23.1 tags. I am running on a Mac on ARM with the latest Docker version, so my environment is a little different. Testing on my Linux cluster, I have the same positive experience using a non-Docker Container environment.

Thanks,
–Reid

Hi
I have the same problem with the latest image from OSS : I’ve exported the image from docker, and imported on another server (redhat, podman).
When I create the container with the imported image, I have the same error Java not found or Java binary not executable at JAVA_HOME=/opt/java/openjdk/JAVA=/opt/java/openjdk/bin/java

So, if we use the flag “ENV” when the container is created, what would be the values for JAVA_HOME and JAVA ?

of course, the conbtainer doesn’t start, so I can’t connect to the console of the container.

Hello @Christophe,

Are you able to run the image directly off the Docker Hub, rather than from your internally hosted version? This test will help isolate if there is some issue with your locally cached image which is triggering this problem.

I have now tested with RHEL 8.5 using the “latest” PodMan line. Running either the Docker Hub-hosted version or a locally hosted image on an internal registry is working for me without experiencing the error you have reported.

This leads me to believe that this issue is more environmental, or perhaps related to specific versions which you may be using that diverge from my tested versions. If you could fully qualify the version of PodMan (which of the “latest” or “stable” release stream that you are using) and supporting components that may point to discrepancies.

Thanks,
–Reid

Hi Reid

My server (redhat 8) doesn’t have access to internet.
So, I pull the image on my PC (ubuntu), export it and then I import it on my server.

I did the same process for minio, and it’s ok.
But for dremio I have an error with Java.

I use dremio/dremio-oss:latest on docker hub (Updated 2 months ago).

1 - On ubuntu with docker, it’s OK and I have JAVA_HOME=/opt/java/openjdk

I export the image:
docker image save -o image_dremio.tar dremio/dremio-oss

2 - Now, on redhat 8 with podman, i load image and create a container:
podman load -i image_dremio.tar

[root@hb000693 ~]# podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/dremio/dremio-oss latest 8c3cc8bb0df2 7 weeks ago 1.15 GB

docker run -p 9047:9047 -p 31010:31010 -p 45678:45678 --name dremio --env JAVA_HOME=“/opt/java/openjdk” localhost/dremio/dremio-oss
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Java not found or Java binary not executable at JAVA_HOME=/opt/java/openjdk/JAVA=/opt/java/openjdk/bin/java.

it is debian 9 x86_64
docker is 19.03.5

Hi

I’ve tested with image created from (ubuntu 20.04 + docker 20.10.12) and (fedora + podman).
The problem appears when I import the image on redhat 8 (with podman).