freeipa / freeipa-healthcheck

Check the health of a freeIPA installation
GNU General Public License v3.0
50 stars 28 forks source link

ipa-healthcheck --source ipahealthcheck.dogtag.ca --check DogtagCertsConfigCheck returns traceback. #327

Closed menonsudhir closed 8 months ago

menonsudhir commented 8 months ago
  1. [root@server ~]# mv /var/lib/pki/pki-tomcat/conf/ca/CS.cfg /var/lib/pki/pki-tomcat/conf/ca/CS.cfg.bckup
  2. [root@server ~]# ipa-healthcheck --source ipahealthcheck.dogtag.ca --check DogtagCertsConfigCheck [ { "source": "ipahealthcheck.dogtag.ca", "check": "DogtagCertsConfigCheck", "result": "CRITICAL", "uuid": "4f82e6ee-6f7c-4da6-9259-c174b8197d89", "when": "20240318134057Z", "duration": "0.213289", "kw": { "exception": "[Errno 2] No such file or directory: '/var/lib/pki/pki-tomcat/conf/ca/CS.cfg'", "traceback": "Traceback (most recent call last):\n File \"/usr/lib/python3.6/site-packages/ipahealthcheck/core/core.py\", line 56, in run_plugin\n for result in plugin.check():\n File \"/usr/lib/python3.6/site-packages/ipahealthcheck/core/plugin.py\", line 18, in wrapper\n for result in f(*args, **kwds):\n File \"/usr/lib/python3.6/site-packages/ipahealthcheck/dogtag/ca.py\", line 61, in check\n blobs[nickname], '=')\n File \"/usr/lib/python3.6/site-packages/ipapython/directivesetter.py\", line 186, in get_directive\n with open(filename, \"r\") as fd:\nFileNotFoundError: [Errno 2] No such file or directory: '/var/lib/pki/pki-tomcat/conf/ca/CS.cfg'\n" } } ]
menonsudhir commented 8 months ago

Tested on RHEL8 with the below version idm-pki-server-10.15.0-1.module+el8.10.0+21280+cce842b8.noarch ipa-server-4.9.13-8.module+el8.10.0+21432+ee17c097.x86_64 ipa-healthcheck-0.12-3.module+el8.9.0+19634+c162f948.noarch

Debug log Loading Index file from '/var/lib/ipa/sysrestore/sysrestore.index' Starting external process args=['/usr/bin/certutil', '-d', 'sql:/etc/pki/pki-tomcat/alias', '-L', '-f', '/etc/pki/pki-tomcat/alias/pwdfile.txt'] Process finished, return code=0 stdout= Certificate Nickname Trust Attributes SSL,S/MIME,JAR/XPI

caSigningCert cert-pki-ca CTu,Cu,Cu ocspSigningCert cert-pki-ca u,u,u subsystemCert cert-pki-ca u,u,u auditSigningCert cert-pki-ca u,u,Pu Server-Cert cert-pki-ca u,u,u

stderr= Exception raised: [Errno 2] No such file or directory: '/var/lib/pki/pki-tomcat/conf/ca/CS.cfg' Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/ipahealthcheck/core/core.py", line 56, in run_plugin for result in plugin.check(): File "/usr/lib/python3.6/site-packages/ipahealthcheck/core/plugin.py", line 18, in wrapper for result in f(*args, **kwds): File "/usr/lib/python3.6/site-packages/ipahealthcheck/dogtag/ca.py", line 61, in check blobs[nickname], '=') File "/usr/lib/python3.6/site-packages/ipapython/directivesetter.py", line 186, in get_directive with open(filename, "r") as fd: FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/pki/pki-tomcat/conf/ca/CS.cfg'

[ { "source": "ipahealthcheck.dogtag.ca", "check": "DogtagCertsConfigCheck", "result": "CRITICAL", "uuid": "cadd447b-0589-4ab4-80e9-a20d173f20d0", "when": "20240318134439Z", "duration": "0.216725", "kw": { "exception": "[Errno 2] No such file or directory: '/var/lib/pki/pki-tomcat/conf/ca/CS.cfg'", "traceback": "Traceback (most recent call last):\n File \"/usr/lib/python3.6/site-packages/ipahealthcheck/core/core.py\", line 56, in run_plugin\n for result in plugin.check():\n File \"/usr/lib/python3.6/site-packages/ipahealthcheck/core/plugin.py\", line 18, in wrapper\n for result in f(*args, **kwds):\n File \"/usr/lib/python3.6/site-packages/ipahealthcheck/dogtag/ca.py\", line 61, in check\n blobs[nickname], '=')\n File \"/usr/lib/python3.6/site-packages/ipapython/directivesetter.py\", line 186, in get_directive\n with open(filename, \"r\") as fd:\nFileNotFoundError: [Errno 2] No such file or directory: '/var/lib/pki/pki-tomcat/conf/ca/CS.cfg'\n" } } ]