java.lang.RuntimeException: java.io.IOException: Remote call on AGENT failed

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • h1. Steps to reproduce: # Queue a build with TFVC against a specific agent (thus loading native libraries) # Restart master # Queue the same build to execute on the same agent h1. Actual results: {noformat} java.lang.RuntimeException: java.io.IOException: Remote call on AGENT failed at hudson.plugins.tfs.model.Server.execute(Server.java:157) at hudson.plugins.tfs.model.Project.extractChangesetNumber(Project.java:272) at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:268) at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:284) at hudson.plugins.tfs.TeamFoundationServerScm.recordWorkspaceChangesetVersion(TeamFoundationServerScm.java:311) at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:260) at hudson.model.AbstractProject.checkout(AbstractProject.java:1276) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) 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.io.IOException: Remote call on AGENT failed at hudson.remoting.Channel.call(Channel.java:789) at hudson.plugins.tfs.model.Server.execute(Server.java:153) ... 13 more Caused by: java.lang.UnsatisfiedLinkError: com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Ljava/lang/String;)Ljava/lang/String; at com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Native Method) at com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.getEnvironmentVariable(NativePlatformMisc.java:134) at com.microsoft.tfs.jni.PlatformMiscUtils.getEnvironmentVariable(PlatformMiscUtils.java:52) at com.microsoft.tfs.core.config.EnvironmentVariables.getString(EnvironmentVariables.java:251) at com.microsoft.tfs.core.config.EnvironmentVariables.getBoolean(EnvironmentVariables.java:235) at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.getUserAgent(DefaultHTTPClientFactory.java:365) at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.configureClientParams(DefaultHTTPClientFactory.java:323) at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.newHTTPClient(DefaultHTTPClientFactory.java:142) at com.microsoft.tfs.core.TFSConnection.getHTTPClient(TFSConnection.java:1066) at com.microsoft.tfs.core.TFSConnection.getWebService(TFSConnection.java:894) at com.microsoft.tfs.core.config.client.DefaultClientFactory$7.newClient(DefaultClientFactory.java:239) at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:98) at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1508) at com.microsoft.tfs.core.TFSTeamProjectCollection.getVersionControlClient(TFSTeamProjectCollection.java:377) at hudson.plugins.tfs.model.Server.getVersionControlClient(Server.java:142) at hudson.plugins.tfs.commands.RemoteChangesetVersionCommand.call(RemoteChangesetVersionCommand.java:56) at hudson.plugins.tfs.commands.RemoteChangesetVersionCommand.call(RemoteChangesetVersionCommand.java:33) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:325) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:69) at java.lang.Thread.run(Unknown Source) at ......remote call to AGENT(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.UserResponse.retrieve(UserRequest.java:220) at hudson.remoting.Channel.call(Channel.java:781) ... 14 more {noformat} h1. Notes Looking in the log on the agent, I see: {noformat} INFO: Restarting slave via jenkins.slaves.restarter.WinswSlaveRestarter@18f5ce68 Feb 27, 2016 2:02:21 PM jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$2$1 onReconnect SEVERE: Failed to restart slave with jenkins.slaves.restarter.WinswSlaveRestarter@18f5ce68 java.io.IOException: Restart failure. 'C:\path-to-jenkins\jenkins-slave.exe restart' completed with 0 but I'm still alive! See https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds#Distributedbuilds-Windowsslaveserviceupgrades for a possible explanation and solution at jenkins.slaves.restarter.WinswSlaveRestarter.restart(WinswSlaveRestarter.java:54) at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$2$1.onReconnect(JnlpSlaveRestarterInstaller.java:77) at hudson.remoting.EngineListenerSplitter.onReconnect(EngineListenerSplitter.java:49) at hudson.remoting.Engine.run(Engine.java:288) {noformat} It might be possible to catch {{IOException}} in {{Server#execute}}, check if it's due to {{UnsatisfiedLinkError}} and point users to the same wiki page, allowing confused users to skip the step where they have to go figure out what's going on by browsing the agent's log.
    via by Olivier Dagenais,
  • h1. Steps to reproduce: # Queue a build with TFVC against a specific agent (thus loading native libraries) # Restart master # Queue the same build to execute on the same agent h1. Actual results: {noformat} java.lang.RuntimeException: java.io.IOException: Remote call on AGENT failed at hudson.plugins.tfs.model.Server.execute(Server.java:157) at hudson.plugins.tfs.model.Project.extractChangesetNumber(Project.java:272) at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:268) at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:284) at hudson.plugins.tfs.TeamFoundationServerScm.recordWorkspaceChangesetVersion(TeamFoundationServerScm.java:311) at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:260) at hudson.model.AbstractProject.checkout(AbstractProject.java:1276) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) 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.io.IOException: Remote call on AGENT failed at hudson.remoting.Channel.call(Channel.java:789) at hudson.plugins.tfs.model.Server.execute(Server.java:153) ... 13 more Caused by: java.lang.UnsatisfiedLinkError: com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Ljava/lang/String;)Ljava/lang/String; at com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Native Method) at com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.getEnvironmentVariable(NativePlatformMisc.java:134) at com.microsoft.tfs.jni.PlatformMiscUtils.getEnvironmentVariable(PlatformMiscUtils.java:52) at com.microsoft.tfs.core.config.EnvironmentVariables.getString(EnvironmentVariables.java:251) at com.microsoft.tfs.core.config.EnvironmentVariables.getBoolean(EnvironmentVariables.java:235) at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.getUserAgent(DefaultHTTPClientFactory.java:365) at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.configureClientParams(DefaultHTTPClientFactory.java:323) at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.newHTTPClient(DefaultHTTPClientFactory.java:142) at com.microsoft.tfs.core.TFSConnection.getHTTPClient(TFSConnection.java:1066) at com.microsoft.tfs.core.TFSConnection.getWebService(TFSConnection.java:894) at com.microsoft.tfs.core.config.client.DefaultClientFactory$7.newClient(DefaultClientFactory.java:239) at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:98) at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1508) at com.microsoft.tfs.core.TFSTeamProjectCollection.getVersionControlClient(TFSTeamProjectCollection.java:377) at hudson.plugins.tfs.model.Server.getVersionControlClient(Server.java:142) at hudson.plugins.tfs.commands.RemoteChangesetVersionCommand.call(RemoteChangesetVersionCommand.java:56) at hudson.plugins.tfs.commands.RemoteChangesetVersionCommand.call(RemoteChangesetVersionCommand.java:33) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:325) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:69) at java.lang.Thread.run(Unknown Source) at ......remote call to AGENT(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.UserResponse.retrieve(UserRequest.java:220) at hudson.remoting.Channel.call(Channel.java:781) ... 14 more {noformat} h1. Notes Looking in the log on the agent, I see: {noformat} INFO: Restarting slave via jenkins.slaves.restarter.WinswSlaveRestarter@18f5ce68 Feb 27, 2016 2:02:21 PM jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$2$1 onReconnect SEVERE: Failed to restart slave with jenkins.slaves.restarter.WinswSlaveRestarter@18f5ce68 java.io.IOException: Restart failure. 'C:\path-to-jenkins\jenkins-slave.exe restart' completed with 0 but I'm still alive! See https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds#Distributedbuilds-Windowsslaveserviceupgrades for a possible explanation and solution at jenkins.slaves.restarter.WinswSlaveRestarter.restart(WinswSlaveRestarter.java:54) at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$2$1.onReconnect(JnlpSlaveRestarterInstaller.java:77) at hudson.remoting.EngineListenerSplitter.onReconnect(EngineListenerSplitter.java:49) at hudson.remoting.Engine.run(Engine.java:288) {noformat} It might be possible to catch {{IOException}} in {{Server#execute}}, check if it's due to {{UnsatisfiedLinkError}} and point users to the same wiki page, allowing confused users to skip the step where they have to go figure out what's going on by browsing the agent's log.
    via by Olivier Dagenais,
  • My POC job is testing running a job on a node using the NodeLabel plugin. I set the HOSTN parameter as per NodeLabel WIKI. I can see that job is executing as expected on Node requested. However when I add Source Control (TFS) checkout build step it fails with the following exception: {code:xml} FATAL: java.io.IOException: Remote call on PRODNode failed java.lang.RuntimeException: java.io.IOException: Remote call on PRODNode failed at hudson.plugins.tfs.model.Server.execute(Server.java:110) at hudson.plugins.tfs.model.Project.extractChangesetNumber(Project.java:193) at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:189) at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:205) at hudson.plugins.tfs.TeamFoundationServerScm.recordWorkspaceChangesetVersion(TeamFoundationServerScm.java:262) at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:211) at hudson.model.AbstractProject.checkout(AbstractProject.java:1270) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at hudson.model.Run.execute(Run.java:1720) 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.io.IOException: Remote call on PRODNode failed at hudson.remoting.Channel.call(Channel.java:789) at hudson.plugins.tfs.model.Server.execute(Server.java:106) ... 13 more Caused by: java.lang.UnsatisfiedLinkError: com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Ljava/lang/String;)Ljava/lang/String; at com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Native Method) at com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.getEnvironmentVariable(NativePlatformMisc.java:134) at com.microsoft.tfs.jni.PlatformMiscUtils.getEnvironmentVariable(PlatformMiscUtils.java:52) at com.microsoft.tfs.core.config.EnvironmentVariables.getString(EnvironmentVariables.java:251) at com.microsoft.tfs.core.config.EnvironmentVariables.getBoolean(EnvironmentVariables.java:235) at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.getUserAgent(DefaultHTTPClientFactory.java:365) at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.configureClientParams(DefaultHTTPClientFactory.java:323) at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.newHTTPClient(DefaultHTTPClientFactory.java:142) at com.microsoft.tfs.core.TFSConnection.getHTTPClient(TFSConnection.java:1060) at com.microsoft.tfs.core.TFSConnection.getWebService(TFSConnection.java:893) at com.microsoft.tfs.core.config.client.DefaultClientFactory$7.newClient(DefaultClientFactory.java:239) at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:98) at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1502) at com.microsoft.tfs.core.TFSTeamProjectCollection.getVersionControlClient(TFSTeamProjectCollection.java:377) at hudson.plugins.tfs.model.Server.getVersionControlClient(Server.java:95) at hudson.plugins.tfs.commands.RemoteChangesetVersionCommand.call(RemoteChangesetVersionCommand.java:56) at hudson.plugins.tfs.commands.RemoteChangesetVersionCommand.call(RemoteChangesetVersionCommand.java:33) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:85) at java.lang.Thread.run(Unknown Source) at ......remote call to PRODNode(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.UserResponse.retrieve(UserRequest.java:253) at hudson.remoting.Channel.call(Channel.java:781) ... 14 more {code}
    via by Andrew Gray,
    • java.lang.RuntimeException: java.io.IOException: Remote call on AGENT failed at hudson.plugins.tfs.model.Server.execute(Server.java:157) at hudson.plugins.tfs.model.Project.extractChangesetNumber(Project.java:272) at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:268) at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:284) at hudson.plugins.tfs.TeamFoundationServerScm.recordWorkspaceChangesetVersion(TeamFoundationServerScm.java:311) at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:260) at hudson.model.AbstractProject.checkout(AbstractProject.java:1276) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) 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.io.IOException: Remote call on AGENT failed at hudson.remoting.Channel.call(Channel.java:789) at hudson.plugins.tfs.model.Server.execute(Server.java:153) ... 13 more Caused by: java.lang.UnsatisfiedLinkError: com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Ljava/lang/String;)Ljava/lang/String; at com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Native Method) at com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.getEnvironmentVariable(NativePlatformMisc.java:134) at com.microsoft.tfs.jni.PlatformMiscUtils.getEnvironmentVariable(PlatformMiscUtils.java:52) at com.microsoft.tfs.core.config.EnvironmentVariables.getString(EnvironmentVariables.java:251) at com.microsoft.tfs.core.config.EnvironmentVariables.getBoolean(EnvironmentVariables.java:235) at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.getUserAgent(DefaultHTTPClientFactory.java:365) at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.configureClientParams(DefaultHTTPClientFactory.java:323) at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.newHTTPClient(DefaultHTTPClientFactory.java:142) at com.microsoft.tfs.core.TFSConnection.getHTTPClient(TFSConnection.java:1066) at com.microsoft.tfs.core.TFSConnection.getWebService(TFSConnection.java:894) at com.microsoft.tfs.core.config.client.DefaultClientFactory$7.newClient(DefaultClientFactory.java:239) at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:98) at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1508) at com.microsoft.tfs.core.TFSTeamProjectCollection.getVersionControlClient(TFSTeamProjectCollection.java:377) at hudson.plugins.tfs.model.Server.getVersionControlClient(Server.java:142) at hudson.plugins.tfs.commands.RemoteChangesetVersionCommand.call(RemoteChangesetVersionCommand.java:56) at hudson.plugins.tfs.commands.RemoteChangesetVersionCommand.call(RemoteChangesetVersionCommand.java:33) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:325) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:69) at java.lang.Thread.run(Unknown Source)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,