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!

@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?

@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!

I’ve also seen this error come up when the /tmp directory has noexec applied. A simple workaround is to set java.io.tmpdir to a local directory that has exec permissions.

@balaji.ramaswamy When you mentioned using older version < 4.1, did you mean Dremio driver version or JDBC version? Thanks.

@haipertext JDBC driver version

@balaji.ramaswamy : I am trying to connect over SSL using Dremio JDBC Driver version 20.1.0 in a UBI8 image, and I verified that the image contains glibc library.
However, I am still getting “Failed SSL Connection” error.

Could you please let me know is there anything else that I need to do to make it work?

@ajaytushir Failed SSL is a very high level error and it tell us the SSL configuration is having issues, Is your Dremio server and JDBC client trusted?

@balaji.ramaswamy : I am able to connect successfully using Dremio driver version 3.0.6. So, I think the setup is good.
However, Dremio 20.1.0 is failing with the following exception:

Failed SSL connection from 10.42.0.126: error:0A000126:SSL routines::unexpected eof while reading

@ajaytushir IS you error similar to the screenshot in the below stackover flow article?

Also is there ngnix in the mix?