Jenkins Remoting

Jenkins Remoting is a library, and executable Java archive, which implements the communication layer in Jenkins. This includes the TCP-based communication protocols, remote procedure calls, class loading, data streaming, etc. Currently Remoting is primarily used in communications between the Jenkins controller and Jenkins agents.

The Remoting sub-project includes the Remoting library itself, package for agents, and a number of Remoting-specific plugins and core modules.

Remoting Usage in Jenkins

  • Agent executables (remoting.jar is a named agent.jar or slave.jar in Jenkins)

  • Controller to Agent communication protocols being used in various Agent types, including Java Web Start (aka JNLP) and SSH agents

  • Jenkins CLI, Remoting mode is deprecated since 2.54 (announcement)

  • Communication with Maven instance in the Maven Integration plugin.

Project Components

Remoting Library

Remoting Library is the main component of the the sub-project. The code base is located in a separate repository, which also contains Remoting developer and user documentation. This library also has an independent release cycle and LTS release lines.

Links:

Jenkins Core and Modules

Although Remoting library is a standalone component, Jenkins core includes some extensions and modules for working with Remoting. Core extensions also allow implementing custom protocols on-demand (e.g. for Jenkins CLI). There is ongoing activity on detaching these core components to Jenkins plugins (see jiraJENKINS-44099[]), but in the meantime upgrading of Jenkins core may be required to fix Remoting issues.

Jenkins core extensions:

Modules:

Packaging

There are several packages which bundle the Remoting library and allow connecting Jenkins agents via one of remoting protocols.

  • Docker Agent: Base image, which bundles Remoting

  • Docker Inbound Agent: Image, which can be used to connect agents using TCP (JNLP protocols) or WebSockets

  • Jenkins CLI executable (Requires Remoting CLI to be enabled on the Jenkins controller)

  • Swarm Agent Connector executable in Swarm Plugin