hudson.util.jna.WinIOException: Failed to create a symlink C:\Users\build_user\.jenkins\jobs\Disk_Monitor\lastSuccessful to builds\lastSuccessfulBuild error=183:Cannot create a file when that file already exists

Jenkins JIRA | Rick Patterson | 2 years ago
  1. 0

    Hi. Am using periodic backup plugin to do full backup of our Jenkins installation on Windows. The symlink files (lastBuild, last SucessfulBuild, last FailedBuild etc), get saved as directories in the backup .zip file, and restored that way. These directories then cause errors in subsequent builds as Jenkins goes to update the symlinks and can't since they are directories. ln builds\lastSuccessfulBuild C:\Users\build_user\.jenkins\jobs\Disk_Monitor\lastSuccessful failed hudson.util.jna.WinIOException: Failed to create a symlink C:\Users\build_user\.jenkins\jobs\Disk_Monitor\lastSuccessful to builds\lastSuccessfulBuild error=183:Cannot create a file when that file already exists at hudson.util.jna.Kernel32Utils.createSymbolicLink(Kernel32Utils.java:93) at hudson.Util.createSymlink(Util.java:1132) at hudson.model.Run.createSymlink(Run.java:1865) at hudson.model.Run.updateSymlinks(Run.java:1846) at hudson.model.Run.execute(Run.java:1757) at hudson.matrix.MatrixBuild.run(MatrixBuild.java:306) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) at hudson.model.OneOffExecutor.run(OneOffExecutor.java:43) The plugin should try to save these symlinks and restore them properly. Related: JENKINS-18924. https://issues.jenkins-ci.org/browse/JENKINS-18924

    Jenkins JIRA | 2 years ago | Rick Patterson
    hudson.util.jna.WinIOException: Failed to create a symlink C:\Users\build_user\.jenkins\jobs\Disk_Monitor\lastSuccessful to builds\lastSuccessfulBuild error=183:Cannot create a file when that file already exists
  2. 0

    Hi. Am using periodic backup plugin to do full backup of our Jenkins installation on Windows. The symlink files (lastBuild, last SucessfulBuild, last FailedBuild etc), get saved as directories in the backup .zip file, and restored that way. These directories then cause errors in subsequent builds as Jenkins goes to update the symlinks and can't since they are directories. ln builds\lastSuccessfulBuild C:\Users\build_user\.jenkins\jobs\Disk_Monitor\lastSuccessful failed hudson.util.jna.WinIOException: Failed to create a symlink C:\Users\build_user\.jenkins\jobs\Disk_Monitor\lastSuccessful to builds\lastSuccessfulBuild error=183:Cannot create a file when that file already exists at hudson.util.jna.Kernel32Utils.createSymbolicLink(Kernel32Utils.java:93) at hudson.Util.createSymlink(Util.java:1132) at hudson.model.Run.createSymlink(Run.java:1865) at hudson.model.Run.updateSymlinks(Run.java:1846) at hudson.model.Run.execute(Run.java:1757) at hudson.matrix.MatrixBuild.run(MatrixBuild.java:306) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) at hudson.model.OneOffExecutor.run(OneOffExecutor.java:43) The plugin should try to save these symlinks and restore them properly. Related: JENKINS-18924. https://issues.jenkins-ci.org/browse/JENKINS-18924

    Jenkins JIRA | 2 years ago | Rick Patterson
    hudson.util.jna.WinIOException: Failed to create a symlink C:\Users\build_user\.jenkins\jobs\Disk_Monitor\lastSuccessful to builds\lastSuccessfulBuild error=183:Cannot create a file when that file already exists
  3. 0

    The communicates being thrown in the console at the top of every build are kind of: ln 2014-09-17_14-23-26 T:\jenkins\jobs\Bootloader\builds\11 failed hudson.util.jna.WinIOException: Failed to create a symlink T:\jenkins\jobs\Bootloader\builds\11 to 2014-09-17_14-23-26 error=1:Incorrect function at hudson.util.jna.Kernel32Utils.createSymbolicLink(Kernel32Utils.java:93) at hudson.Util.createSymlink(Util.java:1078) at hudson.model.Run.updateSymlinks(Run.java:1792) at hudson.model.Run.execute(Run.java:1704) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:232) ln builds\lastSuccessfulBuild T:\jenkins\jobs\Bootloader\lastSuccessful failed hudson.util.jna.WinIOException: Failed to create a symlink T:\jenkins\jobs\Bootloader\lastSuccessful to builds\lastSuccessfulBuild error=1:Incorrect function at hudson.util.jna.Kernel32Utils.createSymbolicLink(Kernel32Utils.java:93) at hudson.Util.createSymlink(Util.java:1078) at hudson.model.Run.createSymlink(Run.java:1812) at hudson.model.Run.updateSymlinks(Run.java:1793) at hudson.model.Run.execute(Run.java:1704) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:232) ln builds\lastStableBuild T:\jenkins\jobs\Bootloader\lastStable failed hudson.util.jna.WinIOException: Failed to create a symlink T:\jenkins\jobs\Bootloader\lastStable to builds\lastStableBuild error=1:Incorrect function at hudson.util.jna.Kernel32Utils.createSymbolicLink(Kernel32Utils.java:93) at hudson.Util.createSymlink(Util.java:1078) at hudson.model.Run.createSymlink(Run.java:1812) at hudson.model.Run.updateSymlinks(Run.java:1794) at hudson.model.Run.execute(Run.java:1704) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:232) Building in workspace T:\jenkins\jobs\Bootloader\workspace Reverting T:\jenkins\jobs\Bootloader\workspace\. to depth infinity with ignoreExternals: false an then everything is getting normal and build is finished as success.

    Jenkins JIRA | 2 years ago | Dominika Tomaszewska
    hudson.util.jna.WinIOException: Failed to create a symlink T:\jenkins\jobs\Bootloader\lastStable to builds\lastStableBuild error=1:Incorrect function
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    The communicates being thrown in the console at the top of every build are kind of: ln 2014-09-17_14-23-26 T:\jenkins\jobs\Bootloader\builds\11 failed hudson.util.jna.WinIOException: Failed to create a symlink T:\jenkins\jobs\Bootloader\builds\11 to 2014-09-17_14-23-26 error=1:Incorrect function at hudson.util.jna.Kernel32Utils.createSymbolicLink(Kernel32Utils.java:93) at hudson.Util.createSymlink(Util.java:1078) at hudson.model.Run.updateSymlinks(Run.java:1792) at hudson.model.Run.execute(Run.java:1704) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:232) ln builds\lastSuccessfulBuild T:\jenkins\jobs\Bootloader\lastSuccessful failed hudson.util.jna.WinIOException: Failed to create a symlink T:\jenkins\jobs\Bootloader\lastSuccessful to builds\lastSuccessfulBuild error=1:Incorrect function at hudson.util.jna.Kernel32Utils.createSymbolicLink(Kernel32Utils.java:93) at hudson.Util.createSymlink(Util.java:1078) at hudson.model.Run.createSymlink(Run.java:1812) at hudson.model.Run.updateSymlinks(Run.java:1793) at hudson.model.Run.execute(Run.java:1704) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:232) ln builds\lastStableBuild T:\jenkins\jobs\Bootloader\lastStable failed hudson.util.jna.WinIOException: Failed to create a symlink T:\jenkins\jobs\Bootloader\lastStable to builds\lastStableBuild error=1:Incorrect function at hudson.util.jna.Kernel32Utils.createSymbolicLink(Kernel32Utils.java:93) at hudson.Util.createSymlink(Util.java:1078) at hudson.model.Run.createSymlink(Run.java:1812) at hudson.model.Run.updateSymlinks(Run.java:1794) at hudson.model.Run.execute(Run.java:1704) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:232) Building in workspace T:\jenkins\jobs\Bootloader\workspace Reverting T:\jenkins\jobs\Bootloader\workspace\. to depth infinity with ignoreExternals: false an then everything is getting normal and build is finished as success.

    Jenkins JIRA | 2 years ago | Dominika Tomaszewska
    hudson.util.jna.WinIOException: Failed to create a symlink T:\jenkins\jobs\Bootloader\builds\11 to 2014-09-17_14-23-26 error=1:Incorrect function
  6. 0

    "Move" a job from a Linux master to a Windows master

    Google Groups | 3 years ago | Steve K
    hudson.util.jna.WinIOException: Failed to create a symlink D:\Jenkins\jobs\testjob\lastSuccessful to builds\lastSuccessfulBuild error=183:Cannot create a file when that file already exists

    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. hudson.util.jna.WinIOException

      Failed to create a symlink C:\Users\build_user\.jenkins\jobs\Disk_Monitor\lastSuccessful to builds\lastSuccessfulBuild error=183:Cannot create a file when that file already exists

      at hudson.util.jna.Kernel32Utils.createSymbolicLink()
    2. hudson.util.jna
      Kernel32Utils.createSymbolicLink
      1. hudson.util.jna.Kernel32Utils.createSymbolicLink(Kernel32Utils.java:93)
      1 frame
    3. Hudson
      OneOffExecutor.run
      1. hudson.Util.createSymlink(Util.java:1132)
      2. hudson.model.Run.createSymlink(Run.java:1865)
      3. hudson.model.Run.updateSymlinks(Run.java:1846)
      4. hudson.model.Run.execute(Run.java:1757)
      5. hudson.matrix.MatrixBuild.run(MatrixBuild.java:306)
      6. hudson.model.ResourceController.execute(ResourceController.java:89)
      7. hudson.model.Executor.run(Executor.java:240)
      8. hudson.model.OneOffExecutor.run(OneOffExecutor.java:43)
      8 frames