Member since
03-13-2017
2
Posts
0
Kudos Received
0
Solutions
03-21-2017
07:14 AM
I am able to connect finally. I had to authenticate using kerberos so initially I was authenticating like this : Sample () { Configuration conf = new Configuration(); conf.set("hadoop.security.authentication", "Kerberos"); UserGroupInformation.setConfiguration(conf); UserGroupInformation.loginUserFromKeytab(user, keytabPath); ugi = UserGroupInformation.getLoginUser(); } after this URL of this type : jdbc:impala://myhost.example.com:21050/;principal=impala/myhost.example.com@H2.EXAMPLE.COM;SSL=1;sslTrustStore=trustStorePath;trsutStorePassword=xyz; Creating datasource and get connection. This did not work and was giving above mentioned exception. Later Modification : Using AuthMech = 1 in URL and setting KrbHostFQDN, KrbServiceName, KrbAuthType in URL. Not executing Sample() after this and just setting these properties : java.security.krb5.conf = Your krb5.conf path java.security.auth.login.config = login.ini where login.ini is like this Client { com.sun.security.auth.module.Krb5LoginModule required useKeyTab=true keyTab="PathToTheKeyTab" principal="cloudera@CLOUDERA" doNotPrompt=true; }; Hopefully this may help to debug other guys struggling like me 🙂
... View more