Skip to content

[JENKINS-73209] Jenkins agent reliable connection #1500

@jenkins-infra-bot

Description

@jenkins-infra-bot

Hello folks,

Recently I found that JNLP agent is not that good in reconnecting to known Jenkins Master. In case port is not available it will exit with exception instead of retry again and again (because potentially it holds the execution context, as far I understand that for plugins like git) - attached screenshot with error.

So my question is - why jenkins agent don't retry forever if it's not it's first connection? Jenkins Master could restart or network have some errors in routing (with just drops of packets it's reconnecting just fine) - why the agent dies and losing the state? Or maybe I don't understand something important and jenkins agent will always pickup the state after restart?

Additionally tested simple pipeline with git plugin - it gives no chance the agent to reconnect and fails the build... So in case the connectivity between the Jenkins Master & Agent is unstable or overloaded during git checkout - there is only one way to fail without continuing? How that could work in our real world where network connection is so unreliable?

Thank you


Originally reported by sparshev2, imported from: Jenkins agent reliable connection
  • assignee: jthompson
  • status: Open
  • priority: Minor
  • component(s): remoting
  • label(s): JNLP, agents
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-11-25
Raw content of original issue

Hello folks,

Recently I found that JNLP agent is not that good in reconnecting to known Jenkins Master. In case port is not available it will exit with exception instead of retry again and again (because potentially it holds the execution context, as far I understand that for plugins like git) - attached screenshot with error.

So my question is - why jenkins agent don't retry forever if it's not it's first connection? Jenkins Master could restart or network have some errors in routing (with just drops of packets it's reconnecting just fine) - why the agent dies and losing the state? Or maybe I don't understand something important and jenkins agent will always pickup the state after restart?

Additionally tested simple pipeline with git plugin - it gives no chance the agent to reconnect and fails the build... So in case the connectivity between the Jenkins Master & Agent is unstable or overloaded during git checkout - there is only one way to fail without continuing? How that could work in our real world where network connection is so unreliable?

Thank you

1 attachment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions