记一次FreeIPA WEBUI 登陆错误 Login failed due to an unkno

昨天手欠,操作虚拟机时不小心将服务器的网卡给Remove掉了,重新添加并重启ipa服务后发现无法登陆WEB UI报错如下:
记一次FreeIPA WEBUI 登陆错误 Login failed due to an unkno

然后查看各种log ,发现 httpd的日志中有下面的错误 

tail /var/log/httpd/error_log -f
[Wed May 19 13:56:35.691889 2021] [:error] [pid 4317] SSL Library Error: -12224 SSL peer had some unspecified issue with the certificate it received
[Wed May 19 13:56:35.776444 2021] [:error] [pid 4247] [remote 10.0.0.102:208] mod_wsgi (pid=4247): Exception occurred processing WSGI script '/usr/share/ipa/wsgi.py'.
[Wed May 19 13:56:35.776540 2021] [:error] [pid 4247] [remote 10.0.0.102:208] Traceback (most recent call last):
[Wed May 19 13:56:35.776577 2021] [:error] [pid 4247] [remote 10.0.0.102:208]   File "/usr/share/ipa/wsgi.py", line 51, in application
[Wed May 19 13:56:35.776641 2021] [:error] [pid 4247] [remote 10.0.0.102:208]     return api.Backend.wsgi_dispatch(environ, start_response)
[Wed May 19 13:56:35.776669 2021] [:error] [pid 4247] [remote 10.0.0.102:208]   File "/usr/lib/python2.7/site-packages/ipaserver/rpcserver.py", line 262, in __call__
[Wed May 19 13:56:35.776702 2021] [:error] [pid 4247] [remote 10.0.0.102:208]     return self.route(environ, start_response)
[Wed May 19 13:56:35.776712 2021] [:error] [pid 4247] [remote 10.0.0.102:208]   File "/usr/lib/python2.7/site-packages/ipaserver/rpcserver.py", line 274, in route
[Wed May 19 13:56:35.776727 2021] [:error] [pid 4247] [remote 10.0.0.102:208]     return app(environ, start_response)
[Wed May 19 13:56:35.776736 2021] [:error] [pid 4247] [remote 10.0.0.102:208]   File "/usr/lib/python2.7/site-packages/ipaserver/rpcserver.py", line 929, in __call__
[Wed May 19 13:56:35.776772 2021] [:error] [pid 4247] [remote 10.0.0.102:208]     self.kinit(user_principal, password, ipa_ccache_name)
[Wed May 19 13:56:35.776820 2021] [:error] [pid 4247] [remote 10.0.0.102:208]   File "/usr/lib/python2.7/site-packages/ipaserver/rpcserver.py", line 965, in kinit
[Wed May 19 13:56:35.776902 2021] [:error] [pid 4247] [remote 10.0.0.102:208]     pkinit_anchors=[paths.KDC_CERT, paths.KDC_CA_BUNDLE_PEM],
[Wed May 19 13:56:35.777239 2021] [:error] [pid 4247] [remote 10.0.0.102:208]   File "/usr/lib/python2.7/site-packages/ipalib/install/kinit.py", line 125, in kinit_armor
[Wed May 19 13:56:35.777303 2021] [:error] [pid 4247] [remote 10.0.0.102:208]     run(args, env=env, raiseonerr=True, capture_error=True)
[Wed May 19 13:56:35.777328 2021] [:error] [pid 4247] [remote 10.0.0.102:208]   File "/usr/lib/python2.7/site-packages/ipapython/ipautil.py", line 511, in run
[Wed May 19 13:56:35.777359 2021] [:error] [pid 4247] [remote 10.0.0.102:208]     raise CalledProcessError(p.returncode, arg_string, str(output))
[Wed May 19 13:56:35.777420 2021] [:error] [pid 4247] [remote 10.0.0.102:208] CalledProcessError: Command '/usr/bin/kinit -n -c /var/run/ipa/ccaches/armor_4247 -X X509_anchors=FILE:/var/kerberos/krb5kdc/kdc.crt -X X509_anchors=FILE:/var/lib/ipa-client/pki/kdc-ca-bundle.pem' returned non-zero exit status 1

手动执行 以下命令发现也一样失败

 /usr/bin/kinit -n -c /var/run/ipa/ccaches/armor_4247 -X X509_anchors=FILE:/var/kerberos/krb5kdc/kdc.crt -X X509_anchors=FILE:/var/lib/ipa-client/pki/kdc-ca-bundle.pem
kinit: Failed to store credentials: No credentials cache found (filename: /var/run/ipa/ccaches/armor_4247) while getting initial credentials

查看一下目录文件,找到问题原因所在。是因为文件目录丢失造成。

ll /var/run/ipa/ccaches/armor_4247
ls: cannot access /var/run/ipa/ccaches/armor_4247: No such file or directory

那就简单了,咱们给他建上

[root@ipa2 ~]# mkdir /var/run/ipa/ccaches/
[root@ipa2 ~]# chown -R ipaapi:ipaapi /var/run/ipa/ccaches/
[root@ipa2 ~]# chmod 770 /var/run/ipa/ccaches/

然后重启一下IPA服务,让他自动生成相应的文件。

[root@ipa2 ~]# ipactl restart

再次登陆WEBUI 后搞定 

记一次FreeIPA WEBUI 登陆错误 Login failed due to an unkno

上一篇:WebUI自动化测试框架搭建(十二)-测试报告模块封装(HtmlTestRunner)


下一篇:CRM WebUI and Hybris的Product页面标题实现