我們正在嘗試使用此處給出的示例連接到微服務中的 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我已經為其創(chuàng)建了 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);我創(chuàng)建了自己的 buildpack 以部署到 PCF,并添加了 local_policy.jar 以實現無限強度 (JCE),以便在 PCF 中解包時覆蓋。https://github.com/sivacham/java-buildpack
1 回答

婷婷同學_
TA貢獻1844條經驗 獲得超8個贊
最后發(fā)現問題出在keytab中。我們將密鑰表指向集群中的節(jié)點,但請求正在擊中負載均衡器并且在那里失?。◤?KDC 日志中觀察到)。在最后的密鑰表中添加 laodbalancer 詳細信息后,它運行良好,我能夠創(chuàng)建 201。
添加回答
舉報
0/150
提交
取消