Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-10107

Nexus 3 ignores Content Type of proxied repositories

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Automatically Closed
    • Affects Version/s: 3.0.0
    • Fix Version/s: None
    • Component/s: Proxy Repository
    • Labels:
      None
    • Environment:
      Red Hat Enterprise Linux Server release 6.6 (Santiago)
      Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
      Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)

      Description

      We are getting the following exception trying to create Maven2 proxy repositories that point to our Nexus 2 hosted repositories. We've confirmed that the Content Type header is set to application/x-gzip for the file /nexus/content/repositories/thirdparty/.index/nexus-maven-repository-index.gz, so I'm not sure why Nexus is is trying to detect the Content Type and not just using the HTTP header.

      org.sonatype.nexus.repository.InvalidContentException: Detected content type [text/plain], but expected [application/x-gzip, application/gzip, application/x-tgz, application/gzip-compressed, application/gzipped, application/x-gunzip, application/x-gzip-compressed, gzip/document]: .index/nexus-maven-repository-index.gz
      at org.sonatype.nexus.repository.storage.DefaultContentValidator.determineContentType(DefaultContentValidator.java:95) [na:na]
      at org.sonatype.nexus.repository.maven.internal.MavenContentValidator.determineContentType(MavenContentValidator.java:79) [na:na]
      at org.sonatype.nexus.repository.storage.StorageTxImpl.determineContentType(StorageTxImpl.java:717) [na:na]
      at org.sonatype.nexus.repository.storage.StorageTxImpl.createBlob(StorageTxImpl.java:544) [na:na]
      at sun.reflect.GeneratedMethodAccessor260.invoke(Unknown Source) [na:na]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [na:1.8.0_77]
      at java.lang.reflect.Method.invoke(Method.java:498) [na:1.8.0_77]
      at org.sonatype.nexus.common.stateguard.SimpleMethodInvocation.proceed(SimpleMethodInvocation.java:53) [na:na]
      at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39) [na:na]
      at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:270) [na:na]
      at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53) [na:na]
      at org.sonatype.nexus.common.stateguard.StateGuardAspect$1.invoke(StateGuardAspect.java:63) [na:na]
      at com.sun.proxy.$Proxy162.createBlob(Unknown Source) [na:na]
      at org.sonatype.nexus.repository.maven.internal.MavenFacetImpl.doPut(MavenFacetImpl.java:224) [na:na]
      at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:54) [org.sonatype.nexus.transaction:3.0.0.03]
      at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:53) [org.sonatype.nexus.transaction:3.0.0.03]
      at org.sonatype.nexus.repository.maven.internal.MavenFacetImpl.put(MavenFacetImpl.java:200) [na:na]
      at org.sonatype.nexus.repository.maven.internal.proxy.MavenProxyFacet.store(MavenProxyFacet.java:90) [na:na]
      at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.get(ProxyFacetSupport.java:166) [na:na]
      at org.sonatype.nexus.repository.maven.internal.MavenIndexPublisher.prefetch(MavenIndexPublisher.java:244) [na:na]
      at org.sonatype.nexus.repository.maven.internal.MavenIndexPublisher.prefetchIndexFiles(MavenIndexPublisher.java:151) [na:na]
      at org.sonatype.nexus.repository.maven.internal.proxy.MavenProxyIndexFacet.publishIndex(MavenProxyIndexFacet.java:80) [na:na]
      at org.sonatype.nexus.repository.maven.tasks.PublishMavenIndexTask.execute(PublishMavenIndexTask.java:39) [na:na]
      at org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:56) [na:na]
      at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:89) [org.sonatype.nexus.scheduling:3.0.0.03]
      at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:141) [org.sonatype.nexus.quartz:3.0.0.03]
      at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:103) [org.sonatype.nexus.quartz:3.0.0.03]
      at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [org.quartz-scheduler.quartz:2.2.2]
      at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40) [org.sonatype.nexus.thread:3.0.0.03]
      at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [org.apache.shiro.core:1.2.4]
      at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [org.apache.shiro.core:1.2.4]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_77]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_77]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_77]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_77]
      at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]
      2016-04-18 20:49:20,319-0500 WARN [quartz-2-thread-10] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskJob - Task 4b273a19-b582-4659-bc7c-f0c044b62492 : 'Publish Indexes' [repository.maven.publish-dotindex] execution failure
      org.sonatype.goodies.common.MultipleFailures$MultipleFailuresException: Failed to run task 'Publish Maven indexes of *'; 2 failures
      at org.sonatype.goodies.common.MultipleFailures.maybePropagate(MultipleFailures.java:95) [org.sonatype.goodies.common:2.1.0]
      at org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:64) [na:na]
      at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:89) [org.sonatype.nexus.scheduling:3.0.0.03]
      at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:141) [org.sonatype.nexus.quartz:3.0.0.03]
      at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:103) [org.sonatype.nexus.quartz:3.0.0.03]
      at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [org.quartz-scheduler.quartz:2.2.2]
      at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40) [org.sonatype.nexus.thread:3.0.0.03]
      at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [org.apache.shiro.core:1.2.4]
      at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [org.apache.shiro.core:1.2.4]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_77]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_77]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_77]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_77]
      at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]
      Suppressed: org.sonatype.nexus.repository.InvalidContentException: Detected content type [text/plain], but expected [application/x-gzip, application/gzip, application/x-tgz, application/gzip-compressed, application/gzipped, application/x-gunzip, application/x-gzip-compressed, gzip/document]: .index/nexus-maven-repository-index.gz
      at org.sonatype.nexus.repository.storage.DefaultContentValidator.determineContentType(DefaultContentValidator.java:95) [na:na]
      at org.sonatype.nexus.repository.maven.internal.MavenContentValidator.determineContentType(MavenContentValidator.java:79) [na:na]
      at org.sonatype.nexus.repository.storage.StorageTxImpl.determineContentType(StorageTxImpl.java:717) [na:na]
      at org.sonatype.nexus.repository.storage.StorageTxImpl.createBlob(StorageTxImpl.java:544) [na:na]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.8.0_77]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [na:1.8.0_77]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [na:1.8.0_77]
      at java.lang.reflect.Method.invoke(Method.java:498) [na:1.8.0_77]
      at org.sonatype.nexus.common.stateguard.SimpleMethodInvocation.proceed(SimpleMethodInvocation.java:53) [na:na]
      at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39) [na:na]
      at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:270) [na:na]
      at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53) [na:na]
      at org.sonatype.nexus.common.stateguard.StateGuardAspect$1.invoke(StateGuardAspect.java:63) [na:na]
      at com.sun.proxy.$Proxy162.createBlob(Unknown Source) [na:na]
      at org.sonatype.nexus.repository.maven.internal.MavenFacetImpl.doPut(MavenFacetImpl.java:224) [na:na]
      at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:54) [org.sonatype.nexus.transaction:3.0.0.03]
      at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:53) [org.sonatype.nexus.transaction:3.0.0.03]
      at org.sonatype.nexus.repository.maven.internal.MavenFacetImpl.put(MavenFacetImpl.java:200) [na:na]
      at org.sonatype.nexus.repository.maven.internal.proxy.MavenProxyFacet.store(MavenProxyFacet.java:90) [na:na]
      at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.get(ProxyFacetSupport.java:166) [na:na]
      at org.sonatype.nexus.repository.maven.internal.MavenIndexPublisher.prefetch(MavenIndexPublisher.java:244) [na:na]
      at org.sonatype.nexus.repository.maven.internal.MavenIndexPublisher.prefetchIndexFiles(MavenIndexPublisher.java:151) [na:na]
      at org.sonatype.nexus.repository.maven.internal.proxy.MavenProxyIndexFacet.publishIndex(MavenProxyIndexFacet.java:80) [na:na]
      at org.sonatype.nexus.repository.maven.tasks.PublishMavenIndexTask.execute(PublishMavenIndexTask.java:39) [na:na]
      at org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:56) [na:na]
      ... 12 common frames omitted
      Suppressed: org.sonatype.nexus.repository.InvalidContentException: Detected content type [text/plain], but expected [application/x-gzip, application/gzip, application/x-tgz, application/gzip-compressed, application/gzipped, application/x-gunzip, application/x-gzip-compressed, gzip/document]: .index/nexus-maven-repository-index.gz
      at org.sonatype.nexus.repository.storage.DefaultContentValidator.determineContentType(DefaultContentValidator.java:95) [na:na]
      at org.sonatype.nexus.repository.maven.internal.MavenContentValidator.determineContentType(MavenContentValidator.java:79) [na:na]
      at org.sonatype.nexus.repository.storage.StorageTxImpl.determineContentType(StorageTxImpl.java:717) [na:na]
      at org.sonatype.nexus.repository.storage.StorageTxImpl.createBlob(StorageTxImpl.java:544) [na:na]
      at sun.reflect.GeneratedMethodAccessor260.invoke(Unknown Source) [na:na]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [na:1.8.0_77]
      at java.lang.reflect.Method.invoke(Method.java:498) [na:1.8.0_77]
      at org.sonatype.nexus.common.stateguard.SimpleMethodInvocation.proceed(SimpleMethodInvocation.java:53) [na:na]
      at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39) [na:na]
      at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:270) [na:na]
      at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53) [na:na]
      at org.sonatype.nexus.common.stateguard.StateGuardAspect$1.invoke(StateGuardAspect.java:63) [na:na]
      at com.sun.proxy.$Proxy162.createBlob(Unknown Source) [na:na]
      at org.sonatype.nexus.repository.maven.internal.MavenFacetImpl.doPut(MavenFacetImpl.java:224) [na:na]
      at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:54) [org.sonatype.nexus.transaction:3.0.0.03]
      at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:53) [org.sonatype.nexus.transaction:3.0.0.03]
      at org.sonatype.nexus.repository.maven.internal.MavenFacetImpl.put(MavenFacetImpl.java:200) [na:na]
      at org.sonatype.nexus.repository.maven.internal.proxy.MavenProxyFacet.store(MavenProxyFacet.java:90) [na:na]
      at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.get(ProxyFacetSupport.java:166) [na:na]
      at org.sonatype.nexus.repository.maven.internal.MavenIndexPublisher.prefetch(MavenIndexPublisher.java:244) [na:na]
      at org.sonatype.nexus.repository.maven.internal.MavenIndexPublisher.prefetchIndexFiles(MavenIndexPublisher.java:151) [na:na]
      at org.sonatype.nexus.repository.maven.internal.proxy.MavenProxyIndexFacet.publishIndex(MavenProxyIndexFacet.java:80) [na:na]
      at org.sonatype.nexus.repository.maven.tasks.PublishMavenIndexTask.execute(PublishMavenIndexTask.java:39) [na:na]
      at org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:56) [na:na]
      ... 12 common frames omitted

        Attachments

          Activity

            People

            Assignee:
            plynch Peter Lynch
            Reporter:
            danshome Dan McLaughlin
            Last Updated By:
            Rich Seddon Rich Seddon
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title