ros-infrastructure / buildfarm_deployment

Apache License 2.0
30 stars 39 forks source link

Build command from Jenkins GUI failed cause "Could not find specified credentials" #236

Open m-amatsu opened 4 years ago

m-amatsu commented 4 years ago

We have set up the build farm according to the following steps :

Environment : Jenkins 2.204.1

then, We ran the build ci_linux as shown in the following figure, and it detected an error. image

The Jenkins console error is as follows.

17:21:51 Started by user unknown or anonymous
17:21:51 Running as SYSTEM
17:21:51 Building remotely on agent-ffb10347 (swarm linux buildagent) in workspace /home/jenkins-agent/workspace/ci_linux
17:21:51 FATAL: 
17:21:51 java.io.IOException: [ssh-agent] Could not find specified credentials
17:21:51    at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:209)
17:21:51    at jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:76)
17:21:51    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:498)
17:21:51    at hudson.model.Run.execute(Run.java:1815)
17:21:51    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
17:21:51    at hudson.model.ResourceController.execute(ResourceController.java:97)
17:21:51    at hudson.model.Executor.run(Executor.java:429)
17:21:51 FATAL: [ssh-agent] Could not find specified credentials
17:21:51 java.io.IOException: [ssh-agent] Could not find specified credentials
17:21:51    at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:209)
17:21:51    at jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:76)
17:21:51    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:498)
17:21:51    at hudson.model.Run.execute(Run.java:1815)
17:21:51    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
17:21:51    at hudson.model.ResourceController.execute(ResourceController.java:97)
17:21:51    at hudson.model.Executor.run(Executor.java:429)

So I checked again to make sure that the following parameters were listed correctly, and they were fine

Next, I took action with respect to what is described in #188, but it did not improve.

In addition, I logged in from master to agent by CUI with ssh (no password input) and found out that I could log in without any problems, and executed tcpdump on master and recorded the packets.

On the other hand, when I ran the build from the jenkins GUI, I got a tcpdump from the master as well, and the SSH packets detected during the SSH login from the CUI were not there.

This suggests that the problem is caused by reading Credencial in master.

If anyone is detecting this kind of problem, please let me know how to work around it.