Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
m-amatsu opened this issue Jun 16, 2020 · 0 comments

Comments

@m-amatsu
Copy link

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

  • common.yaml " ssh_keys: 'jenkins-agent@my-buildfarm' "
  • master.yaml "jenkins::private_ssh_key: "

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant