org.restlet.resource.ResourceException: The server encountered an unexpected condition which prevented it from fulfilling the request

Sonatype JIRA | Joe Tom | 2 years ago
  1. 0

    The Nexus Book (Yum section http://books.sonatype.com/nexus-book/reference/yum-configuration.html) contains the following snip (19.3.1): {quote} The Nexus yum integration supports versioned views on a repository. The URL http://localhost:8081/nexus/service/local/yum/repos/releases/1.2.3/ exposes a yum repository with all packages with version 1.2.3 in the releases repository. {quote} While reviewing the guide and testguide, I went to the URL http://localhost:8081/nexus/service/local/yum/repos/releases/4.0.0. I received an error 500 on my screen and several errors in my console (see below). While puzzling, I realized that my artifact deployed was version 4 not 4.0.0. On http://localhost:8081/nexus/service/local/yum/repos/releases/4 everything worked. I waffled over whether this should be filed since it has to do somewhat with malformed URL (even with good intention). I believe there's another ticket for NX3 to cleanup 404s, so even if decided NOTABUG, I feel this could benefit from similar treatment. Thus borderline improvement but with all the errors going bug for now. I did not check NX3 at this time because I believe the Yum support we have installed there is not against CMA so is yet to be complete. But presumably the same thing may affect there if we carryover. {quote} jvm 1 | 2015-03-06 15:02:57,546-0500 INFO [pxpool-1-thread-1] admin org.sonatype.nexus.yum.internal.task.GenerateMetadataTask - Scheduled task (GenerateMetadataTask) started :: Generate Yum metadata of repository 'releases' jvm 1 | 2015-03-06 15:02:58,151-0500 ERROR [pxpool-1-thread-1] admin org.sonatype.nexus.yum.internal.task.CommandLineExecutor - Cannot read file: /home/adminuser/Documents/nexustriad/nexus-bundles/assemblies/nexus-pro/target/target/sonatype-work/nexus/storage/releases/.foo/.bar.rpm/to-avoid-an-empty-rpm-list-file/that-would-cause-createrepo-to-scan-the-whole-repo.rpm jvm 1 | Worker 0: File not found: /home/adminuser/Documents/nexustriad/nexus-bundles/assemblies/nexus-pro/target/target/sonatype-work/nexus/storage/releases/.foo/.bar.rpm/to-avoid-an-empty-rpm-list-file/that-would-cause-createrepo-to-scan-the-whole-repo.rpm jvm 1 | Failed to process 1 package(s). jvm 1 | jvm 1 | 2015-03-06 15:02:58,158-0500 WARN [pxpool-1-thread-1] admin org.sonatype.nexus.yum.internal.task.GenerateMetadataTask - Yum metadata generation failed jvm 1 | org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) jvm 1 | at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377) ~[nexus-yum-repository-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160) ~[nexus-yum-repository-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:147) ~[nexus-yum-repository-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.sonatype.nexus.yum.internal.task.CommandLineExecutor.exec(CommandLineExecutor.java:68) ~[nexus-yum-repository-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.sonatype.nexus.yum.internal.task.CommandLineExecutor.exec(CommandLineExecutor.java:43) ~[nexus-yum-repository-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:162) [nexus-yum-repository-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:69) [nexus-yum-repository-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:151) [nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:418) [nexus-scheduler-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44) [nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3] jvm 1 | at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_71] jvm 1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_71] jvm 1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_71] jvm 1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_71] jvm 1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_71] jvm 1 | at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71] jvm 1 | 2015-03-06 15:02:58,173-0500 WARN [pxpool-1-thread-1] admin org.sonatype.nexus.yum.internal.task.GenerateMetadataTask - Scheduled task (GenerateMetadataTask) failed :: Generate Yum metadata of repository 'releases' (started 2015-03-06T15:02:57-05:00, runtime 0:00:00.620) jvm 1 | java.io.IOException: Yum metadata generation failed jvm 1 | at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:166) ~[na:na] jvm 1 | at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:69) ~[na:na] jvm 1 | at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:151) ~[nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:418) [nexus-scheduler-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44) [nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3] jvm 1 | at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_71] jvm 1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_71] jvm 1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_71] jvm 1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_71] jvm 1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_71] jvm 1 | at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71] jvm 1 | Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) jvm 1 | at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377) ~[na:na] jvm 1 | at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160) ~[na:na] jvm 1 | at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:147) ~[na:na] jvm 1 | at org.sonatype.nexus.yum.internal.task.CommandLineExecutor.exec(CommandLineExecutor.java:68) ~[na:na] jvm 1 | at org.sonatype.nexus.yum.internal.task.CommandLineExecutor.exec(CommandLineExecutor.java:43) ~[na:na] jvm 1 | at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:162) ~[na:na] jvm 1 | ... 12 common frames omitted jvm 1 | 2015-03-06 15:02:58,195-0500 WARN [pxpool-1-thread-1] admin org.sonatype.scheduling.DefaultScheduledTask - Exception in call method of scheduled task GenerateMetadataTask jvm 1 | java.io.IOException: Yum metadata generation failed jvm 1 | at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:166) ~[na:na] jvm 1 | at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:69) ~[na:na] jvm 1 | at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:151) ~[nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:418) ~[nexus-scheduler-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44) [nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3] jvm 1 | at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_71] jvm 1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_71] jvm 1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_71] jvm 1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_71] jvm 1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_71] jvm 1 | at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71] jvm 1 | Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) jvm 1 | at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377) ~[na:na] jvm 1 | at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160) ~[na:na] jvm 1 | at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:147) ~[na:na] jvm 1 | at org.sonatype.nexus.yum.internal.task.CommandLineExecutor.exec(CommandLineExecutor.java:68) ~[na:na] jvm 1 | at org.sonatype.nexus.yum.internal.task.CommandLineExecutor.exec(CommandLineExecutor.java:43) ~[na:na] jvm 1 | at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:162) ~[na:na] jvm 1 | ... 12 common frames omitted jvm 1 | 2015-03-06 15:02:58,202-0500 INFO [pxpool-1-thread-1] admin org.sonatype.nexus.configuration.application.DefaultNexusConfiguration - Applying Nexus Configuration due to changes in [Scheduled Tasks] made by *TASK... jvm 1 | 2015-03-06 15:02:58,335-0500 ERROR [qtp434621209-89] admin org.sonatype.nexus.rest.NexusRestletResource - org.restlet.resource.ResourceException: The server encountered an unexpected condition which prevented it from fulfilling the request jvm 1 | org.restlet.resource.ResourceException: The server encountered an unexpected condition which prevented it from fulfilling the request jvm 1 | at org.sonatype.nexus.yum.internal.rest.AbstractYumRepositoryResource.get(AbstractYumRepositoryResource.java:63) ~[na:na] jvm 1 | at org.sonatype.plexus.rest.resource.RestletResource.represent(RestletResource.java:233) ~[nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.sonatype.nexus.rest.NexusRestletResource.represent(NexusRestletResource.java:39) ~[nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.resource.Resource.getRepresentation(Resource.java:302) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.resource.Resource.handleGet(Resource.java:464) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Finder.handle(Finder.java:353) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.doHandle(Filter.java:150) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.handle(Filter.java:195) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Router.handle(Router.java:504) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.doHandle(Filter.java:150) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.handle(Filter.java:195) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.doHandle(Filter.java:150) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.sonatype.plexus.rest.RetargetableRestlet.doHandle(RetargetableRestlet.java:36) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.handle(Filter.java:195) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.doHandle(Filter.java:150) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.handle(Filter.java:195) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.doHandle(Filter.java:150) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.handle(Filter.java:195) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.doHandle(Filter.java:150) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.handle(Filter.java:195) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.doHandle(Filter.java:150) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.handle(Filter.java:195) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Application.handle(Application.java:341) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.doHandle(Filter.java:150) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.handle(Filter.java:195) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Router.handle(Router.java:504) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.doHandle(Filter.java:150) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Filter.handle(Filter.java:195) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Router.handle(Router.java:504) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Component.handle(Component.java:676) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.restlet.Server.handle(Server.java:331) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at org.sonatype.nexus.restlet1x.internal.RestletServlet.service(RestletServlet.java:93) [nexus-restlet1x-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) [javax.servlet-3.0.0.v201112011016.jar:na] jvm 1 | at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:288) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:278) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:182) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:93) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82) [nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82) [nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at com.sonatype.nexus.analytics.internal.RestRequestCollector.doFilter(RestRequestCollector.java:81) [nexus-analytics-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.sonatype.nexus.web.internal.SecurityFilter.executeChain(SecurityFilter.java:90) [nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) [shiro-core-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.2.3.jar:1.2.3] jvm 1 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82) [nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82) [nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at com.sonatype.nexus.licensing.internal.LicensingRedirectFilter.doFilter(LicensingRedirectFilter.java:135) [nexus-licensing-plugin-2.11.3-SNAPSHOT/:na] jvm 1 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82) [nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at com.yammer.metrics.web.WebappMetricsFilter.doFilter(WebappMetricsFilter.java:76) [metrics-web-2.2.0.jar:na] jvm 1 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at org.sonatype.nexus.web.internal.CommonHeadersFilter.doFilter(CommonHeadersFilter.java:69) [nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at org.sonatype.nexus.web.internal.ErrorPageFilter.doFilter(ErrorPageFilter.java:71) [nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at org.sonatype.nexus.web.internal.BaseUrlHolderFilter.doFilter(BaseUrlHolderFilter.java:70) [nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82) [nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterPipeline.dispatch(NexusGuiceFilter.java:56) [nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:132) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:129) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:206) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:129) [guice-servlet-3.1.10.jar:3.1.10] jvm 1 | at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476) [jetty-servlet-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501) [jetty-servlet-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) [jetty-server-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) [jetty-security-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) [jetty-server-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) [jetty-server-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429) [jetty-servlet-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) [jetty-server-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) [jetty-server-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) [jetty-server-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) [jetty-server-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at com.yammer.metrics.jetty.InstrumentedHandler.handle(InstrumentedHandler.java:200) [metrics-jetty-2.2.0.jar:na] jvm 1 | at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) [jetty-server-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) [jetty-server-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.server.Server.handle(Server.java:370) [jetty-server-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494) [jetty-server-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971) [jetty-server-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033) [jetty-server-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644) [jetty-http-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) [jetty-http-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) [jetty-server-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696) [jetty-io-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53) [jetty-io-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) [jetty-util-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) [jetty-util-8.1.16.v20140903.jar:8.1.16.v20140903] jvm 1 | at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71] jvm 1 | Caused by: java.util.concurrent.ExecutionException: java.io.IOException: Yum metadata generation failed jvm 1 | at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.7.0_71] jvm 1 | at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[na:1.7.0_71] jvm 1 | at org.sonatype.scheduling.DefaultScheduledTask.get(DefaultScheduledTask.java:260) ~[nexus-scheduler-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at org.sonatype.nexus.yum.internal.YumHostedImpl.getYumRepository(YumHostedImpl.java:215) ~[na:na] jvm 1 | at org.sonatype.nexus.yum.internal.rest.VersionedResource.getYumRepository(VersionedResource.java:107) ~[na:na] jvm 1 | at org.sonatype.nexus.yum.internal.rest.AbstractYumRepositoryResource.get(AbstractYumRepositoryResource.java:57) ~[na:na] jvm 1 | ... 132 common frames omitted jvm 1 | Caused by: java.io.IOException: Yum metadata generation failed jvm 1 | at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:166) ~[na:na] jvm 1 | at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:69) ~[na:na] jvm 1 | at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:151) ~[nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:418) ~[nexus-scheduler-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44) ~[nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT] jvm 1 | at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3] jvm 1 | at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_71] jvm 1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) ~[na:1.7.0_71] jvm 1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) ~[na:1.7.0_71] jvm 1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_71] jvm 1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_71] jvm 1 | ... 1 common frames omitted jvm 1 | Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) jvm 1 | at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377) ~[na:na] jvm 1 | at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160) ~[na:na] jvm 1 | at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:147) ~[na:na] jvm 1 | at org.sonatype.nexus.yum.internal.task.CommandLineExecutor.exec(CommandLineExecutor.java:68) ~[na:na] jvm 1 | at org.sonatype.nexus.yum.internal.task.CommandLineExecutor.exec(CommandLineExecutor.java:43) ~[na:na] jvm 1 | at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:162) ~[na:na] jvm 1 | ... 12 common frames omitted {quote}

    Sonatype JIRA | 2 years ago | Joe Tom
    org.restlet.resource.ResourceException: The server encountered an unexpected condition which prevented it from fulfilling the request
  2. 0

    If yum metadata creation fails all we see is this: {quote} 2014-02-03 11:17:08 WARN [ool-1-thread-14] - org.sonatype.nexus.yum.internal.task.GenerateMetadataTask - Scheduled task (GenerateMetadataTask) failed :: Generate Yum metadata of repository 'snapshots' (started 2014-02-03T11:17:08+00:00, runtime 0:00:00.391) java.io.IOException: Yum metadata generation failed at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:177) ~[na:na] at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:72) ~[na:na] at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:157) ~[nexus-core-2.7.1-01.jar:2.7.1-01] at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:419) [nexus-scheduler-2.7.1-01.jar:2.7.1-01] at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:45) [nexus-core-2.7.1-01.jar:2.7.1-01] at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.2.jar:1.2.2] at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.2.jar:1.2.2] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_10] at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_10] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_10] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_10] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_10] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_10] at java.lang.Thread.run(Thread.java:722) [na:1.7.0_10] Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377) ~[na:na] at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160) ~[na:na] at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:147) ~[na:na] at org.sonatype.nexus.yum.internal.task.CommandLineExecutor.exec(CommandLineExecutor.java:46) ~[na:na] at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:168) ~[na:na] ... 13 common frames omitted {quote} This makes it pretty much impossible to figure out what happened. We need to record the command output in case of failure.

    Sonatype JIRA | 3 years ago | Rich Seddon
    java.io.IOException: Yum metadata generation failed
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    I have Sonatype Nexus™ 2.7.0-06 that is being used as a Yum repository. We are deploying about a 100 RPMs per day and it will work nice for a while. Approximately once a two days the new deployed RPMs will start being unavailable from the repo. The logs shows the metadata fails being generated with the exception at the bottom. The only way I found fixing it for the time being is deleting the metadata and running the a generate metadata scheduled task manually. I cannot find any other logs or anything useful to debug the problem. I cannot find the createrepo log either. What would be the best way to troubleshoot this problem and to make the system usable again? One more thing: There is a folder .repodata along the repodata folder within the repository when this happens. If I delete the .repodata and repodata folders and regenerate the metadata there is only repodata folder? Many thanks, Lucho {code} 2014-01-28 04:28:18 WARN [pxpool-1-thread-2] Task-User org.sonatype.scheduling.DefaultScheduledTask - Exception in call method of scheduled task GenerateMetadataTask java.io.IOException: Yum metadata generation failed at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:177) ~[na:na] at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:72) ~[na:na] at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:157) ~[nexus-core-2.7.0-06.jar:2.7.0-06] at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:419) ~[nexus-scheduler-2.7.0-06.jar:2.7.0-06] at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:45) ~[nexus-core-2.7.0-06.jar:2.7.0-06] at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) ~[shiro-core-1.2.2.jar:1.2.2] at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) ~[shiro-core-1.2.2.jar:1.2.2] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) ~[na:1.7.0_25] at java.util.concurrent.FutureTask.run(FutureTask.java:166) ~[na:1.7.0_25] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) ~[na:1.7.0_25] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) ~[na:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_25] at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25] Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377) ~[na:na] at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160) ~[na:na] at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:147) ~[na:na] at org.sonatype.nexus.yum.internal.task.CommandLineExecutor.exec(CommandLineExecutor.java:46) ~[na:na] at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:168) ~[na:na] ... 13 common frames omitted {code}

    Sonatype JIRA | 3 years ago | Luchesar Cekov
    java.io.IOException: Yum metadata generation failed
  5. 0

    if the createrepo tool is run to update yum metadata against the same repodata files at the same time, then it can fail with vague errors: {noformat} 2014-01-22 02:19:12 WARN [ool-1-thread-18] - org.sonatype.nexus.yum.internal.task.GenerateMetadataTask - Yum metadata generation failed org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377) ~[commons-exec-1.1.jar:1.1] at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160) ~[commons-exec-1.1.jar:1.1] at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:147) ~[commons-exec-1.1.jar:1.1] at org.sonatype.nexus.yum.internal.task.CommandLineExecutor.exec(CommandLineExecutor.java:46) ~[nexus-yum-repository-plugin-2.7.0-03.jar:2.7.0-03] at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:168) [nexus-yum-repository-plugin-2.7.0-03.jar:2.7.0-03] at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:72) [nexus-yum-repository-plugin-2.7.0-03.jar:2.7.0-03] at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:157) [nexus-core-2.7.0-03.jar:2.7.0-03] at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:419) [nexus-scheduler-2.7.0-03.jar:2.7.0-03] at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:45) [nexus-core-2.7.0-03.jar:2.7.0-03] at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.2.jar:1.2.2] at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.2.jar:1.2.2] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_02] at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_02] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_02] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_02] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_02] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_02] at java.lang.Thread.run(Thread.java:722) [na:1.7.0_02] 2014-01-22 02:19:12 WARN [ool-1-thread-18] - org.sonatype.nexus.yum.internal.task.GenerateMetadataTask - Scheduled task (GenerateMetadataTask) failed :: Generate Yum metadata of repository 'releases' (started 2014-01-21T21:03:07-05:00, runtime 5:16:05.284) java.io.IOException: Yum metadata generation failed at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:177) ~[na:na] at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:72) ~[na:na] at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:157) ~[nexus-core-2.7.0-03.jar:2.7.0-03] at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:419) [nexus-scheduler-2.7.0-03.jar:2.7.0-03] at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:45) [nexus-core-2.7.0-03.jar:2.7.0-03] at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.2.jar:1.2.2] at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.2.jar:1.2.2] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_02] at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_02] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_02] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_02] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_02] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_02] at java.lang.Thread.run(Thread.java:722) [na:1.7.0_02] Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377) ~[na:na] at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160) ~[na:na] at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:147) ~[na:na] at org.sonatype.nexus.yum.internal.task.CommandLineExecutor.exec(CommandLineExecutor.java:46) ~[na:na] at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:168) ~[na:na] ... 13 common frames omitted 2014-01-22 02:19:12 WARN [ool-1-thread-18] - org.sonatype.scheduling.DefaultScheduledTask - Exception in call method of scheduled task GenerateMetadataTask java.io.IOException: Yum metadata generation failed at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:177) ~[na:na] at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:72) ~[na:na] at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:157) ~[nexus-core-2.7.0-03.jar:2.7.0-03] at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:419) ~[nexus-scheduler-2.7.0-03.jar:2.7.0-03] at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:45) [nexus-core-2.7.0-03.jar:2.7.0-03] at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.2.jar:1.2.2] at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.2.jar:1.2.2] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_02] at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_02] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_02] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_02] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_02] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_02] at java.lang.Thread.run(Thread.java:722) [na:1.7.0_02] Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377) ~[na:na] at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160) ~[na:na] at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:147) ~[na:na] at org.sonatype.nexus.yum.internal.task.CommandLineExecutor.exec(CommandLineExecutor.java:46) ~[na:na] at org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:168) ~[na:na] ... 13 common frames omitted {noformat} When putting the loggers in DEBUG, we see the actual command being executed: {noformat} 2014-01-22 16:45:35 DEBUG [ool-1-thread-17] - org.sonatype.nexus.yum.internal.task.CommandLineExecutor - Execute command : createrepo --update --verbose --database --outputdir /data/sonatype-work/nexus/storage/releases --pkglist /data/sonatype-work/nexus/tmp/nexus-yum-repository-plugin/.cache-releases/.packageFiles/releases.txt --cachedir /data/sonatype-work/nexus/tmp/nexus-yum-repository-plugin/.cache-releases/releases --baseurl http://foo.zzzz.xxxxx.com/content/repositories/releases /data/sonatype-work/nexus/storage/releases {noformat} Still the task ends with exit code 1 and we don't see any more information even though the command is executed with "--verbose". Manually running the command outside of nexus ( in one case this took 5 hours for some reason ) resulted in the real cause of task failure. {noformat} Workers Finished Gathering worker results Saving Primary metadata Saving file lists metadata Saving other metadata Generating sqlite DBs Traceback (most recent call last): File "/usr/share/createrepo/genpkgmetadata.py", line 291, in <module> main(sys.argv[1:]) File "/usr/share/createrepo/genpkgmetadata.py", line 269, in main mdgen.doRepoMetadata() File "/usr/lib/python2.6/site-packages/createrepo/__init__.py", line 954, in doRepoMetadata while data.read(zfo, 2**16): File "/usr/lib/python2.6/site-packages/yum/misc.py", line 264, in read data = fo.read(size) File "/usr/lib64/python2.6/gzip.py", line 219, in read self._read(readsize) File "/usr/lib64/python2.6/gzip.py", line 284, in _read self._read_eof() File "/usr/lib64/python2.6/gzip.py", line 304, in _read_eof hex(self.crc))) IOError: CRC check failed 0xf76420eb != 0xe4ff97f1L {noformat} This final error can be reproduced if two executions of createrepo are running at the same time against the same repo. This can be reproduced by: Downloading a bunch of rpm files into a directory and running the two createrepo executions at the same time. ---- Nexus should better protect against running two createrepo executions against the same repo at the same time. It appears one can get in this state if the createrepo execution takes a long time, which gives two scheduled tasks a chance to run at the same time, say triggered by a delete operation. Also after upgrade to Nexus 2.7.1-01 from a previous version that had a Generate Metadata task defined with rpmDir and repoDir with the same value, there is no way to reset rpmDir value, thereby possibly introducing the same problem. Basically after upgrade, one may have to delete all scheduled YUM tasks and Generate Metadata capabilities to delete rpmDir value. Still we need protection against running createrepo at the same time against the same repo/rpmDir.

    Sonatype JIRA | 3 years ago | Peter Lynch
    java.io.IOException: Yum metadata generation failed
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.apache.commons.exec.ExecuteException

    Process exited with an error: 1 (Exit value: 1)

    at org.apache.commons.exec.DefaultExecutor.executeInternal()
  2. Apache Commons Exec
    DefaultExecutor.execute
    1. org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377)[na:na]
    2. org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160)[na:na]
    3. org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:147)[na:na]
    3 frames
  3. org.sonatype.nexus
    GenerateMetadataTask.doRun
    1. org.sonatype.nexus.yum.internal.task.CommandLineExecutor.exec(CommandLineExecutor.java:68)[na:na]
    2. org.sonatype.nexus.yum.internal.task.CommandLineExecutor.exec(CommandLineExecutor.java:43)[na:na]
    3. org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:162)[na:na]
    4. org.sonatype.nexus.yum.internal.task.GenerateMetadataTask.doRun(GenerateMetadataTask.java:69)[na:na]
    4 frames
  4. ${project.groupId}:${project.artifactId}
    AbstractNexusTask.call
    1. org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:151)[nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT]
    1 frame
  5. ${project.groupId}:${project.artifactId}
    DefaultScheduledTask.call
    1. org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:418)[nexus-scheduler-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT]
    1 frame
  6. ${project.groupId}:${project.artifactId}
    MDCAwareCallable.call
    1. org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44)[nexus-core-2.11.3-SNAPSHOT.jar:2.11.3-SNAPSHOT]
    1 frame
  7. Shiro
    SubjectCallable.call
    1. org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)[shiro-core-1.2.3.jar:1.2.3]
    2. org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)[shiro-core-1.2.3.jar:1.2.3]
    2 frames
  8. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:262)[na:1.7.0_71]
    2. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[na:1.7.0_71]
    3. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[na:1.7.0_71]
    4. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_71]
    5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[na:1.7.0_71]
    6. java.lang.Thread.run(Thread.java:745)[na:1.7.0_71]
    6 frames