Summary
This article details the cause of the "Not a JWT" error when connecting to a Dremio coordinator via JDBC/ODBC and provides steps to resolve the issue.
Reported Issue
When connecting to a Dremio coordinator, the following error can be returned to the client application:
Unknown Failure ( status code = 3002, [Dremio][Connector] (30) Handshake failure occurred while trying to connect to local=<coordinator ip or hostname>:31010. Server message: [30018]Handshake Failed due to an error on the server. [Server message was: (e4fe2289-9507-4352-be40-c00a2041150b) Not a JWT]
The coordinator side server.log error will look like:
2023-06-19 10:07:41,265 [UserServer-1] ERROR c.d.exec.rpc.RpcExceptionHandler - Exception in RPC communication. Connection: /<coordinator ip or hostname>:31010 <--> /10.102.106.252:60904 (user client). Closing connection.
io.netty.handler.codec.DecoderException: com.dremio.exec.rpc.RpcException: Handshake request failed: Not a JWT
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:98)
or
2022-05-27 05:30:59,436 [UserServer-1] ERROR c.d.sabot.rpc.user.UserRPCServer - Error b376e02f-8e5f-4b50-bd05-5821af581e77 in Handling handshake request: UNKNOWN_FAILURE, Not a JWT
com.dremio.jwtvalidator.util.InvalidExternalTokenException: Not a JWT
at com.dremio.jwtvalidator.util.JWTUtil.getTokenClaimSet(JWTUtil.java:73)
at com.dremio.jwtvalidator.service.JwtValidator.validateJwt(JwtValidator.java:153)
Relevant Versions
All releases prior to v22.0.0
Cause
The error message is incorrect and has been changed from v22 onwards to read "Invalid Token".
The underlying cause of this issue is that an incorrect username or password has been used in the client connection.
Steps to Resolve
Correct the username and/or password being passed to the client application.