我们正在尝试使用此处给出的示例连接到微服务中的 webhdfs URL https://www.ibm.com/support/knowledgecenter/en/SSPT3X_3.0.0/com.ibm.swg.im.infosphere.biginsights.admin。 doc/doc/kerberos_httpfs.html我已经为其创建了 conf 文件并保存在资源位置 [libdefaults] allow_weak_crypto = true default_realm = CLOUD.CORP.XXXXXX.XXX # kdc will be obtained through DNS SRV dns_lookup_kdc = true dns_lookup_realm = true forwardable = true default_tkt_enctypes = aes256-cts aes128-cts default_etypes = aes256-cts aes128-cts default_tgs_enctypes = aes256-cts aes128-cts permitted_enctypes = aes256-cts aes128-cts ticket_lifetime = 24h rdns = true [realms] CLOUD.CORP.XXXXXX.XXX = { kdc = abc-dv-def0.cloud.corp.XXXXXX.XXX:88 master_kdc = abc-dv-def0.cloud.corp.XXXXXX.XXX:88 } [domain_realm] .cloud.corp.XXXXXX.XXX = CLOUD.CORP.XXXXXX.XXX cloud.corp.XXXXXX.XXX = CLOUD.CORP.XXXXXX.XXX abc-dv-def0.cloud.corp.XXXXXX.XXX = CLOUD.CORP.XXXXXX.XXXjava代码片段如下 Configuration conf = new Configuration(); conf.set("hadoop.security.authentication", "kerberos"); conf.set("hadoop.home.dir", "/"); UserGroupInformation.setConfiguration(conf); System.out.println("--------------loginWithKeytab--------"); UserGroupInformation loginUser = UserGroupInformation.loginUserFromKeytabAndReturnUGI(principal, keytabUrl); UserGroupInformation.setLoginUser(loginUser); String user = UserGroupInformation.getCurrentUser().getUserName(); System.out.println("Starting the connection for User:::"+user);我创建了自己的 buildpack 以部署到 PCF,并添加了 local_policy.jar 以实现无限强度 (JCE),以便在 PCF 中解包时覆盖。https://github.com/sivacham/java-buildpack
1 回答
婷婷同学_
TA贡献1844条经验 获得超8个赞
最后发现问题出在keytab中。我们将密钥表指向集群中的节点,但请求正在击中负载均衡器并且在那里失败(从 KDC 日志中观察到)。在最后的密钥表中添加 laodbalancer 详细信息后,它运行良好,我能够创建 201。
添加回答
举报
0/150
提交
取消