hudson.util.IOException2: Failed to create a temporary file in /media/extra/christian/hudson/fingerprints/d2/7b

Jenkins JIRA | Paolo Giarrusso | 5 years ago
  1. 0

    hudson.XmlFile.mkdirs does not check the return value of {{boolean java.io.File.mkdirs()}}, which can fail silently; this makes debugging errors harder - see https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/XmlFile.java. Instead, if mkdirs() returns false, an exception should be thrown. In my case, I got the following exception at a later point in XmlFile.write (which does call XmlFile.mkdirs()): {code} ERROR: Failed to record fingerprints hudson.util.IOException2: Failed to create a temporary file in /media/extra/christian/hudson/fingerprints/d2/7b at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:67) at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:54) at hudson.XmlFile.write(XmlFile.java:170) at hudson.model.Fingerprint.save(Fingerprint.java:841) at hudson.model.Fingerprint.<init>(Fingerprint.java:588) at hudson.model.FingerprintMap.create(FingerprintMap.java:90) at hudson.model.FingerprintMap.create(FingerprintMap.java:45) at hudson.util.KeyedDataStorage.get(KeyedDataStorage.java:156) at hudson.model.FingerprintMap.get(FingerprintMap.java:79) at hudson.model.FingerprintMap.get(FingerprintMap.java:45) at hudson.util.KeyedDataStorage.getOrCreate(KeyedDataStorage.java:108) at hudson.model.FingerprintMap.getOrCreate(FingerprintMap.java:65) at hudson.tasks.Fingerprinter$1Record.addRecord(Fingerprinter.java:211) at hudson.tasks.Fingerprinter.record(Fingerprinter.java:255) at hudson.tasks.Fingerprinter.perform(Fingerprinter.java:134) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:645) at hudson.model.Build$RunnerImpl.post2(Build.java:162) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614) at hudson.model.Run.run(Run.java:1429) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:230) Caused by: java.io.IOException: No such file or directory at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1716) at java.io.File.createTempFile(File.java:1804) at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:65) ... 24 more Build step 'Record fingerprints of files to track usage' changed build result to FAILURE {code} when /media/extra/christian/hudson/fingerprints/d2 did indeed not exist. To debug this, I assumed that the directory was not being created; instead, mkdirs was being called but failed, so the error should have been recorded at that time. After I realized that mkdirs() was being called, it became easy to realize that it failed because of a mistake of mine: I had launched previously Jenkins as root, and failed to correctly reassign file ownership when I relaunched it as an unprivileged user.

    Jenkins JIRA | 5 years ago | Paolo Giarrusso
    hudson.util.IOException2: Failed to create a temporary file in /media/extra/christian/hudson/fingerprints/d2/7b
  2. 0

    hudson.XmlFile.mkdirs does not check the return value of {{boolean java.io.File.mkdirs()}}, which can fail silently; this makes debugging errors harder - see https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/XmlFile.java. Instead, if mkdirs() returns false, an exception should be thrown. In my case, I got the following exception at a later point in XmlFile.write (which does call XmlFile.mkdirs()): {code} ERROR: Failed to record fingerprints hudson.util.IOException2: Failed to create a temporary file in /media/extra/christian/hudson/fingerprints/d2/7b at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:67) at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:54) at hudson.XmlFile.write(XmlFile.java:170) at hudson.model.Fingerprint.save(Fingerprint.java:841) at hudson.model.Fingerprint.<init>(Fingerprint.java:588) at hudson.model.FingerprintMap.create(FingerprintMap.java:90) at hudson.model.FingerprintMap.create(FingerprintMap.java:45) at hudson.util.KeyedDataStorage.get(KeyedDataStorage.java:156) at hudson.model.FingerprintMap.get(FingerprintMap.java:79) at hudson.model.FingerprintMap.get(FingerprintMap.java:45) at hudson.util.KeyedDataStorage.getOrCreate(KeyedDataStorage.java:108) at hudson.model.FingerprintMap.getOrCreate(FingerprintMap.java:65) at hudson.tasks.Fingerprinter$1Record.addRecord(Fingerprinter.java:211) at hudson.tasks.Fingerprinter.record(Fingerprinter.java:255) at hudson.tasks.Fingerprinter.perform(Fingerprinter.java:134) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:645) at hudson.model.Build$RunnerImpl.post2(Build.java:162) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614) at hudson.model.Run.run(Run.java:1429) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:230) Caused by: java.io.IOException: No such file or directory at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1716) at java.io.File.createTempFile(File.java:1804) at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:65) ... 24 more Build step 'Record fingerprints of files to track usage' changed build result to FAILURE {code} when /media/extra/christian/hudson/fingerprints/d2 did indeed not exist. To debug this, I assumed that the directory was not being created; instead, mkdirs was being called but failed, so the error should have been recorded at that time. After I realized that mkdirs() was being called, it became easy to realize that it failed because of a mistake of mine: I had launched previously Jenkins as root, and failed to correctly reassign file ownership when I relaunched it as an unprivileged user.

    Jenkins JIRA | 5 years ago | Paolo Giarrusso
    hudson.util.IOException2: Failed to create a temporary file in /media/extra/christian/hudson/fingerprints/d2/7b
  3. 0

    [ecf-build] Build failed in Hudson: C-HEAD-sdk_feature #826

    eclipse.org | 1 year ago
    hudson.util.IOException2: Failed to create a temp file on < >
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Bug 427942 – Xtext jobs creating too many files/dirs in /tmp

    eclipse.org | 11 months ago
    hudson.util.IOException2: Failed to create a temp file on /home/hudson/genie.modeling.tmf.xtext/.hudson/jobs/xtend-xtext-playground/workspace
  6. 0

    Jenkins issues - [JIRA] Created: (JENKINS-11029) FATAL: Unable to produce a script file

    nabble.com | 5 months ago
    hudson.util.IOException2: Failed to create a temp file on /home/hudson/jobs/VMCTrunk/workspace

  1. davidvanlaatum 2 times, last 3 days ago
  2. Vladimir Dmie 1 times, last 4 months ago
  3. davidvanlaatum 5 times, last 6 months ago
21 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.io.IOException

    No such file or directory

    at java.io.UnixFileSystem.createFileExclusively()
  2. Java RT
    File.createTempFile
    1. java.io.UnixFileSystem.createFileExclusively(Native Method)
    2. java.io.File.checkAndCreate(File.java:1716)
    3. java.io.File.createTempFile(File.java:1804)
    3 frames
  3. Hudson
    Executor.run
    1. hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:65)
    2. hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:54)
    3. hudson.XmlFile.write(XmlFile.java:170)
    4. hudson.model.Fingerprint.save(Fingerprint.java:841)
    5. hudson.model.Fingerprint.<init>(Fingerprint.java:588)
    6. hudson.model.FingerprintMap.create(FingerprintMap.java:90)
    7. hudson.model.FingerprintMap.create(FingerprintMap.java:45)
    8. hudson.util.KeyedDataStorage.get(KeyedDataStorage.java:156)
    9. hudson.model.FingerprintMap.get(FingerprintMap.java:79)
    10. hudson.model.FingerprintMap.get(FingerprintMap.java:45)
    11. hudson.util.KeyedDataStorage.getOrCreate(KeyedDataStorage.java:108)
    12. hudson.model.FingerprintMap.getOrCreate(FingerprintMap.java:65)
    13. hudson.tasks.Fingerprinter$1Record.addRecord(Fingerprinter.java:211)
    14. hudson.tasks.Fingerprinter.record(Fingerprinter.java:255)
    15. hudson.tasks.Fingerprinter.perform(Fingerprinter.java:134)
    16. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
    17. hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
    18. hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
    19. hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:645)
    20. hudson.model.Build$RunnerImpl.post2(Build.java:162)
    21. hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614)
    22. hudson.model.Run.run(Run.java:1429)
    23. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    24. hudson.model.ResourceController.execute(ResourceController.java:88)
    25. hudson.model.Executor.run(Executor.java:230)
    25 frames