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

sshagent not finding agent factories (but does not report why)

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Trivial
    • Resolution: Unresolved
    • Component/s: ssh-agent-plugin
    • Labels:
    • Environment:
      tomcat 9, jenkins 2.19.1, window 7, java 8, tcnative installed
    • Similar Issues:

      Description

      Following Exception is raised when i run my pipeline script:

      {{node {
      stage('a') {
      sshagent(['tomcat'])

      { sh 'ssh 10.141.86.5 ls' }

      }
      }}}

      {{[Pipeline] node
      Running on master in f:\jenkins\workspace\pipetest
      [Pipeline] {
      [Pipeline] stage
      [Pipeline]

      { (a) [Pipeline] sshagent [ssh-agent] Using credentials tomcat [ssh-agent] Looking for ssh-agent implementation... [ssh-agent] FATAL: Could not find a suitable ssh-agent provider [ssh-agent] Diagnostic report [Pipeline] // sshagent [Pipeline] }

      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      java.lang.RuntimeException: [ssh-agent] Could not find a suitable ssh-agent provider.
      at com.cloudbees.jenkins.plugins.sshagent.SSHAgentStepExecution.initRemoteAgent(SSHAgentStepExecution.java:180)
      at com.cloudbees.jenkins.plugins.sshagent.SSHAgentStepExecution.start(SSHAgentStepExecution.java:63)
      at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:184)
      at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:126)}}

      At least i was expecting an error from the agent with loading the native lib.

        Attachments

          Issue Links

            Activity

            stefandotti Stefan Dotti created issue -
            Hide
            kossmoboleat Tim Benke added a comment - - edited

            I managed to "install" the native library by adding the path to the dll to the path and then restart Jenkins.

            Then it always crashed if my credentials were not in putty's ppk format. Still I cannot execute a plink command. I'm not really sure why. I'd assumed because ppk was the only valid format for me, that I would have to use putty's commands.

            Before I had tried mysysgit's ssh command which doesn't seem to have the correct passphrase either.

            This job is successful, but the command is not really executed, as if the passphrase is still necessary and just not entered. If I enter the same command in cmd and enter the passphrase the command is actually executed.

            Here's my output:

            Started by user Admin
            Building in workspace D:\jenkins\workspace\freestyletest
            [ssh-agent] Looking for ssh-agent implementation...
            [ssh-agent] Java/tomcat-native ssh-agent
            [ssh-agent] Skipped registering BouncyCastle, not running on a remote agent
            [ssh-agent] Started.
            [ssh-agent] Using credentials test-ppk
            [freestyletest] $ cmd /c call C:\Users\tcbld1\AppData\Local\Temp\2\hudson7374457953271842666.bat

            CLINK D:\jenkins\workspace\freestyletest>E:\putty\plink.exe -i C:\Users\tcbld1\.ssh\converted_for_putty_jenkins_id_rsa.ppk target-machine -l testuser touch plink
            Passphrase for key "imported-openssh-key":

            CLINK D:\jenkins\workspace\freestyletest>exit 0
            [ssh-agent] Stopped.
            Finished: SUCCESS

            Show
            kossmoboleat Tim Benke added a comment - - edited I managed to "install" the native library by adding the path to the dll to the path and then restart Jenkins. Then it always crashed if my credentials were not in putty's ppk format. Still I cannot execute a plink command. I'm not really sure why. I'd assumed because ppk was the only valid format for me, that I would have to use putty's commands. Before I had tried mysysgit's ssh command which doesn't seem to have the correct passphrase either. This job is successful, but the command is not really executed, as if the passphrase is still necessary and just not entered. If I enter the same command in cmd and enter the passphrase the command is actually executed. Here's my output: Started by user Admin Building in workspace D:\jenkins\workspace\freestyletest [ssh-agent] Looking for ssh-agent implementation... [ssh-agent] Java/tomcat-native ssh-agent [ssh-agent] Skipped registering BouncyCastle, not running on a remote agent [ssh-agent] Started. [ssh-agent] Using credentials test-ppk [freestyletest] $ cmd /c call C:\Users\tcbld1\AppData\Local\Temp\2\hudson7374457953271842666.bat CLINK D:\jenkins\workspace\freestyletest>E:\putty\plink.exe -i C:\Users\tcbld1\.ssh\converted_for_putty_jenkins_id_rsa.ppk target-machine -l testuser touch plink Passphrase for key "imported-openssh-key": CLINK D:\jenkins\workspace\freestyletest>exit 0 [ssh-agent] Stopped. Finished: SUCCESS
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Labels diagnostics
            jglick Jesse Glick made changes -
            Summary sshagent not finding agent factories sshagent not finding agent factories (but does not report why)
            Hide
            jglick Jesse Glick added a comment -

            Might become a non-issue after JENKINS-36997 in 1.14.

            Show
            jglick Jesse Glick added a comment - Might become a non-issue after JENKINS-36997 in 1.14.
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-35336 [ JENKINS-35336 ]

              People

              • Assignee:
                Unassigned
                Reporter:
                stefandotti Stefan Dotti
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: