Bug 1302134
| Summary: | Too generic selftest error messages | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Matthew Harmsen <mharmsen> |
| Component: | pki-core | Assignee: | Endi Sukma Dewata <edewata> |
| Status: | CLOSED ERRATA | QA Contact: | Asha Akkiangady <aakkiang> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.3 | CC: | arubin, edewata, gkapoor |
| Target Milestone: | rc | ||
| Target Release: | 7.3 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | pki-core-10.3.1-1.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-11-04 05:22:31 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions Hello, Could you please write some test steps so as to get desired result. In which all scenario's this behavior can be observed. Thanks Geetika Geetika,
Here's a way to verify the fix:
1. Install CA.
2. Change something in selftest configuration in CS.cfg that will break the selftest, for example an invalid class name:
selftests.container.logger.class=com.netscape.cms.logging.RollingLogFileX
3. Restart Tomcat. The CA will fail to start due to selftest failure.
4. Check the debug log, it should now show the exception:
Caused by: java.lang.ClassNotFoundException: com.netscape.cms.logging.RollingLogFileX
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.netscape.cmscore.selftests.SelfTestSubsystem.init(SelfTestSubsystem.java:1312)
...
Thanks Endi for providing verification steps.
Build: pki-tps-10.3.3-9.el7pki.x86_64
Test Case 1: Provide an invalid class name and see if self test fails
<debug log>
Caused by: java.lang.ClassNotFoundException: com.netscape.cms.logging.RollingLogFileXXXXX
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1858)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.netscape.cmscore.selftests.SelfTestSubsystem.init(SelfTestSubsystem.java:1312)
... 38 more
</debug logs>
Test Case 2: Check self test status in "transactions" logs:
0.localhost-startStop-1 - [14/Sep/2016:18:50:23 IST] [20] [1] SelfTestSubsystem: Initializing self test plugins:
0.localhost-startStop-1 - [14/Sep/2016:18:50:23 IST] [20] [1] SelfTestSubsystem: the self test property name selftests.container.logger.class with a value of com.netscape.cms.logging.RollingLogFileXXXXX threw an Exception
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-2396.html |
If an error happens in SelfTestSubsystem initialization, the code will generate a generic error message without describing what's actually considered "invalid". {{{ [22/Mar/2015:06:45:10][main]: CMS:Caught EBaseException The self test plugin named selftests.container.logger.class contains a value com.netscape.cms.logging.RollingLogFile which is invalid. at com.netscape.cmscore.selftests.SelfTestSubsystem.init(SelfTestSubsystem.java:1422) at com.netscape.cmscore.apps.CMSEngine.initSubsystem(CMSEngine.java:866) ... }}} Ideally the code should describe the error, throw the original exception, or chain the exception.