Issue with SSL connection from Docker

Hello Everyone!

We encountered the weird issue with connectivity to Dremio server with SSL using JDBC driver (driver version 4.9.1).
When we start the jar as it is (java -jar app.jar) and connect from it connection works fine.
But when we put the jar into Docker the connection fails with the following meaningless error:
java.sql.SQLException: Failure in connecting to Dremio: cdjd.com.dremio.exec.rpc.ConnectionFailedException: CONNECTION : SSL negotiation failed with root cause java.lang.UnsupportedOperationException: Allocator doesn't support heap-based memory. at cdjd.org.apache.arrow.memory.ArrowByteBufAllocator.fail(ArrowByteBufAllocator.java:158) ~[dremio-jdbc-driver-4.9.1-202010230218060541-2e764ed0.jar!/:4.9.1-202010230218060541-2e764ed0] at cdjd.org.apache.arrow.memory.ArrowByteBufAllocator.heapBuffer(ArrowByteBufAllocator.java:129) ~[dremio-jdbc-driver-4.9.1-202010230218060541-2e764ed0.jar!/:4.9.1-202010230218060541-2e764ed0] at ...

We use the following Dockerfile:
FROM openjdk:8u171-jre-alpine3.7
ADD ./app.jar app.jar
VOLUME /opt/tester/
EXPOSE 8081
ENTRYPOINT [“sh”, “-c”, “java $JAVA_OPTIONS -jar /app.jar”]

Does anyone encountered the same issue? What may cause it?
Will appreciate any hints!

1 Like

@cantoress

Is there any reason you need to copy jars and not use the standard method?

http://docs.dremio.com/drivers/dremio-jdbc-driver/

@balaji.ramaswamy
Hello Balaji!
Maybe I didn’t add enough information in the original question.
We have a Spring Boot application that has Dremio JDBC driver as dependency. We create JDBC Connection inside our application and the connection string looks like this:
jdbc:dremio:direct=localhost:31010;schema=null;ssl=true;disableHostVerification=true;disableCertificateVerification=true;

When we simply package our application and run it as jar everything works fine.
If we put the application in the Docker container we receive the error stated above.

@cantoress

Doing a quick internal JIRA search, it seems like either you are using a 32 bit JDK or on an Alpine based docker image. Is either one of them true?

1 Like

@balaji.ramaswamy
Yes, you’re right, we are using Alpine based docker image for Java 8 from OpenJDK

@cantoress The more recent versions of the JDBC driver requires “glibc” which is not packaged in the Alpine docker image. Either use an older JDBC version < 4.1 or is it possible to use a different docker image like RetHat UBI 8

1 Like

@balaji.ramaswamy
Thanks a lot!
We upgraded our base Docker image to the fuller one and everything started to work!