java.nio.file.FileAlreadyExistsException: /jk/jobs/install-system-files-slave/lastStable

Jenkins JIRA | Craig Phillips | 2 years ago
  1. 0

    I have a job defined to run across approximately 60 build nodes concurrently. If any two of those jobs complete at exactly the same time, one build will fail during link creation, because the links aren't being created atomically: ln builds/lastStableBuild /jk/jobs/install-system-files-slave/lastStable failed java.nio.file.FileAlreadyExistsException: /jk/jobs/install-system-files-slave/lastStable at sun.nio.fs.UnixException.translateToIOException(UnixException.java:88) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.createSymbolicLink(UnixFileSystemProvider.java:456) at java.nio.file.Files.createSymbolicLink(Files.java:996) at sun.reflect.GeneratedMethodAccessor5497.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.Util.createSymlinkJava7(Util.java:1202) at hudson.Util.createSymlink(Util.java:1118) at hudson.model.Run.createSymlink(Run.java:1865) at hudson.model.Run.updateSymlinks(Run.java:1847) at hudson.model.Run.execute(Run.java:1757) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Building remotely on d-rg-mt-adm (pack) in workspace /jk/workspace/install-system-files-slave

    Jenkins JIRA | 2 years ago | Craig Phillips
    java.nio.file.FileAlreadyExistsException: /jk/jobs/install-system-files-slave/lastStable
  2. 0

    I have a job defined to run across approximately 60 build nodes concurrently. If any two of those jobs complete at exactly the same time, one build will fail during link creation, because the links aren't being created atomically: ln builds/lastStableBuild /jk/jobs/install-system-files-slave/lastStable failed java.nio.file.FileAlreadyExistsException: /jk/jobs/install-system-files-slave/lastStable at sun.nio.fs.UnixException.translateToIOException(UnixException.java:88) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.createSymbolicLink(UnixFileSystemProvider.java:456) at java.nio.file.Files.createSymbolicLink(Files.java:996) at sun.reflect.GeneratedMethodAccessor5497.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.Util.createSymlinkJava7(Util.java:1202) at hudson.Util.createSymlink(Util.java:1118) at hudson.model.Run.createSymlink(Run.java:1865) at hudson.model.Run.updateSymlinks(Run.java:1847) at hudson.model.Run.execute(Run.java:1757) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Building remotely on d-rg-mt-adm (pack) in workspace /jk/workspace/install-system-files-slave

    Jenkins JIRA | 2 years ago | Craig Phillips
    java.nio.file.FileAlreadyExistsException: /jk/jobs/install-system-files-slave/lastStable
  3. 0

    GitHub comment 6529#172553291

    GitHub | 10 months ago | deads2k
    java.nio.file.FileAlreadyExistsException: /var/lib/jenkins/jobs/test_pull_requests_origin/lastSuccessful
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [JIRA] [core] (JENKINS-25930) Race condition creating build links during concurrent builds causes build failures

    Google Groups | 1 year ago | angelo...@iress.com.au (JIRA)
    java.nio.file.FileAlreadyExistsException: <span class="error">[path_to_project_workspace]</span>\lastSuccessful
  6. 0

    Affects Version: 1.557 If "use parallel builds" option is checked, and multiple builds finish at the same time, this error occurs: {code} 08:02:09 ln builds/lastSuccessfulBuild /var/lib/jenkins/jobs/MyProject/modules/mypackage$module1/lastSuccessful failed 08:02:09 java.nio.file.FileAlreadyExistsException: /var/lib/jenkins/jobs/MyProject/modules/mypackage$module1/lastSuccessful 08:02:09 at sun.nio.fs.UnixException.translateToIOException(UnixException.java:88) 08:02:09 at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) 08:02:09 at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) 08:02:09 at sun.nio.fs.UnixFileSystemProvider.createSymbolicLink(UnixFileSystemProvider.java:456) 08:02:09 at java.nio.file.Files.createSymbolicLink(Files.java:994) 08:02:09 at sun.reflect.GeneratedMethodAccessor496.invoke(Unknown Source) 08:02:09 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 08:02:09 at java.lang.reflect.Method.invoke(Method.java:606) 08:02:09 at hudson.Util.createSymlinkJava7(Util.java:1148) 08:02:09 at hudson.Util.createSymlink(Util.java:1064) 08:02:09 at hudson.model.Run.createSymlink(Run.java:1793) 08:02:09 at hudson.model.Run.updateSymlinks(Run.java:1774) 08:02:09 at hudson.maven.MavenBuild$ProxyImpl2.end(MavenBuild.java:570) 08:02:09 at sun.reflect.GeneratedMethodAccessor508.invoke(Unknown Source) 08:02:09 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 08:02:09 at java.lang.reflect.Method.invoke(Method.java:606) 08:02:09 at hudson.model.Executor$1.call(Executor.java:559) 08:02:09 at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23) 08:02:09 at com.sun.proxy.$Proxy68.end(Unknown Source) 08:02:09 at sun.reflect.GeneratedMethodAccessor507.invoke(Unknown Source) 08:02:09 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 08:02:09 at java.lang.reflect.Method.invoke(Method.java:606) 08:02:09 at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:299) 08:02:09 at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:280) 08:02:09 at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:239) 08:02:09 at hudson.remoting.UserRequest.perform(UserRequest.java:118) 08:02:09 at hudson.remoting.UserRequest.perform(UserRequest.java:48) 08:02:09 at hudson.remoting.Request$2.run(Request.java:328) 08:02:09 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 08:02:09 at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) 08:02:09 at java.util.concurrent.FutureTask.run(FutureTask.java:262) 08:02:09 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 08:02:09 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 08:02:09 at java.lang.Thread.run(Thread.java:744) {code}

    Jenkins JIRA | 3 years ago | Eduard Wirch
    java.nio.file.FileAlreadyExistsException: /var/lib/jenkins/jobs/MyProject/modules/mypackage$module1/lastSuccessful

    1 unregistered visitors
    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. java.nio.file.FileAlreadyExistsException

      /jk/jobs/install-system-files-slave/lastStable

      at sun.nio.fs.UnixException.translateToIOException()
    2. Java RT
      Method.invoke
      1. sun.nio.fs.UnixException.translateToIOException(UnixException.java:88)
      2. sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
      3. sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
      4. sun.nio.fs.UnixFileSystemProvider.createSymbolicLink(UnixFileSystemProvider.java:456)
      5. java.nio.file.Files.createSymbolicLink(Files.java:996)
      6. sun.reflect.GeneratedMethodAccessor5497.invoke(Unknown Source)
      7. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      8. java.lang.reflect.Method.invoke(Method.java:606)
      8 frames
    3. Hudson
      Executor.run
      1. hudson.Util.createSymlinkJava7(Util.java:1202)
      2. hudson.Util.createSymlink(Util.java:1118)
      3. hudson.model.Run.createSymlink(Run.java:1865)
      4. hudson.model.Run.updateSymlinks(Run.java:1847)
      5. hudson.model.Run.execute(Run.java:1757)
      6. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      7. hudson.model.ResourceController.execute(ResourceController.java:89)
      8. hudson.model.Executor.run(Executor.java:240)
      8 frames