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 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:
Presence
SystemCertsVerification:critical, OCSPValidity:critical
SystemCertsVerification:critical
<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(SelfTestServi ce.java:188) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
</debug>
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(SelfTestServi ce.java:188) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce ssorImpl.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(Resourc eMethodInvoker.java:280) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodI nvoker.java:234) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodI nvoker.java:221) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDisp atcher.java:356) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDisp atcher.java:179) at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher .service(ServletContainerDispatcher.java:220) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.serv ice(HttpServletDispatcher.java:56) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.serv ice(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(DelegatingMethodAcce ssorImpl.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(App licationFilterChain.java:297) at org.apache.catalina.core.ApplicationFilterChain.access$000(Applicati onFilterChain.java:55) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFil terChain.java:191) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFil terChain.java:187) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Application FilterChain.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(DelegatingMethodAcce ssorImpl.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(App licationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.access$000(Applicati onFilterChain.java:55) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFil terChain.java:191) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFil terChain.java:187) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Application FilterChain.java:186) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapper Valve.java:218) at org.apache.catalina.core.StandardContextValve.invoke(StandardContext Valve.java:110) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentic atorBase.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(StandardEngineVa lve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHtt p11Processor.java:1087) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process (AbstractProtocol.java:637) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoi nt.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(TaskT hread.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
Metadata Update from @mharmsen: - Custom field component adjusted to General - Custom field feature adjusted to '' - Custom field origin adjusted to Community - Custom field proposedmilestone adjusted to '' - Custom field proposedpriority adjusted to '' - Custom field reviewer adjusted to '' - Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1459240 - Custom field type adjusted to defect - Custom field version adjusted to '' - Issue set to the milestone: 10.5
Per PKI Bug Council of 06/08/2017 - CLI for selftests is not yet supported - 10.5
Metadata Update from @mharmsen: - Issue priority set to: minor - Issue set to the milestone: FUTURE (was: 10.5)
Per 10.5.x/10.6 Triage: FUTURE
alee: usability issue. should not be too hard to fix.
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/2851
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.