java.io.IOException: No such file or directory

Jenkins JIRA | ezequiel golub | 6 months ago
  1. 0

    *Enviroment: * Ubuntu 14.04.2 LTS Jenkins 2.7 running under Nginx ssh-agent 1.10 *Logs* ```Started by user Ezequiel Golub Changing BUILD_ID variable (job build time) with the date pattern yyyy-MM-dd_HH-mm-ss. Changing BUILD_ID variable (job build time) with the date pattern yyyy-MM-dd_HH-mm-ss. Published SNS notification: subject=Build STARTED: build-environment #6950 topic=arn:aws:sns:us-east-1:139903529341:jenkins-production-infrastructure [EnvInject] - Loading node environment variables. Changing BUILD_ID variable (job build time) with the date pattern yyyy-MM-dd_HH-mm-ss. Building on masterChanging BUILD_ID variable (job build time) with the date pattern yyyy-MM-dd_HH-mm-ss. in workspace /home/deploy/environments [ssh-agent] Looking for ssh-agent implementation... [ssh-agent] Java/JNR ssh-agent [ssh-agent] FATAL: Could not find a suitable ssh-agent provider [ssh-agent] Diagnostic report [ssh-agent] * Java/JNR ssh-agent [ssh-agent] java.io.IOException: No such file or directory [ssh-agent] at java.io.UnixFileSystem.createFileExclusively(Native Method) [ssh-agent] at java.io.File.createNewFile(File.java:1006) [ssh-agent] at java.io.File.createTempFile(File.java:1989) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.AgentServer.createLocalSocketAddress(AgentServer.java:142) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.AgentServer.start(AgentServer.java:78) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgent.<init>(JNRRemoteAgent.java:70) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentStarter.call(JNRRemoteAgentStarter.java:68) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentStarter.call(JNRRemoteAgentStarter.java:39) [ssh-agent] at hudson.remoting.LocalChannel.call(LocalChannel.java:45) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentFactory.start(JNRRemoteAgentFactory.java:62) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper$SSHAgentEnvironment.<init>(SSHAgentBuildWrapper.java:360) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironment(SSHAgentBuildWrapper.java:248) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:225) [ssh-agent] at jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:76) [ssh-agent] at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528) [ssh-agent] at hudson.model.Run.execute(Run.java:1738) [ssh-agent] at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) [ssh-agent] at hudson.model.ResourceController.execute(ResourceController.java:98) [ssh-agent] at hudson.model.Executor.run(Executor.java:410) FATAL: [ssh-agent] Unable to start agent hudson.util.IOException2: [ssh-agent] Unable to start agent at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironment(SSHAgentBuildWrapper.java:255) at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:225) at jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:76) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.lang.RuntimeException: [ssh-agent] Could not find a suitable ssh-agent provider. at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper$SSHAgentEnvironment.<init>(SSHAgentBuildWrapper.java:378) at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironment(SSHAgentBuildWrapper.java:248) ... 7 more Changing BUILD_ID variable (job build time) with the date pattern yyyy-MM-dd_HH-mm-ss. Changing BUILD_ID variable (job build time) with the date pattern yyyy-MM-dd_HH-mm-ss. Published SNS notification: subject=Build FAILURE: build-environment #6950 topic=arn:aws:sns:us-east-1:139903529341:jenkins-production-infrastructure Changing BUILD_ID variable (job build time) with the date pattern yyyy-MM-dd_HH-mm-ss. Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered Finished: FAILURE``` *Analysis* My best guess is that it's trying to create a file in `AgentServer.java:142`, but it's generating and invalid path. I tried chmod 777 on it's workspace, just to be sure, and it didn't help. We were upgrading from ssh-agent 1.5 to 1.10, didn't work, ended up downgrading to 1.9 to avoid this issue. I'm not a java guy, but i'll be happy to provide any other information needed to fix this.

    Jenkins JIRA | 6 months ago | ezequiel golub
    java.io.IOException: No such file or directory
  2. 0

    *Enviroment: * Ubuntu 14.04.2 LTS Jenkins 2.7 running under Nginx ssh-agent 1.10 *Logs* ```Started by user Ezequiel Golub Changing BUILD_ID variable (job build time) with the date pattern yyyy-MM-dd_HH-mm-ss. Changing BUILD_ID variable (job build time) with the date pattern yyyy-MM-dd_HH-mm-ss. Published SNS notification: subject=Build STARTED: build-environment #6950 topic=arn:aws:sns:us-east-1:139903529341:jenkins-production-infrastructure [EnvInject] - Loading node environment variables. Changing BUILD_ID variable (job build time) with the date pattern yyyy-MM-dd_HH-mm-ss. Building on masterChanging BUILD_ID variable (job build time) with the date pattern yyyy-MM-dd_HH-mm-ss. in workspace /home/deploy/environments [ssh-agent] Looking for ssh-agent implementation... [ssh-agent] Java/JNR ssh-agent [ssh-agent] FATAL: Could not find a suitable ssh-agent provider [ssh-agent] Diagnostic report [ssh-agent] * Java/JNR ssh-agent [ssh-agent] java.io.IOException: No such file or directory [ssh-agent] at java.io.UnixFileSystem.createFileExclusively(Native Method) [ssh-agent] at java.io.File.createNewFile(File.java:1006) [ssh-agent] at java.io.File.createTempFile(File.java:1989) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.AgentServer.createLocalSocketAddress(AgentServer.java:142) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.AgentServer.start(AgentServer.java:78) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgent.<init>(JNRRemoteAgent.java:70) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentStarter.call(JNRRemoteAgentStarter.java:68) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentStarter.call(JNRRemoteAgentStarter.java:39) [ssh-agent] at hudson.remoting.LocalChannel.call(LocalChannel.java:45) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentFactory.start(JNRRemoteAgentFactory.java:62) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper$SSHAgentEnvironment.<init>(SSHAgentBuildWrapper.java:360) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironment(SSHAgentBuildWrapper.java:248) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:225) [ssh-agent] at jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:76) [ssh-agent] at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528) [ssh-agent] at hudson.model.Run.execute(Run.java:1738) [ssh-agent] at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) [ssh-agent] at hudson.model.ResourceController.execute(ResourceController.java:98) [ssh-agent] at hudson.model.Executor.run(Executor.java:410) FATAL: [ssh-agent] Unable to start agent hudson.util.IOException2: [ssh-agent] Unable to start agent at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironment(SSHAgentBuildWrapper.java:255) at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:225) at jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:76) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.lang.RuntimeException: [ssh-agent] Could not find a suitable ssh-agent provider. at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper$SSHAgentEnvironment.<init>(SSHAgentBuildWrapper.java:378) at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironment(SSHAgentBuildWrapper.java:248) ... 7 more Changing BUILD_ID variable (job build time) with the date pattern yyyy-MM-dd_HH-mm-ss. Changing BUILD_ID variable (job build time) with the date pattern yyyy-MM-dd_HH-mm-ss. Published SNS notification: subject=Build FAILURE: build-environment #6950 topic=arn:aws:sns:us-east-1:139903529341:jenkins-production-infrastructure Changing BUILD_ID variable (job build time) with the date pattern yyyy-MM-dd_HH-mm-ss. Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered Finished: FAILURE``` *Analysis* My best guess is that it's trying to create a file in `AgentServer.java:142`, but it's generating and invalid path. I tried chmod 777 on it's workspace, just to be sure, and it didn't help. We were upgrading from ssh-agent 1.5 to 1.10, didn't work, ended up downgrading to 1.9 to avoid this issue. I'm not a java guy, but i'll be happy to provide any other information needed to fix this.

    Jenkins JIRA | 6 months ago | ezequiel golub
    java.io.IOException: No such file or directory
  3. 0

    shows 'java.io.IOException: No such file or directory'

    GitHub | 2 years ago | guofan
    java.io.IOException: No such file or directory
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    return error: no such file or directory.

    GitHub | 2 years ago | oliveagle
    java.io.IOException: No such file or directory
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.createNewFile(File.java:1006)
    3. java.io.File.createTempFile(File.java:1989)
    3 frames
  3. com.cloudbees.jenkins
    JNRRemoteAgentStarter.call
    1. com.cloudbees.jenkins.plugins.sshagent.jna.AgentServer.createLocalSocketAddress(AgentServer.java:142)
    2. com.cloudbees.jenkins.plugins.sshagent.jna.AgentServer.start(AgentServer.java:78)
    3. com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgent.<init>(JNRRemoteAgent.java:70)
    4. com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentStarter.call(JNRRemoteAgentStarter.java:68)
    5. com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentStarter.call(JNRRemoteAgentStarter.java:39)
    5 frames
  4. Hudson :: Remoting Layer
    LocalChannel.call
    1. hudson.remoting.LocalChannel.call(LocalChannel.java:45)
    1 frame
  5. com.cloudbees.jenkins
    SSHAgentBuildWrapper.preCheckout
    1. com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentFactory.start(JNRRemoteAgentFactory.java:62)
    2. com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper$SSHAgentEnvironment.<init>(SSHAgentBuildWrapper.java:360)
    3. com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironment(SSHAgentBuildWrapper.java:248)
    4. com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:225)
    4 frames
  6. jenkins.scm
    SCMCheckoutStrategy.preCheckout
    1. jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:76)
    1 frame
  7. Hudson
    Executor.run
    1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
    2. hudson.model.Run.execute(Run.java:1738)
    3. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    4. hudson.model.ResourceController.execute(ResourceController.java:98)
    5. hudson.model.Executor.run(Executor.java:410)
    5 frames