Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Automation API 'io.dropwizard.jersey.errors.LoggingExceptionMapper: Error handling a request' #987

Open
Uxito-Ada opened this issue Dec 9, 2021 · 1 comment

Comments

@Uxito-Ada
Copy link

Uxito-Ada commented Dec 9, 2021

Hi guys, sorry to bother. I do really need a help when I send requests.

Using curl or python requests lib to send GET or POST to keywhiz server, I encounter such an error as below. It seems that the server cannot get the getXfccConfig.

For instance, the client runs below command like the example:

curl --cert-type P12 --cert ./server/src/test/resources/clients/client.p12:ponies -H "Content-Type:application/json" -d @request.json https://localhost:4444/automation/secrets/

The server error log is:

127.0.0.1 - - [09/Dec/2021:13:59:55 +0000] "POST /automation/secrets/ HTTP/1.1" 500 110 "-" "curl/7.58.0" 17 ERROR [2021-12-09 14:46:18,253] io.dropwizard.jersey.errors.LoggingExceptionMapper: Error handling a request: 7a89e0a3c76a3dc9 ! java.lang.NullPointerException: null ! at keywhiz.service.providers.ClientAuthFactory.getXfccConfigForPort(ClientAuthFactory.java:178) ! at keywhiz.service.providers.ClientAuthFactory.doProvide(ClientAuthFactory.java:136) ! at keywhiz.service.providers.ClientAuthFactory.lambda$provide$0(ClientAuthFactory.java:120) ! at keywhiz.Tracing.trace(Tracing.java:24) ! at keywhiz.service.providers.ClientAuthFactory.provide(ClientAuthFactory.java:119) ! at keywhiz.service.providers.AutomationClientAuthFactory.provide(AutomationClientAuthFactory.java:56) ! at keywhiz.service.providers.AuthResolver$AuthValueFactoryProvider$2.provide(AuthResolver.java:94) ! at keywhiz.service.providers.AuthResolver$AuthValueFactoryProvider$2.provide(AuthResolver.java:89) ! at org.glassfish.jersey.server.spi.internal.ParamValueFactoryWithSource.provide(ParamValueFactoryWithSource.java:71) ! at org.glassfish.jersey.server.spi.internal.ParameterValueHelper.getParameterValues(ParameterValueHelper.java:90) ! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$AbstractMethodParamInvoker.getParamValues(JavaResourceMethodDispatcherProvider.java:127) ! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205) ! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) ! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) ! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) ! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) ! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) ! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) ! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) ! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) ! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) ! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) ! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) ! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) ! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) ! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) ! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) ! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) ! at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791) ! at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626) ! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:35) ! at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) ! at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) ! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:45) ! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:39) ! at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) ! at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) ! at keywhiz.service.filters.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:68) ! at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) ! at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) ! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548) ! at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435) ! at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) ! at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350) ! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:313) ! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:52) ! at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:716) ! at io.dropwizard.jetty.BiDiGzipHandler.handle(BiDiGzipHandler.java:67) ! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:54) ! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:179) ! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ! at org.eclipse.jetty.server.Server.handle(Server.java:516) ! at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388) ! at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633) ! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380) ! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273) ! at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ! at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ! at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:540) ! at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:395) ! at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161) ! at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ! at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) ! at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) ! at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) ! at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) ! at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) ! at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375) ! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773) ! at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905) ! at java.base/java.lang.Thread.run(Thread.java:834)

@xusongss
Copy link

I encountered the same problem, did you solve it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants