Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28279

Could not find a suitable ssh-agent provider.


    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • ssh-agent-plugin
    • 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.

            Unassigned Unassigned
            ronrat Ron Ratzlaff
            8 Vote for this issue
            13 Start watching this issue