我在RStudio中通过JDBC建立了蜂巢连接,没有问题,我在其中创建了Kerberos票证,Tools < Shell: kinit
并且一切正常,我可以使用Kerberos TGT。
但是,如果我通过shell / ssh进行相同的方法并在终端(不是RStudio)中加载R,则R无法使用Kerberos TGT File并失败。
如何使用Kerberos票证?
> [user@server ~]$: kinit
>
> Password for user@domain: --i put the password--
>
> [user@server ~]$: R
>
> -- R load --
>
> \> source('samecode.r')
>
> Error Caused by: java.sql.SQLException: Could not create secure connection to jdbc:hive2:....etc
任何的想法?如果不创建票证,则会在RStudio中发生此错误,但是在tools> shell中创建票证时,一切正常,在控制台中则不可能。我尝试用
system('kinit');
并创建罚单,但不能在其余代码中使用它。
嗨,您可以在R中使用keytab
文件和以下命令创建kerberos票证:
system("kinit [email protected] -k -t username.keytab")
要创建,keytab
您必须通过shell执行此操作:
ktutil
ktutil: addent -password -p [email protected] -k 1 -e rc4-hmac
Password for [email protected]: [enter your password]
ktutil: addent -password -p [email protected] -k 1 -e aes256-cts
Password for [email protected]: [enter your password]
ktutil: wkt username.keytab
ktutil: quit
在此keytab
说明创建a的所有步骤
并且该keytab
文件必须位于您的工作目录中。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句