CJE Distributed Builds & Agent Management 1 — Questions and Answers
Question 1: What is the default TCP port used by Jenkins agents when connecting to the controller via the inbound agent (JNLP) protocol?
- 8080
- 50000 (Correct answer)
- 22
- 443
Correct answer: 50000
Jenkins agents using the JNLP/TCP inbound protocol connect to the Jenkins controller on port 50000 by default, separate from the web UI port 8080.
Question 2: What is the primary purpose of assigning a 'label' to a Jenkins agent?
- To provide a human-readable display name for the agent in the UI
- To group agents so that jobs can target nodes with specific capabilities or OS types (Correct answer)
- To set the job execution priority on that agent
- To encrypt communications between the agent and the controller
Correct answer: To group agents so that jobs can target nodes with specific capabilities or OS types
Labels allow jobs to specify which agents they can run on using the 'node' or 'agent' directive, enabling routing to agents with specific capabilities such as 'linux', 'docker', or 'gpu'.
Question 3: Which Jenkins agent connection method should be used when a firewall prevents the controller from initiating a connection to the agent?
- SSH Launch Method
- Launch agent via execution of command on controller
- Launch agent by connecting it to the controller (Inbound/JNLP) (Correct answer)
- Windows Management Instrumentation (WMI)
Correct answer: Launch agent by connecting it to the controller (Inbound/JNLP)
The inbound/JNLP method allows the agent to initiate the TCP connection to the controller, bypassing firewall rules that block inbound connections from the controller to the agent.
Question 4: What does the '# of executors' setting on a Jenkins node control?
- The number of jobs that can be queued for that node
- The number of concurrent builds that can run simultaneously on that node (Correct answer)
- The maximum number of plugin installations on that node
- The number of workspaces retained on that node
Correct answer: The number of concurrent builds that can run simultaneously on that node
The number of executors defines how many concurrent build processes can run simultaneously on a specific node, directly controlling its parallel build capacity.
Question 5: What is the 'Remote root directory' setting when configuring a Jenkins agent?
- The URL of the agent's web management interface
- The directory on the agent machine where Jenkins stores workspaces, caches, and build data (Correct answer)
- The path to the Jenkins home directory on the controller
- The directory on the agent containing SSL certificates for secure communication
Correct answer: The directory on the agent machine where Jenkins stores workspaces, caches, and build data
The remote root directory is the working directory on the agent machine where Jenkins creates per-job workspaces and stores temporary files needed during builds.
Question 6: What does the 'Availability' setting for a Jenkins agent control?
- Which user groups are permitted to run builds on the agent
- When the agent should be online — always, on a schedule, or on demand (Correct answer)
- The network bandwidth available to the agent
- The disk space threshold before the agent goes offline
Correct answer: When the agent should be online — always, on a schedule, or on demand
The Availability setting determines the agent's online policy: options include keeping it online at all times, bringing it online according to a schedule, or only when build demand requires it.
Question 7: Which plugin enables Jenkins to dynamically provision and terminate Amazon EC2 instances as build agents?
- Docker Pipeline Plugin
- Kubernetes Plugin
- Amazon EC2 Plugin (Correct answer)
- CloudBees AWS Credentials Plugin
Correct answer: Amazon EC2 Plugin
The Amazon EC2 Plugin allows Jenkins to automatically start EC2 instances as agents when build demand increases and terminate them when they are no longer needed.
What is the default TCP port used by Jenkins agents when connecting to the controller via the inbound agent (JNLP) protocol?