hudson.util.IOException2: Failed to create a temp file on /usr

Jenkins JIRA | cowwoc | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    The Mercurial incorrectly assumes write-access to the Mercurial installation directory, triggering the following exception: {code} hudson.util.IOException2: Failed to create a temp file on /usr at hudson.FilePath.createTextTempFile(FilePath.java:1163) at hudson.FilePath.createTextTempFile(FilePath.java:1114) at hudson.tools.CommandInstaller.performInstallation(CommandInstaller.java:82) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:203) at hudson.plugins.mercurial.MercurialInstallation.forNode(MercurialInstallation.java:103) at hudson.plugins.mercurial.MercurialSCM.findHgExe(MercurialSCM.java:201) at hudson.plugins.mercurial.HgExe.<init>(HgExe.java:80) at hudson.plugins.mercurial.MercurialSCM.clone(MercurialSCM.java:554) at hudson.plugins.mercurial.MercurialSCM.checkout(MercurialSCM.java:389) at hudson.model.AbstractProject.checkout(AbstractProject.java:1324) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:676) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581) at hudson.model.Run.execute(Run.java:1518) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) Caused by: hudson.util.IOException2: remote file operation failed: /usr at hudson.remoting.Channel@26528fa4:Ubuntu 12.04 at hudson.FilePath.act(FilePath.java:848) at hudson.FilePath.act(FilePath.java:825) at hudson.FilePath.createTextTempFile(FilePath.java:1141) ... 18 more {code} My configuration is as follows: Installation directory = /usr Executable = INSTALLATION/bin/hg Installation Automatically using command: "sudo apt-get install mercurial" Jenkin's user does not have general access to /usr, nor to "sudo". It only has executable permissions in /usr/bin and "sudoers" permission to "apt-get". Expected behavior: write temporary files into the path specified by the "java.io.tmpdir" system property.

    Jenkins JIRA | 4 years ago | cowwoc
    hudson.util.IOException2: Failed to create a temp file on /usr
  2. 0

    The Mercurial incorrectly assumes write-access to the Mercurial installation directory, triggering the following exception: {code} hudson.util.IOException2: Failed to create a temp file on /usr at hudson.FilePath.createTextTempFile(FilePath.java:1163) at hudson.FilePath.createTextTempFile(FilePath.java:1114) at hudson.tools.CommandInstaller.performInstallation(CommandInstaller.java:82) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:203) at hudson.plugins.mercurial.MercurialInstallation.forNode(MercurialInstallation.java:103) at hudson.plugins.mercurial.MercurialSCM.findHgExe(MercurialSCM.java:201) at hudson.plugins.mercurial.HgExe.<init>(HgExe.java:80) at hudson.plugins.mercurial.MercurialSCM.clone(MercurialSCM.java:554) at hudson.plugins.mercurial.MercurialSCM.checkout(MercurialSCM.java:389) at hudson.model.AbstractProject.checkout(AbstractProject.java:1324) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:676) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581) at hudson.model.Run.execute(Run.java:1518) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) Caused by: hudson.util.IOException2: remote file operation failed: /usr at hudson.remoting.Channel@26528fa4:Ubuntu 12.04 at hudson.FilePath.act(FilePath.java:848) at hudson.FilePath.act(FilePath.java:825) at hudson.FilePath.createTextTempFile(FilePath.java:1141) ... 18 more {code} My configuration is as follows: Installation directory = /usr Executable = INSTALLATION/bin/hg Installation Automatically using command: "sudo apt-get install mercurial" Jenkin's user does not have general access to /usr, nor to "sudo". It only has executable permissions in /usr/bin and "sudoers" permission to "apt-get". Expected behavior: write temporary files into the path specified by the "java.io.tmpdir" system property.

    Jenkins JIRA | 4 years ago | cowwoc
    hudson.util.IOException2: Failed to create a temp file on /usr

    Root Cause Analysis

    1. hudson.util.IOException2

      remote file operation failed: /usr at hudson.remoting.Channel@26528fa4:Ubuntu 12.04

      at hudson.FilePath.act()
    2. Hudson
      ToolInstallation.translateFor
      1. hudson.FilePath.act(FilePath.java:848)
      2. hudson.FilePath.act(FilePath.java:825)
      3. hudson.FilePath.createTextTempFile(FilePath.java:1141)
      4. hudson.FilePath.createTextTempFile(FilePath.java:1114)
      5. hudson.tools.CommandInstaller.performInstallation(CommandInstaller.java:82)
      6. hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)
      7. hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107)
      8. hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:203)
      8 frames
    3. hudson.plugins.mercurial
      MercurialSCM.checkout
      1. hudson.plugins.mercurial.MercurialInstallation.forNode(MercurialInstallation.java:103)
      2. hudson.plugins.mercurial.MercurialSCM.findHgExe(MercurialSCM.java:201)
      3. hudson.plugins.mercurial.HgExe.<init>(HgExe.java:80)
      4. hudson.plugins.mercurial.MercurialSCM.clone(MercurialSCM.java:554)
      5. hudson.plugins.mercurial.MercurialSCM.checkout(MercurialSCM.java:389)
      5 frames
    4. Hudson
      AbstractBuild$AbstractBuildExecution.defaultCheckout
      1. hudson.model.AbstractProject.checkout(AbstractProject.java:1324)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:676)
      2 frames
    5. jenkins.scm
      SCMCheckoutStrategy.checkout
      1. jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      1 frame
    6. Hudson
      Run.execute
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581)
      2. hudson.model.Run.execute(Run.java:1518)
      2 frames
    7. Hudson Maven Embedder
      MavenModuleSetBuild.run
      1. hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
      1 frame
    8. Hudson
      Executor.run
      1. hudson.model.ResourceController.execute(ResourceController.java:88)
      2. hudson.model.Executor.run(Executor.java:236)
      2 frames