Runtime.getRuntime().exec();执行cmd命令,且命令涉及到 kinit -kt /etc/xxxxx.keytab xxxx@HADOOP.COM命令
于是偶然出现下面的问题,这种错误的几率很小,大概几百分之一的概率。
百度了一下,说是kinit -kt 并行引起的,所以解决方案就是解决这种并行问题,但是程序必须保证并行,所以代码里写了尝重新执行的方法,将失败率减少到万分之一。
kinit: Failed to store credentials: Internal credentials cache error (filename: /tmp/krb5cc_1645005342) while getting initial credentials
kinit: Failed to store credentials: No credentials cache found (filename: /tmp/krb5cc_1645005342) while getting initial credentials
kinit: Failed to store credentials: Bad format in credentials cache (filename: /tmp/krb5cc_1645005342) while getting initial credentials