Build hangs at "Waiting for next available executor" even though agents look idle.
BeginnerTroubleshootingJenkins Build and Agent Failures
Answer
Likely causes → Label expression matches no online node; agent is offline; node usage restricted; executors set to 0; the label has a typo.
Diagnose → Check Manage Jenkins > Nodes for online status and labels; hover the queue item for "Why am I in the queue".
Fix → Fix the label, bring the agent online, or add capacity.
Prevent → Alert on queue items older than N minutes and on offline agents.
More on Jenkins Build and Agent Failures
Jenkins console shows `sh: 1: mvn: not found` on one agent only.Beginner`java.lang.NoSuchMethodError: No such DSL method 'xyz' found among steps`.Beginner`WorkflowScript: 12: Expected a step @ line 12, column 5.` in a Declarative pipeline.Beginner`hudson.AbortException: script returned exit code 1` with nothing useful above it.Beginner`Cannot run program "nohup" (in directory ...): error=2, No such file or directory` on a Windows agent.IntermediateBuild fails with `java.io.NotSerializableException: java.util.regex.Matcher`.Advanced