This bug is raised so as to improve failures while selftest is happened for subsystems so that cli can handle it gracefully.
If a selftestID doesn't exist, so still it gives the status.Ideally it should exit with not a valid id.
[root@pki1 test_dir]# pki -p 25080 -d /opt/rhqa_pki/certdb/ -c Secret123 -n "TPS_AdminV" tps-selftest-show testing ------------------ SelfTest "testing" ------------------ SelfTest ID: testing Enabled at startup: false Enabled on demand: false
In case self test is failed to run,It gives NPE in debug logs.
Steps to reproduce:
#selftests.container.instance.OCSPPresence=com.netscape.cms.selftests.ocsp.OCSPPresence #selftests.container.order.onDemand=OCSPPresence:critical, SystemCertsVerification:critical, OCSPValidity:critical #selftests.container.order.startup=OCSPPresence:critical, SystemCertsVerification:critical #selftests.plugin.OCSPPresence.OcspSubId=ocsp
2.Make sure correct failure message is printed with correct exception. 3.pki -p 22080 -d /opt/rhqa_pki/certdb/ -c Secret123 -n "OCSP_AdminR" ocsp-selftest-run PKIException: null
<debug logs> [06/Jun/2017:11:08:15][http-bio-22443-exec-9]: MessageFormatInterceptor: SelfTestResource.runSelfTests() [06/Jun/2017:11:08:15][http-bio-22443-exec-9]: MessageFormatInterceptor: content-type: null [06/Jun/2017:11:08:15][http-bio-22443-exec-9]: MessageFormatInterceptor: accept: [application/xml] [06/Jun/2017:11:08:15][http-bio-22443-exec-9]: MessageFormatInterceptor: response format: application/xml [06/Jun/2017:11:08:15][http-bio-22443-exec-9]: SelfTestService.runSelfTests() java.lang.NullPointerException at org.dogtagpki.server.rest.SelfTestService.runSelfTests(SelfTestService.java:188) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) </debug>
Version-Release number of selected component (if applicable):
$ rpm -qa pki-ca pki-ca-10.4.1-8.el7.noarch
How reproducible:
Steps to Reproduce: 1. 2. 3.
Actual results:
Expected results:
Additional info:
Complete failure logs:
[06/Jun/2017:11:08:15][http-bio-22443-exec-9]: MessageFormatInterceptor: SelfTestResource.runSelfTests() [06/Jun/2017:11:08:15][http-bio-22443-exec-9]: MessageFormatInterceptor: content-type: null [06/Jun/2017:11:08:15][http-bio-22443-exec-9]: MessageFormatInterceptor: accept: [application/xml] [06/Jun/2017:11:08:15][http-bio-22443-exec-9]: MessageFormatInterceptor: response format: application/xml [06/Jun/2017:11:08:15][http-bio-22443-exec-9]: SelfTestService.runSelfTests() java.lang.NullPointerException at org.dogtagpki.server.rest.SelfTestService.runSelfTests(SelfTestService.java:188) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:280) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:234) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:221) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:288) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:285) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:549) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:320) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:175) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:297) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:191) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:187) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:186) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:288) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:285) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:549) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:320) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:260) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:191) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:187) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:615) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) [06/Jun/2017:11:08:15][http-bio-22443-exec-9]: SignedAuditEventFactory: create() message created for eventType=ACCESS_SESSION_TERMINATED
https://bugzilla.redhat.com/show_bug.cgi?id=1459240
Metadata Update from @cipherboy: - Custom field component adjusted to None - Custom field feature adjusted to None - Custom field origin adjusted to None - Custom field proposedmilestone adjusted to None - Custom field proposedpriority adjusted to None - Custom field reviewer adjusted to None - Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1459240 - Custom field type adjusted to None - Custom field version adjusted to None
Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.
This issue has been cloned to GitHub and is available here: https://github.com/dogtagpki/pki/issues/3272
If you want to receive further updates on the issue, please navigate to the GitHub issue and click on Subscribe button.
Subscribe
Thank you for understanding, and we apologize for any inconvenience.
Metadata Update from @dmoluguw: - Issue close_status updated to: migrated - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.