java.nio.file.FileAlreadyExistsException

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.

  • 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
    via by Craig Phillips,
  • 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
    via by Craig Phillips,
  • GitHub comment 6529#172553291
    via GitHub by deads2k
    ,
  • 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}
    via by Eduard Wirch,
  • 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}
    via by Eduard Wirch,
    • 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)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    LukaLuka
    1 times, last one,
    olle.hallinolle.hallin
    3 times, last one,
    tvrmsmithtvrmsmith
    1 times, last one,