Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.



When hive.server2.transport.mode is binary and hive.server2.authentication is KERBEROS, SSL encryption does did not currently work until Hive 2.0. Set hive.server2.thrift.sasl.qop to auth-conf to enable encryption. See HIVE-14019 for details.


  1. Create the self signed certificate and add it to a keystore file using:  keytool -genkey -alias -keyalg RSA -keystore keystore.jks -keysize 2048 Ensure the name used in the self signed certificate matches the hostname where HiveServer2 will run.
  2. List the keystore entries to verify that the certificate was added. Note that a keystore can contain multiple such certificates: keytool -list -keystore keystore.jks

  3. Export this certificate from keystore.jks to a certificate file: keytool -export -alias -file -keystore keystore.jks

  4. Add this certificate to the client's truststore to establish trust: keytool -import -trustcacerts -alias -file -keystore truststore.jks

  5. Verify that the certificate exists in truststore.jks: keytool -list -keystore truststore.jks

  6. Then start HiveServer2, and try to connect with beeline using: jdbc:hive2://<host>:<port>/<database>;ssl=true;sslTrustStore=<path-to-truststore>;trustStorePassword=<truststore-password>