Issue
-
The console output of pipeline builds several message like "Cannot contact $AGENT_NAME: java.io.IOException: Remote call on $AGENT_NAME failed"
Resolution
These log record "Cannot contact $AGENT_NAME: java.io.IOException: Remote call on $AGENT_NAME failed" that are polluting the console output are exposed since the improvement of logging in Pipeline. They were suppressed in earlier version of [Pipeline Nodes and Processes Plugin] - although there was a FINE logger - but starting from version 2.9 the plugin records connectivity issues and logs them. This is explained by Jesse in JENKINS-42428:
A recent version of workflow-durable-task-step began reporting connectivity errors that had previously been suppressed unless you happened to have a FINE logger on DurableTaskStep. The error is somewhere in the Remoting layer, generally specific to the agent connection method.
So if this issues starts to appears, it is probably because of an upgrade of this plugin and these warnings have actually always been there. While they could simply be ignored, if you see these warnings even on short running steps it could be symptomatic of an underlying issue.
Update Pipeline: Nodes and Processes
First, update the Pipeline: Nodes and Processes to version 2.11 or later which reduce the noise produced by these logs - see here.
Troubleshooting Further
If after updating the plugin, you still see these logs quite often even for short running tasks, you can troubleshoot this further by adding a logger.
-
Add a logger for
org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep
-
Reproduce the issue
-
Check the stacktrace in the custom logger
-
Check also the agent logs for a stacktrace
The stacktrace should provide more information about what is the root cause of the failed remote call.
Open a Support ticket if you are not sure about the root cause and send to us the following information:
-
a new generated support bundle
-
the agent logs after reproducing the issue
Remove the logger after collecting the information. FINE loggers level may impact performances. |