Remoting Best Practices

Global Security

A - Agents Protocols: Recommended setup (default in 2.73.1+)

  1. JNLP4 – NIO, encrypted via TLS
  2. Ping – test protocol
  3. OC Protocol 2 – NIO, encryption

B - Disable Enable CLI over Remoting see Remoting Connection Mode

C - Do not use Maven Integration Plugin

D - Enable Slave To Master Access Control

Agent Daemonization

Depending on the Agent Operation System:

A - Linux: Use CloudBees NIO SSH Slaves or SSH Launcher

B - Windows: Use JNLP + winsw

  • Configuration: as described on Windows JNLP Agents try to reconnect periodically.
  • Other considerations: (1) There is a flag, which allows to install the service in the interactive mode. (2) When you launch Jenkins agents on a 64bit Windows, make sure your Windows service uses 64bit Java as an executable. Otherwise you may experience issues with runaway processes as described here.

Number of executors

Usually it is recommended to set less than (Ncores-1) executors, but it greatly depends on the use-cases and job types. For instance, use single-shot 1-executor engines where possible, e.g. in Clouds, however, for more classic “bare-metal” machines and jump-hosts it is a bad idea.

Agents Monitoring

Node Table

  • Agent Monitoring Versions This plugin offers two Node Monitors: one for the version of the Remoting library, and one for the JVM. This helps be aware and possibility automatically disconnect agents that don’t comply to configuration and avoid issues. Note: JVM Version > Enable disconnect Agent when incompatibility is found
  • Percentage Disk Space Node Column Plugin This plugin shows the percentage of disk space usage column on “Manage Nodes” page.

CloudBees Monitoring Plugin

Cluster Operation

A Cluster Operation might be defined to monitor certain aspect of your agent. This script might be helpful as starting then you can adapt it to meet your needs.

Agents connected to more than one master

  • Recommendation: Share Agent/Share Cloud managed by CloudBees Operation Center.
  • For Permanent agents connected to more than one agents do use different user host as Remote FS for each different master you connect to it.
Have more questions? Submit a request


Please sign in to leave a comment.