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

jenkins-ci.org | 4 months ago
  1. 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
  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

    Getting the following exception when attempt to run a job with the ssh-agent plugin enabled: {code} 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 {code} 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 JIRA | 2 years ago | Ron Ratzlaff
    hudson.util.IOException2: [ssh-agent] Unable to start agent
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    When trying to use the ssh-agent-plugin on any of my ARM slaves I get the following stacktrace: {code} Started by user ... Building remotely on refi-tester in workspace /jenkins/workspace/test-job-refi-teq [ssh-agent] Using credentials jenkins (jenkins' own ssh key) [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 refi-tester failed [ssh-agent] at hudson.remoting.Channel.call(Channel.java:786) [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:314) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironment(SSHAgentBuildWrapper.java:224) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:189) [ssh-agent] at jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:76) [ssh-agent] at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531) [ssh-agent] at hudson.model.Run.execute(Run.java:1741) [ssh-agent] at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) [ssh-agent] at hudson.model.ResourceController.execute(ResourceController.java:98) [ssh-agent] at hudson.model.Executor.run(Executor.java:408) [ssh-agent] Caused by: java.lang.UnsatisfiedLinkError: could not load FFI provider jnr.ffi.provider.jffi.Provider [ssh-agent] at jnr.ffi.provider.InvalidRuntime.newLoadError(InvalidRuntime.java:83) [ssh-agent] at jnr.ffi.provider.InvalidRuntime.findType(InvalidRuntime.java:24) [ssh-agent] at jnr.ffi.Struct$NumberField.<init>(Struct.java:649) [ssh-agent] at jnr.ffi.Struct$Unsigned16.<init>(Struct.java:1007) [ssh-agent] at jnr.unixsocket.SockAddrUnix$DefaultSockAddrUnix.<init>(SockAddrUnix.java:129) [ssh-agent] at jnr.unixsocket.SockAddrUnix.create(SockAddrUnix.java:99) [ssh-agent] at jnr.unixsocket.UnixSocketAddress.<init>(UnixSocketAddress.java:32) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.AgentServer.start(AgentServer.java:73) [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:63) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentStarter.call(JNRRemoteAgentStarter.java:37) [ssh-agent] at hudson.remoting.UserRequest.perform(UserRequest.java:121) [ssh-agent] at hudson.remoting.UserRequest.perform(UserRequest.java:49) [ssh-agent] at hudson.remoting.Request$2.run(Request.java:326) [ssh-agent] at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) [ssh-agent] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [ssh-agent] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [ssh-agent] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [ssh-agent] at java.lang.Thread.run(Thread.java:745) [ssh-agent] at ......remote call to refi-tester(Native Method) [ssh-agent] at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1413) [ssh-agent] at hudson.remoting.UserResponse.retrieve(UserRequest.java:221) [ssh-agent] at hudson.remoting.Channel.call(Channel.java:778) [ssh-agent] ... 10 more [ssh-agent] Caused by: java.lang.ExceptionInInitializerError [ssh-agent] at jnr.ffi.provider.jffi.NativeRuntime.getInstance(NativeRuntime.java:49) [ssh-agent] at jnr.ffi.provider.jffi.Provider.<init>(Provider.java:29) [ssh-agent] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [ssh-agent] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [ssh-agent] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [ssh-agent] at java.lang.reflect.Constructor.newInstance(Constructor.java:422) [ssh-agent] at java.lang.Class.newInstance(Class.java:442) [ssh-agent] at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.getInstance(FFIProvider.java:60) [ssh-agent] at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.<clinit>(FFIProvider.java:49) [ssh-agent] at jnr.ffi.provider.FFIProvider.getSystemProvider(FFIProvider.java:35) [ssh-agent] at jnr.ffi.Runtime$SingletonHolder.<clinit>(Runtime.java:85) [ssh-agent] at jnr.ffi.Runtime.getSystemRuntime(Runtime.java:70) [ssh-agent] at jnr.unixsocket.SockAddrUnix.<init>(SockAddrUnix.java:34) [ssh-agent] at jnr.unixsocket.SockAddrUnix$DefaultSockAddrUnix.<init>(SockAddrUnix.java:128) [ssh-agent] at jnr.unixsocket.SockAddrUnix.create(SockAddrUnix.java:99) [ssh-agent] at jnr.unixsocket.UnixSocketAddress.<init>(UnixSocketAddress.java:32) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.AgentServer.start(AgentServer.java:73) [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:63) [ssh-agent] at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgentStarter.call(JNRRemoteAgentStarter.java:37) [ssh-agent] at hudson.remoting.UserRequest.perform(UserRequest.java:121) [ssh-agent] at hudson.remoting.UserRequest.perform(UserRequest.java:49) [ssh-agent] at hudson.remoting.Request$2.run(Request.java:326) [ssh-agent] at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) [ssh-agent] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [ssh-agent] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [ssh-agent] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [ssh-agent] at java.lang.Thread.run(Thread.java:745) [ssh-agent] Caused by: java.lang.IllegalStateException: Can't overwrite cause with java.lang.UnsatisfiedLinkError [ssh-agent] at java.lang.Throwable.initCause(Throwable.java:457) [ssh-agent] at com.kenai.jffi.Type$Builtin.lookupTypeInfo(Type.java:252) [ssh-agent] at com.kenai.jffi.Type$Builtin.getTypeInfo(Type.java:237) [ssh-agent] at com.kenai.jffi.Type.resolveSize(Type.java:155) [ssh-agent] at com.kenai.jffi.Type.size(Type.java:138) [ssh-agent] at jnr.ffi.provider.jffi.NativeRuntime$TypeDelegate.size(NativeRuntime.java:178) [ssh-agent] at jnr.ffi.provider.AbstractRuntime.<init>(AbstractRuntime.java:48) [ssh-agent] at jnr.ffi.provider.jffi.NativeRuntime.<init>(NativeRuntime.java:57) [ssh-agent] at jnr.ffi.provider.jffi.NativeRuntime.<init>(NativeRuntime.java:41) [ssh-agent] at jnr.ffi.provider.jffi.NativeRuntime$SingletonHolder.<clinit>(NativeRuntime.java:53) [ssh-agent] ... 28 more [ssh-agent] Caused by: java.lang.UnsatisfiedLinkError [ssh-agent] at com.kenai.jffi.Foreign.newLoadError(Foreign.java:72) [ssh-agent] at com.kenai.jffi.Foreign.access$300(Foreign.java:42) [ssh-agent] at com.kenai.jffi.Foreign$InValidInstanceHolder.getForeign(Foreign.java:98) [ssh-agent] at com.kenai.jffi.Foreign.getInstance(Foreign.java:103) [ssh-agent] at com.kenai.jffi.Type$Builtin.lookupTypeInfo(Type.java:242) [ssh-agent] ... 36 more [ssh-agent] Caused by: java.lang.UnsatisfiedLinkError: /tmp/jffi3859728592252335340.tmp: /tmp/jffi3859728592252335340.tmp: cannot open shared object file: No such file or directory [ssh-agent] at java.lang.ClassLoader$NativeLibrary.load(Native Method) [ssh-agent] at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938) [ssh-agent] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821) [ssh-agent] at java.lang.Runtime.load0(Runtime.java:809) [ssh-agent] at java.lang.System.load(System.java:1086) [ssh-agent] at com.kenai.jffi.internal.StubLoader.loadFromJar(StubLoader.java:328) [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: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:531) 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:408) 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 {code} the ssh-agent-plugin works fine if I run it on one of my x86 machines (detailed above).

    Jenkins JIRA | 1 year ago | Linus Wallgren
    hudson.util.IOException2: [ssh-agent] Unable to start agent
  6. 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

    1 unregistered visitors
    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.preCheckout
      1. com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper$SSHAgentEnvironment.<init>(SSHAgentBuildWrapper.java:229)
      2. com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironment(SSHAgentBuildWrapper.java:123)
      3. com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:93)
      3 frames
    3. jenkins.scm
      SCMCheckoutStrategy.preCheckout
      1. jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:78)
      1 frame
    4. Hudson
      Executor.run
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:556)
      2. hudson.model.Run.execute(Run.java:1679)
      3. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      4. hudson.model.ResourceController.execute(ResourceController.java:88)
      5. hudson.model.Executor.run(Executor.java:230)
      5 frames