在kerberos身份验证下使用JDBC连接到Impala时出错

问题描述:

我创建一个扩展了DriverManagerDataSource的类SecureImpalaDataSource,并使用UserGroupInformation.doAs()获取带有keytab文件的impala连接.但是我得到如下错误:

I create a class SecureImpalaDataSource that extends DriverManagerDataSource, and use UserGroupInformation.doAs() to get a Connection to impala with keytab file. But I get the error as follow:

java.sql.SQLException:[Simba] ImpalaJDBCDriver错误 初始化或创建用于身份验证的传输: [Simba] ImpalaJDBCDriver无法连接到服务器:空.

java.sql.SQLException: [Simba]ImpalaJDBCDriver Error initialized or created transport for authentication: [Simba]ImpalaJDBCDriver Unable to connect to server: null.

但是当我在测试演示中获得与kerberos票证缓存的连接时,我就成功了.有人可以帮助我吗?

But I am successful when I get the connection with kerberos ticket cache in a test demo. Anyone can help me?

结果是我的URL中的HOST和FQDN不一致.

The result is that the HOST and the FQDN in my URL are inconsistent.