[JIRA] [ssh-agent-plugin] (JENKINS-35336) SSH agent not starting because file not created

1 view
Skip to first unread message

Ezequiel.golub@gmail.com (JIRA)

unread,
Jun 3, 2016, 11:42:02 AM6/3/16
to jenkinsc...@googlegroups.com
ezequiel golub created an issue
 
Jenkins / Bug JENKINS-35336
SSH agent not starting because file not created
Issue Type: Bug Bug
Assignee: Unassigned
Components: ssh-agent-plugin
Created: 2016/Jun/03 3:41 PM
Priority: Major Major
Reporter: ezequiel golub

*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.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

kutzi@gmx.de (JIRA)

unread,
Dec 7, 2016, 6:19:01 AM12/7/16
to jenkinsc...@googlegroups.com
kutzi commented on Bug JENKINS-35336
 
Re: SSH agent not starting because file not created

We get occasionally the same problem on our build nodes.
Would be good if the error message could have some more details - e.g. what's actually the path of the file trying to be created.

BTW: in our case it was an issue of no more inodes available on the node, so we just had to delete some workspaces on it.

This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

jglick@cloudbees.com (JIRA)

unread,
Feb 10, 2017, 2:06:01 PM2/10/17
to jenkinsc...@googlegroups.com
Jesse Glick resolved as Duplicate
 
Change By: Jesse Glick
Status: Open Resolved
Resolution: Duplicate
Reply all
Reply to author
Forward
0 new messages