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

Multipart upload to encrypted bucket fails with ClassCastException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.0
    • 2.0.0, 1.4.1
    • None

    Description

      S3 multipart upload failed with ClassCastException:

      2024-04-26 03:51:45,567 WARN [qtp664091267-24]-org.eclipse.jetty.server.HttpChannel: /oqexlwcb/file1714103489
      javax.servlet.ServletException: javax.servlet.ServletException: java.lang.ClassCastException: class org.apache.hadoop.crypto.CryptoOutputStream cannot be cast to class org.apache.hadoop.ozone.client.io.KeyMetadataAware (org.apache.hadoop.crypto.CryptoOutputStream and org.apache.hadoop.ozone.
      client.io.KeyMetadataAware are in unnamed module of loader 'app')
              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:487)
              at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
              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:555)
              at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:410)
              at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:164)
              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:338)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
              at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
              at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: javax.servlet.ServletException: java.lang.ClassCastException: class org.apache.hadoop.crypto.CryptoOutputStream cannot be cast to class org.apache.hadoop.ozone.client.io.KeyMetadataAware (org.apache.hadoop.crypto.CryptoOutputStream and org.apache.hadoop.ozone.client.io.KeyMetadata
      Aware are in unnamed module of loader 'app')
              at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:410)
              at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346)
              at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:359)
              at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:312)
              at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205)
              at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1459)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
              at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1656)
              at org.apache.hadoop.ozone.s3.RootPageDisplayFilter.doFilter(RootPageDisplayFilter.java:53)
              at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
              at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)
              at org.apache.hadoop.ozone.s3.EmptyContentTypeFilter.doFilter(EmptyContentTypeFilter.java:76)
              at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
              at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)
              at org.apache.hadoop.hdds.server.http.HttpServer2$QuotingInputFilter.doFilter(HttpServer2.java:1665)
              at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
              at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)
              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:1626)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
              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:1440)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)
              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:1355)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
              at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
              ... 21 more
      Caused by: java.lang.ClassCastException: class org.apache.hadoop.crypto.CryptoOutputStream cannot be cast to class org.apache.hadoop.ozone.client.io.KeyMetadataAware (org.apache.hadoop.crypto.CryptoOutputStream and org.apache.hadoop.ozone.client.io.KeyMetadataAware are in unnamed module of l
      oader 'app')
              at org.apache.hadoop.ozone.s3.endpoint.ObjectEndpoint.createMultipartKey(ObjectEndpoint.java:1003)
              at org.apache.hadoop.ozone.s3.endpoint.ObjectEndpoint.put(ObjectEndpoint.java:239)
              at jdk.internal.reflect.GeneratedMethodAccessor182.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:566)
              at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)
              at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:146)
              at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:189)
              at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176)
              at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:93)
              at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:478)
              at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:400)
              at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81)
              at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:256)
              at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
              at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
              at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
              at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
              at org.glassfish.jersey.internal.Errors.process(Errors.java:244)
              at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)
              at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:235)
              at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684)
              at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394)
              ... 55 more
      2024-04-26 03:51:44,151 WARN [qtp664091267-21]-org.eclipse.jetty.server.HttpChannelState: unhandled due to prior sendError
      javax.servlet.ServletException: javax.servlet.ServletException: java.lang.ClassCastException: class org.apache.hadoop.crypto.CryptoOutputStream cannot be cast to class org.apache.hadoop.ozone.client.io.KeyMetadataAware (org.apache.hadoop.crypto.CryptoOutputStream and org.apache.hadoop.ozone.
      client.io.KeyMetadataAware are in unnamed module of loader 'app')
              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:487)
              at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
              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:555)
              at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:410)
              at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:164)
              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:338)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
              at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
              at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: javax.servlet.ServletException: java.lang.ClassCastException: class org.apache.hadoop.crypto.CryptoOutputStream cannot be cast to class org.apache.hadoop.ozone.client.io.KeyMetadataAware (org.apache.hadoop.crypto.CryptoOutputStream and org.apache.hadoop.ozone.client.io.KeyMetadataAware are in unnamed module of loader 'app')
              at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:410)
              at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346)
              at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:359)
              at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:312)
              at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205)
              at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1459)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
              at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1656)
              at org.apache.hadoop.ozone.s3.RootPageDisplayFilter.doFilter(RootPageDisplayFilter.java:53)
              at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
              at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)
              at org.apache.hadoop.ozone.s3.EmptyContentTypeFilter.doFilter(EmptyContentTypeFilter.java:76)
              at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
              at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)
              at org.apache.hadoop.hdds.server.http.HttpServer2$QuotingInputFilter.doFilter(HttpServer2.java:1665)
              at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
              at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)
              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:1626)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
              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:1440)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)
              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:1355)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
              at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
              ... 21 more
      Caused by: java.lang.ClassCastException: class org.apache.hadoop.crypto.CryptoOutputStream cannot be cast to class org.apache.hadoop.ozone.client.io.KeyMetadataAware (org.apache.hadoop.crypto.CryptoOutputStream and org.apache.hadoop.ozone.client.io.KeyMetadataAware are in unnamed module of loader 'app')
              at org.apache.hadoop.ozone.s3.endpoint.ObjectEndpoint.createMultipartKey(ObjectEndpoint.java:1003)
              at org.apache.hadoop.ozone.s3.endpoint.ObjectEndpoint.put(ObjectEndpoint.java:239)
              at jdk.internal.reflect.GeneratedMethodAccessor182.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:566)
              at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)
              at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:146)
              at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:189)
              at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176)
              at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:93)
              at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:478)
              at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:400)
              at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81)
              at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:256)
              at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
              at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
              at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
              at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
              at org.glassfish.jersey.internal.Errors.process(Errors.java:244)
              at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)
              at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:235)
              at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684)
              at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394)
              ... 55 more

      Related to ETag PR: https://github.com/apache/ozone/pull/5162

      Attachments

        Issue Links

          Activity

            People

              adoroszlai Attila Doroszlai
              hemantk Hemant Kumar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: