hudson.util.IOException2: [ssh-agent] Unable to start agent

Jenkins JIRA | Allan BURDAJEWICZ | 4 months ago
  1. 0

    h3. Issue Running Jenkins on PowerPC (ppc64le), when trying to use SSH-Agent we are getting below error: {code} [ssh-agent] Caused by: java.lang.UnsatisfiedLinkError: could not locate stub library in jar file. Tried [jni/unknown-Linux/libjffi-1.2.so, /jni/unknown-Linux/libjffi-1.2.so] [ssh-agent] at com.kenai.jffi.internal.StubLoader.getStubLibraryStream(StubLoader.java:353) [ssh-agent] at com.kenai.jffi.internal.StubLoader.loadFromJar(StubLoader.java:300) [ssh-agent] at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:235) [ssh-agent] at com.kenai.jffi.internal.StubLoader.<clinit>(StubLoader.java:403) [ssh-agent] at java.lang.Class.forName0(Native Method) [ssh-agent] at java.lang.Class.forName(Class.java:348) [ssh-agent] at com.kenai.jffi.Init.load(Init.java:68) [ssh-agent] at com.kenai.jffi.Foreign$InstanceHolder.getInstanceHolder(Foreign.java:49) [ssh-agent] at com.kenai.jffi.Foreign$InstanceHolder.<clinit>(Foreign.java:45) [ssh-agent] ... 38 more 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:253) at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:223) at jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:76) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) 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:371) at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironment(SSHAgentBuildWrapper.java:246) {code} h3. Resolution It looks like version 2.0.3+ of _jnr-iff_ is where _ppc64le_ adds compatibility: * https://github.com/jnr/jnr-ffi/commit/6d8cdc0ce1a5d6dcfbec5c3b635bfe3232088273 So compatibility could be provided by upgrading the following dependencies: * https://github.com/cloudbees/jnr-unixsocket-nodep/blob/master/pom.xml#L83 * https://github.com/jenkinsci/ssh-agent-plugin/blob/master/pom.xml#L112

    Jenkins JIRA | 4 months ago | Allan BURDAJEWICZ
    hudson.util.IOException2: [ssh-agent] Unable to start agent
  2. 0

    when starting an ssh agent on the slave the following stack trace occurs. Downgrading to 1.3 resolves the issue. Started by user Mark Building remotely on EC2-Jenkins-Slave (i-5a34613e) in workspace /var/jenkins/workspace/Mirror_Global_Commerce [ssh-agent] Using credentials jenkinsadmin [ssh-agent] Looking for ssh-agent implementation... [ssh-agent] Java/JNR ssh-agent [ssh-agent] FATAL: Could not find a suitable ssh-agent provider [ssh-agent] Diagnostic report [ssh-agent] * Java/JNR ssh-agent [ssh-agent] java.io.IOException: Remote call on EC2-Jenkins-Slave (i-5a34613e) failed [ssh-agent] at hudson.remoting.Channel.call(Channel.java:723) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentFactory.start(JNRRemoteAgentFactory.java:61) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper$SSHAgentEnvironment.<init>(SSHAgentBuildWrapper.java:211) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironment(SSHAgentBuildWrapper.java:123) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:93) [ssh-agent] at jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:78) [ssh-agent] at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:556) [ssh-agent] at hudson.model.Run.execute(Run.java:1665) [ssh-agent] at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) [ssh-agent] at hudson.model.ResourceController.execute(ResourceController.java:88) [ssh-agent] at hudson.model.Executor.run(Executor.java:230) [ssh-agent] Caused by: java.lang.UnsatisfiedLinkError: /lib/libc.so.6: wrong ELF class: ELFCLASS32 [ssh-agent] at jnr.ffi.provider.jffi.NativeLibrary.loadNativeLibraries(NativeLibrary.java:87) [ssh-agent] at jnr.ffi.provider.jffi.NativeLibrary.getNativeLibraries(NativeLibrary.java:70) [ssh-agent] at jnr.ffi.provider.jffi.NativeLibrary.getSymbolAddress(NativeLibrary.java:49) [ssh-agent] at jnr.ffi.provider.jffi.NativeLibrary.findSymbolAddress(NativeLibrary.java:59) [ssh-agent] at jnr.ffi.provider.jffi.AsmLibraryLoader.generateInterfaceImpl(AsmLibraryLoader.java:125) [ssh-agent] at jnr.ffi.provider.jffi.AsmLibraryLoader.loadLibrary(AsmLibraryLoader.java:63) [ssh-agent] at jnr.ffi.provider.jffi.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:43) [ssh-agent] at jnr.ffi.LibraryLoader.load(LibraryLoader.java:228) [ssh-agent] at jnr.ffi.Library.loadLibrary(Library.java:123) [ssh-agent] at jnr.ffi.Library.loadLibrary(Library.java:80) [ssh-agent] at jnr.unixsocket.Native$LibC.<clinit>(Native.java:40) [ssh-agent] at jnr.unixsocket.Native.libsocket(Native.java:60) [ssh-agent] at jnr.unixsocket.Native.socket(Native.java:68) [ssh-agent] at jnr.unixsocket.UnixServerSocketChannel.<init>(UnixServerSocketChannel.java:38) [ssh-agent] at jnr.unixsocket.UnixServerSocket.<init>(UnixServerSocket.java:29) [ssh-agent] at jnr.unixsocket.UnixServerSocketChannel.open(UnixServerSocketChannel.java:48) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.AgentServer.start(AgentServer.java:67) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgent.<init>(JNRRemoteAgent.java:64) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentStarter.call(JNRRemoteAgentStarter.java:54) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentStarter.call(JNRRemoteAgentStarter.java:35) [ssh-agent] at hudson.remoting.UserRequest.perform(UserRequest.java:118) [ssh-agent] at hudson.remoting.UserRequest.perform(UserRequest.java:48) [ssh-agent] at hudson.remoting.Request$2.run(Request.java:326) [ssh-agent] at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) [ssh-agent] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [ssh-agent] at java.util.concurrent.FutureTask.run(FutureTask.java:166) [ssh-agent] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) [ssh-agent] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [ssh-agent] at java.lang.Thread.run(Thread.java:679) 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:130) at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:93) at jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:78) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:556) at hudson.model.Run.execute(Run.java:1665) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:230) 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:229) at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironment(SSHAgentBuildWrapper.java:123) ... 7 more

    Jenkins JIRA | 3 years ago | Mark Klunder
    hudson.util.IOException2: [ssh-agent] Unable to start agent
  3. 0

    [JENKINS-20276] Native Library Error after upgrading ssh-agent from 1.3 to 1.4 - Jenkins JIRA

    jenkins-ci.org | 5 months ago
    hudson.util.IOException2: [ssh-agent] Unable to start agent
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    New implementation of ssh-agent by Mi-La · Pull Request #2 · jenkinsci/ssh-agent-plugin · GitHub

    github.com | 3 months ago
    hudson.util.IOException2: [ssh-agent] Unable to start agent
  6. 0

    [JENKINS-20276] Native Library Error after upgrading ssh-agent from 1.3 to 1.4 - Jenkins JIRA

    jenkins-ci.org | 4 months ago
    hudson.util.IOException2: [ssh-agent] Unable to start agent

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.RuntimeException

      [ssh-agent] Could not find a suitable ssh-agent provider.

      at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper$SSHAgentEnvironment.<init>()
    2. com.cloudbees.jenkins
      SSHAgentBuildWrapper.createSSHAgentEnvironment
      1. com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper$SSHAgentEnvironment.<init>(SSHAgentBuildWrapper.java:371)
      2. com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironment(SSHAgentBuildWrapper.java:246)
      2 frames