Which of the following is NOT a common reason for a Jenkins agent to go offline?
Think about what causes communication failure versus configuration mismatches.
Incorrect labels do not cause the agent to go offline; they only affect job assignment. Offline status usually results from communication or resource issues.
What is the output of the following Jenkins CLI command when the agent named 'build-agent-1' is offline?
java -jar jenkins-cli.jar -s http://jenkins.example.com/ list-agents
Offline agents are usually marked explicitly in the list.
The CLI lists agents with their status; offline agents are shown with '(offline)'.
Which configuration snippet in the Jenkins agent launch method ensures the agent automatically tries to reconnect if disconnected?
Look for options that control retry or reconnect behavior.
The '-retry 5' option tells the agent to retry connection 5 times automatically.
A Jenkins agent suddenly goes offline. The agent machine's firewall was recently updated. Which troubleshooting step is most effective to confirm if the firewall is causing the offline status?
Think about isolating the firewall as the cause.
Disabling the firewall temporarily helps confirm if it blocks the agent connection.
In a Jenkins pipeline, you want to ensure that if the assigned agent goes offline during a build, the pipeline automatically retries on another available agent. Which pipeline script snippet correctly implements this behavior?
Look for retry inside the build steps to retry on failure.
Placing retry inside the steps block retries the build steps on failure, including agent offline errors, on another agent matching the label.