Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-5649

S3 Gateway API return 500 Internal Server Error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Blocker
    • Resolution: Unresolved
    • 1.1.0
    • None
    • S3
    • None
    • Virtual Machine Centos 7 + Hadoop 3.3.1

      Docker + Hadoop 3.2.2 (Official Image)

    Description

      I'm trying to use S3 API to create bucket with versioning enabled, but API return 500 error.

      This is my command curl :

      ```

      curl -i -X POST \
      -H "x-ozone-user: ozone" \
      -H "x-ozone-version: v1" \
      -H "Date: Fri, 20 Aug 2021 04:23:30 GMT" \
      -H "Authorization: OZONE" \
      -H "x-ozone-bucket-versioning: enabled" \
      http://localhost:9878/s3v/buckettest

      ```

      then result from server :

      HTTP ERROR 500 Request failed.

      URI: /testbucket
      STATUS: 500
      MESSAGE: Request failed.
      SERVLET: jaxrs

       

      and this message from log :

      ```

       

      2021-08-20 14:11:30,183 WARN org.eclipse.jetty.server.HttpChannelState: unhandled due to prior sendError
      javax.servlet.ServletException: javax.servlet.ServletException: A MultiException has 1 exceptions. They are:
      1. javax.enterprise.inject.CreationException

      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:162)
      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.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.lang.Thread.run(Thread.java:748)
      Caused by: javax.servlet.ServletException: A MultiException has 1 exceptions. They are:
      1. javax.enterprise.inject.CreationException

      at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:432)
      at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370)
      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)
      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)
      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)
      at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1452)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
      at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626)
      at org.apache.hadoop.ozone.s3.RootPageDisplayFilter.doFilter(RootPageDisplayFilter.java:53)
      at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
      at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
      at org.apache.hadoop.hdds.server.http.HttpServer2$QuotingInputFilter.doFilter(HttpServer2.java:1667)
      at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
      at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
      at org.apache.hadoop.hdds.server.http.NoCacheFilter.doFilter(NoCacheFilter.java:48)
      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.handle(ScopedHandler.java:143)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
      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.session.SessionHandler.doScope(SessionHandler.java:1594)
      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.HandlerCollection.handle(HandlerCollection.java:146)
      ... 17 more
      Caused by: A MultiException has 1 exceptions. They are:
      1. javax.enterprise.inject.CreationException

      at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:494)
      at org.jvnet.hk2.internal.PerLookupContext.findOrCreate(PerLookupContext.java:70)
      at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2126)
      at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:777)
      at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:740)
      at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:710)
      at org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.getInstance(AbstractHk2InjectionManager.java:184)
      at org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.getInstance(ImmediateHk2InjectionManager.java:54)
      at org.glassfish.jersey.internal.inject.Injections.getOrCreate(Injections.java:129)
      at org.glassfish.jersey.server.model.MethodHandler$ClassBasedMethodHandler.getInstance(MethodHandler.java:284)
      at org.glassfish.jersey.server.internal.routing.PushMethodHandlerRouter.apply(PushMethodHandlerRouter.java:75)
      at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:110)
      at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:113)
      at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:113)
      at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:113)
      at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:93)
      at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:62)
      at org.glassfish.jersey.process.internal.Stages.process(Stages.java:197)
      at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:269)
      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)
      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
      at org.glassfish.jersey.internal.Errors.process(Errors.java:268)
      at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)
      at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)
      at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)
      at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:416)
      ... 48 more
      Caused by: javax.enterprise.inject.CreationException
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at java.lang.Class.newInstance(Class.java:442)
      at org.jboss.weld.security.NewInstanceAction.run(NewInstanceAction.java:33)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:40)
      at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:78)
      at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:96)
      at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:78)
      at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:100)
      at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:161)
      at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:180)
      at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:70)
      at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
      at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
      at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:785)
      at org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:885)
      at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:92)
      at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:358)
      at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:369)
      at org.jboss.weld.injection.producer.ResourceInjector$1.proceed(ResourceInjector.java:70)
      at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)
      at org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:72)
      at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:117)
      at org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider$InjectionManagerInjectedCdiTarget.inject(CdiComponentProvider.java:873)
      at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:159)
      at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:70)
      at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
      at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
      at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:785)
      at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:808)
      at org.jboss.weld.util.ForwardingBeanManager.getReference(ForwardingBeanManager.java:61)
      at org.jboss.weld.bean.builtin.BeanManagerProxy.getReference(BeanManagerProxy.java:85)
      at org.glassfish.jersey.ext.cdi1x.internal.CdiUtil.getBeanReference(CdiUtil.java:151)
      at org.glassfish.jersey.ext.cdi1x.internal.AbstractCdiBeanSupplier$1.getInstance(AbstractCdiBeanSupplier.java:93)
      at org.glassfish.jersey.ext.cdi1x.internal.AbstractCdiBeanSupplier._provide(AbstractCdiBeanSupplier.java:127)
      at org.glassfish.jersey.ext.cdi1x.internal.RequestScopedCdiBeanSupplier.get(RequestScopedCdiBeanSupplier.java:70)
      at org.glassfish.jersey.inject.hk2.InstanceSupplierFactoryBridge.provide(InstanceSupplierFactoryBridge.java:77)
      at org.jvnet.hk2.internal.FactoryCreator.create(FactoryCreator.java:153)
      at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487)
      ... 75 more
      Caused by: org.apache.hadoop.ozone.s3.exception.OS3Exception
      at org.apache.hadoop.ozone.s3.exception.S3ErrorTable.<clinit>(S3ErrorTable.java:65)
      at org.apache.hadoop.ozone.s3.header.AuthorizationHeaderV4.parseAuthHeader(AuthorizationHeaderV4.java:86)
      at org.apache.hadoop.ozone.s3.header.AuthorizationHeaderV4.<init>(AuthorizationHeaderV4.java:70)
      at org.apache.hadoop.ozone.s3.AWSSignatureProcessor.init(AWSSignatureProcessor.java:123)
      at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:97)
      at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:80)
      at org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:122)
      at org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider$InjectionManagerInjectedCdiTarget.postConstruct(CdiComponentProvider.java:887)
      at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:162)
      at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
      at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
      at org.jboss.weld.bean.ContextualInstanceStrategy$CachingContextualInstanceStrategy.get(ContextualInstanceStrategy.java:177)
      at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
      at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)
      at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:125)
      at org.apache.hadoop.ozone.s3.AWSSignatureProcessor$Proxy$_$$_WeldClientProxy.getException(Unknown Source)
      at org.apache.hadoop.ozone.s3.OzoneClientProducer.getClient(OzoneClientProducer.java:86)
      at org.apache.hadoop.ozone.s3.OzoneClientProducer.createClient(OzoneClientProducer.java:72)
      at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:88)
      ... 107 more

      ```

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              arifpratama398 Arif Naga Pratama
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: