Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins job keeps waiting for next available executor forever (user dependent)

Tags:

jenkins

Depending on the user who triggers the build, the build starts immediately or stays in the queue forever waiting for next available executor. The build node is completely free. The number of executors is 6.

I already tried:

  • Disabling the blocking jobs
  • Configuring no blocking jobs at all

The multijob project has project-based security, which allows the users to build, cancel, read and see the workspace. The current configuration of my jobs already worked in the past. The jenkins master is not the node for which a free executor is being waited (the job is tied to a slave). The job is a MultiJob Project and starts many other jobs.

like image 944
Arturo Gonzalez Avatar asked Nov 21 '16 09:11

Arturo Gonzalez


People also ask

How can you avoid the waiting time for the triggered jobs in Jenkins?

You can set timeout duration for a particular project by defining a global timeout variable and using it in your job. Go to Manage Jenkins > Configure System and in Global Properties check Environment Variables , then add a variable (ex: EXEC_TIME_OUT) to it and assign the timeout amount.

Why Jenkins build taking too long?

Fortunately, the most common reasons your Jenkins instance is slow are easy to diagnose and correct: Non-performant plugins. Poorly tuned JVM arguments. Non-optimal garbage collection.

What is executor in Jenkins?

A Jenkins executor is one of the basic building blocks which allow a build to run on a node/agent (e.g. build server). Think of an executor as a single "process ID", or as the basic unit of resource that Jenkins executes on your machine to run a build.


1 Answers

The problem was solved. The cause of the problem was the installation of the "Authorize Project" plugin" and the selection of "Run as User who Triggered the Build" as Strategy. Changing it to "Run as SYSTEM" solved the problem. The configuration of this plugin is done under "Manage Jenkins > Configure Global Security > Access Control for Builds"

like image 128
Arturo Gonzalez Avatar answered Oct 19 '22 12:10

Arturo Gonzalez