org.apache.commons.exec.ExecuteException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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.
    via by Peter Lynch,
  • Scala error
    via GitHub by balagod
    ,
  • Quotes in Command Line
    via Stack Overflow by Welsh
    ,
  • Start Minecraft On Mac With Java
    via Stack Overflow by connorbp
    ,
    • 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]

    Users with the same issue

    Adarro
    2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    42 more bugmates