0

I am using the below mentioned connection URL to connect to hive server using beeline.

!connect jdbc:hive2://sandbox.hortonworks.com:21000/default;ssl=true;sslTrustStore=/var/lib/knox/data-2.3.2.0-2950/security/keystores/gateway.jks;trustStorePassword=knox?hive.server2.transport.mode=http;httpPath=gateway/default/hive

After the connection I am getting below mentioned error.

Could not open client transport with JDBC Uri: jdbc:hive2://sandbox.hortonworks.com:21000/default;ssl=true;sslTrustStore=/var/lib/knox/data-2.3.2.0-2950/security/keystores/gateway.jks;trustStorePassword=knox?hive.server2.transport.mode=http;httpPath=gateway/default/hive: Could not create http connection to jdbc:hive2://sandbox.hortonworks.com:21000/default;ssl=true;sslTrustStore=/var/lib/knox/data-2.3.2.0-2950/security/keystores/gateway.jks;trustStorePassword=knox?hive.server2.transport.mode=http;httpPath=gateway/default/hive. javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? (state=08S01,code=0)

Kindly help me to resolve this error.

Nithin
  • 9,661
  • 14
  • 44
  • 67
mohit
  • 1
  • 2

1 Answers1

0

There will be multiple reasons for getting this error.

  1. Make sure Knox is running using ambari and Check which port number it is using. By default knox uses 8443
  2. Check SSL store location is correct. It varies based on which version of sandbox you are using
  3. Check trustStorePassword is correct. Default password is knox. Otherwise use your Knox master password.
  4. Make sure hive configuration is set to hive.server2.transport.mode to http
  5. After the configuration changes make sure that you restarted the knox gateway
Nithin
  • 9,661
  • 14
  • 44
  • 67