Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0.0
Description
Currently Recon implements a /volumes endpoint to fetch the volume information.
However if we access Recon volumes or call this API as soon as Recon starts up, we get a null pointer exception as at this point the tables have not completed initializing.
We should add a handler for this scenario.
Reference logs:
2024-08-21 11:12:00 2024-08-21 05:42:00,356 [qtp720242436-64] WARN server.HttpChannel: /api/v1/volumes 2024-08-21 11:12:00 javax.servlet.ServletException: javax.servlet.ServletException: java.lang.NullPointerException 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:162) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) 2024-08-21 11:12:00 at org.eclipse.jetty.server.Server.handle(Server.java:516) 2024-08-21 11:12:00 at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) 2024-08-21 11:12:00 at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) 2024-08-21 11:12:00 at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) 2024-08-21 11:12:00 at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) 2024-08-21 11:12:00 at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) 2024-08-21 11:12:00 at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) 2024-08-21 11:12:00 at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) 2024-08-21 11:12:00 at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) 2024-08-21 11:12:00 at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) 2024-08-21 11:12:00 at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) 2024-08-21 11:12:00 at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) 2024-08-21 11:12:00 at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) 2024-08-21 11:12:00 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) 2024-08-21 11:12:00 at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) 2024-08-21 11:12:00 at java.base/java.lang.Thread.run(Thread.java:829) 2024-08-21 11:12:00 Caused by: javax.servlet.ServletException: java.lang.NullPointerException 2024-08-21 11:12:00 at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:410) 2024-08-21 11:12:00 at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346) 2024-08-21 11:12:00 at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:359) 2024-08-21 11:12:00 at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:312) 2024-08-21 11:12:00 at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205) 2024-08-21 11:12:00 at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:293) 2024-08-21 11:12:00 at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:283) 2024-08-21 11:12:00 at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:184) 2024-08-21 11:12:00 at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:89) 2024-08-21 11:12:00 at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:121) 2024-08-21 11:12:00 at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:133) 2024-08-21 11:12:00 at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201) 2024-08-21 11:12:00 at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626) 2024-08-21 11:12:00 at org.apache.hadoop.hdds.server.http.HttpServer2$QuotingInputFilter.doFilter(HttpServer2.java:1664) 2024-08-21 11:12:00 at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) 2024-08-21 11:12:00 at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626) 2024-08-21 11:12:00 at org.apache.hadoop.hdds.server.http.NoCacheFilter.doFilter(NoCacheFilter.java:48) 2024-08-21 11:12:00 at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) 2024-08-21 11:12:00 at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626) 2024-08-21 11:12:00 at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) 2024-08-21 11:12:00 at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) 2024-08-21 11:12:00 at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) 2024-08-21 11:12:00 at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) 2024-08-21 11:12:00 at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) 2024-08-21 11:12:00 ... 17 more 2024-08-21 11:12:00 Caused by: java.lang.NullPointerException 2024-08-21 11:12:00 at org.apache.hadoop.ozone.recon.recovery.ReconOmMetadataManagerImpl.listVolumes(ReconOmMetadataManagerImpl.java:173) 2024-08-21 11:12:00 at org.apache.hadoop.ozone.recon.api.VolumeEndpoint.getVolumes(VolumeEndpoint.java:66) 2024-08-21 11:12:00 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2024-08-21 11:12:00 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 2024-08-21 11:12:00 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 2024-08-21 11:12:00 at java.base/java.lang.reflect.Method.invoke(Method.java:566) 2024-08-21 11:12:00 at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52) 2024-08-21 11:12:00 at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:146) 2024-08-21 11:12:00 at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:189) 2024-08-21 11:12:00 at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176) 2024-08-21 11:12:00 at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:93) 2024-08-21 11:12:00 at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:478) 2024-08-21 11:12:00 at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:400) 2024-08-21 11:12:00 at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81) 2024-08-21 11:12:00 at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:256) 2024-08-21 11:12:00 at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248) 2024-08-21 11:12:00 at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244) 2024-08-21 11:12:00 at org.glassfish.jersey.internal.Errors.process(Errors.java:292) 2024-08-21 11:12:00 at org.glassfish.jersey.internal.Errors.process(Errors.java:274) 2024-08-21 11:12:00 at org.glassfish.jersey.internal.Errors.process(Errors.java:244) 2024-08-21 11:12:00 at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265) 2024-08-21 11:12:00 at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:235) 2024-08-21 11:12:00 at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684) 2024-08-21 11:12:00 at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394) 2024-08-21 11:12:00 ... 50 more 2024-08-21 11:12:00 2024-08-21 05:42:00,356 [qtp720242436-64] WARN server.HttpChannelState: unhandled due to prior sendError 2024-08-21 11:12:00 javax.servlet.ServletException: javax.servlet.ServletException: java.lang.NullPointerException 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:162) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) 2024-08-21 11:12:00 at org.eclipse.jetty.server.Server.handle(Server.java:516) 2024-08-21 11:12:00 at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) 2024-08-21 11:12:00 at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) 2024-08-21 11:12:00 at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) 2024-08-21 11:12:00 at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) 2024-08-21 11:12:00 at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) 2024-08-21 11:12:00 at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) 2024-08-21 11:12:00 at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) 2024-08-21 11:12:00 at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) 2024-08-21 11:12:00 at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) 2024-08-21 11:12:00 at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) 2024-08-21 11:12:00 at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) 2024-08-21 11:12:00 at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) 2024-08-21 11:12:00 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) 2024-08-21 11:12:00 at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) 2024-08-21 11:12:00 at java.base/java.lang.Thread.run(Thread.java:829) 2024-08-21 11:12:00 Caused by: javax.servlet.ServletException: java.lang.NullPointerException 2024-08-21 11:12:00 at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:410) 2024-08-21 11:12:00 at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346) 2024-08-21 11:12:00 at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:359) 2024-08-21 11:12:00 at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:312) 2024-08-21 11:12:00 at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205) 2024-08-21 11:12:00 at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:293) 2024-08-21 11:12:00 at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:283) 2024-08-21 11:12:00 at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:184) 2024-08-21 11:12:00 at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:89) 2024-08-21 11:12:00 at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:121) 2024-08-21 11:12:00 at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:133) 2024-08-21 11:12:00 at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201) 2024-08-21 11:12:00 at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626) 2024-08-21 11:12:00 at org.apache.hadoop.hdds.server.http.HttpServer2$QuotingInputFilter.doFilter(HttpServer2.java:1664) 2024-08-21 11:12:00 at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) 2024-08-21 11:12:00 at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626) 2024-08-21 11:12:00 at org.apache.hadoop.hdds.server.http.NoCacheFilter.doFilter(NoCacheFilter.java:48) 2024-08-21 11:12:00 at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) 2024-08-21 11:12:00 at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626) 2024-08-21 11:12:00 at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) 2024-08-21 11:12:00 at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) 2024-08-21 11:12:00 at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) 2024-08-21 11:12:00 at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) 2024-08-21 11:12:00 at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) 2024-08-21 11:12:00 at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) 2024-08-21 11:12:00 ... 17 more 2024-08-21 11:12:00 Caused by: java.lang.NullPointerException 2024-08-21 11:12:00 at org.apache.hadoop.ozone.recon.recovery.ReconOmMetadataManagerImpl.listVolumes(ReconOmMetadataManagerImpl.java:173) 2024-08-21 11:12:00 at org.apache.hadoop.ozone.recon.api.VolumeEndpoint.getVolumes(VolumeEndpoint.java:66) 2024-08-21 11:12:00 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2024-08-21 11:12:00 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 2024-08-21 11:12:00 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 2024-08-21 11:12:00 at java.base/java.lang.reflect.Method.invoke(Method.java:566) 2024-08-21 11:12:00 at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52) 2024-08-21 11:12:00 at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:146) 2024-08-21 11:12:00 at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:189) 2024-08-21 11:12:00 at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176)