Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-14772

Synchronization issue with cli command build

XMLWordPrintable

      ssh -p <JENKINS_SSH_PORT> <USER>@<JENKINS_HOST> build Test -s -v

      I'm using jenkins version 1.476

      fails on a busy build host (in this case single CPU) because the log file creation does not happen before jenkins (the build cmd) starts reading it.
      Basically the future returns, the code starts reading the log file, but the actual task has not yet created the log file. This occurs reliably on a busy (hence slow log file creation) single CPU build machine. The exception is:

      java.io.FileNotFoundException: /home/jenkins/jobs/Test/builds/2012-08-13_08-44-53/log (No such file or directory)
      at java.io.RandomAccessFile.open(Native Method)
      at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
      at org.kohsuke.stapler.framework.io.LargeText$FileSession.<init>(LargeText.java:351)
      at org.kohsuke.stapler.framework.io.LargeText$1.open(LargeText.java:75)
      at org.kohsuke.stapler.framework.io.LargeText.writeLogTo(LargeText.java:164)
      at hudson.console.AnnotatedLargeText.writeLogTo(AnnotatedLargeText.java:152)
      at hudson.model.Run.writeWholeLogTo(Run.java:1210)
      at hudson.cli.BuildCommand.run(BuildCommand.java:121)
      at hudson.cli.CLICommand.main(CLICommand.java:228)
      at org.jenkinsci.main.modules.sshd.CLICommandAdapter$1.run(CLICommandAdapter.java:34)
      at org.jenkinsci.main.modules.sshd.AsynchronousCommand$1.run(AsynchronousCommand.java:104)
      at java.lang.Thread.run(Thread.java:619)

            Unassigned Unassigned
            pgdad Esa Laine
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: