-
Bug
-
Resolution: Won't Fix
-
Major
-
Windows 2012
Tomcat 8.0 with native library
Jenkins 1.610
ssh-agent plugin 1.6
Getting the following exception when attempt to run a job with the ssh-agent plugin enabled:
Started by user anonymous
Building in workspace C:\Program Files (x86)\Jenkins\jobs\SmartPhone\workspace
[ssh-agent] Using credentials id_rsa_smartphone (Smartphone Repo on GitHub)
[ssh-agent] Looking for ssh-agent implementation...
[ssh-agent] FATAL: Could not find a suitable ssh-agent provider
[ssh-agent] Diagnostic report
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:231)
at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:189)
at jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:76)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:530)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:374)
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:332)
at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironment(SSHAgentBuildWrapper.java:224)
... 7 more
Finished: FAILURE
I'm not a Java developer but It appears that the code is attempting to get implementors of RemoteAgentFactory. From what I can tell, there are two - MinaRemoteAgentFactory and JNRRemoteAgentFactory. However, it doesn't appear to find either of these two because of the FATAL: Could not find a suitable ssh-agent provider message that it emits. If it did find MinaRemoteAgentFactory, the MinaRemoteAgentFactory.isSupported() function would either return true or log the Could not find Tomcat Native library message.
I'm not positive that I have the Tomcat native library installed correctly but it appears that it is not even getting to the point where it's checking for the existence of the library. When I installed Tomcat on Windows, I selected the option to include the native library. In the Tomcat logs, it indicates that the native library is being used.
[JENKINS-28279] Could not find a suitable ssh-agent provider.
Workflow | Original: JNJira [ 163113 ] | New: JNJira + In-Review [ 181104 ] |
It is not clear how this is supposed to work on Windows. The documentation just says 'install the native libraries'. Install them where? I just created a directory, put the .dll/openssl.exe in there and added that to my system PATH.
The OS X installation example references building the jar file, which is not distributed with the pre-compiled Windows native library binaries. I compiled the jar against the distributed binaries and modified the slave startup command with a -classpath argument pointing to the jar, but this doesn't seem to make the ssh-agent work either.