mohit
mohit

Reputation: 1

Unable to connect to hive server through knox

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.

Upvotes: 0

Views: 1237

Answers (1)

user1112259
user1112259

Reputation:

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

Upvotes: 0

Related Questions