theonedev/onedev · error · ExplicitException
Specified job executor '" + jobExecutorName + "' is disabled
Error message
Specified job executor '" + jobExecutorName + "' is disabled
What it means
Thrown by DefaultJobService.getJobExecutor when the build spec names a specific job executor (via jobExecutorName) that exists in the server settings but has its isEnabled flag set to false. OneDev refuses to run jobs on disabled executors even when they are explicitly named. It is an ExplicitException surfaced as the build's failure reason.
Source
Thrown at server-core/src/main/java/io/onedev/server/job/DefaultJobService.java:523
return executor.isApplicable(sourceContext) && executor.isApplicable(targetContext);
} else {
return false;
}
} else {
return executor.isApplicable(new JobMatchContext(
build.getProject(), null, build.getCommitId(),
build.getJobName()));
}
}
private JobExecutor getJobExecutor(Build build, @Nullable String jobExecutorName, TaskLogger jobLogger) {
if (jobExecutorName != null) {
var jobExecutor = settingService.getJobExecutors().stream()
.filter(it -> it.getName().equals(jobExecutorName))
.findFirst()
.orElseThrow(() -> new ExplicitException("Unable to find specified job executor '" + jobExecutorName + "'"));
if (!jobExecutor.isEnabled())
throw new ExplicitException("Specified job executor '" + jobExecutorName + "' is disabled");
else if (!isApplicable(build, jobExecutor))
throw new ExplicitException("Specified job executor '" + jobExecutorName + "' is not applicable for current job");
else
return jobExecutor;
} else {
if (!settingService.getJobExecutors().isEmpty()) {
return settingService.getJobExecutors().stream()
.filter(it -> it.isEnabled() && isApplicable(build, it))
.findFirst()
.orElseThrow(() -> new ExplicitException("No applicable job executor"));
} else {
jobLogger.log("No job executor defined, auto-discovering...");
List<JobExecutorDiscoverer> discoverers = new ArrayList<>(OneDev.getExtensions(JobExecutorDiscoverer.class));
discoverers.sort(Comparator.comparing(JobExecutorDiscoverer::getOrder));
for (var discoverer : discoverers) {
JobExecutor jobExecutor = discoverer.discover();
if (jobExecutor != null) {
jobExecutor.setName("auto-discovered");View on GitHub (pinned to d44925c47c)
Solutions
- Re-enable the named executor in Server Setting > Job Executors.
- Change the job's executor name in the build spec to an enabled executor.
- Remove the explicit executor name so OneDev auto-discovers an applicable enabled executor.
- If the executor was disabled intentionally, migrate the job to an alternative runner type.
Example fix
// before (.onedev-buildspec.yml)
jobs:
- name: Build
executor:
name: My Disabled Docker Executor
// after: either enable it in admin settings, or point to an enabled one
jobs:
- name: Build
executor:
name: Docker Executor Defensive patterns
Strategy: validation
Validate before calling
// Java, before submitting a job with explicit executor
JobExecutorSetting exec = OneDev.getInstance(SettingService.class)
.getJobExecutors().stream()
.filter(it -> it.getName().equals("My Executor"))
.findFirst().orElse(null);
if (exec == null || !exec.isEnabled()) {
throw new IllegalStateException("Executor 'My Executor' missing or disabled");
} Try / catch
try {
jobService.submit(build);
} catch (ExplicitException e) {
if (e.getMessage().contains("is disabled")) {
// fall back to auto-discovery by removing executor name from spec
}
} Prevention
- Pin executor names in specs only after confirming they are enabled in server settings
- Re-check specs after admin maintenance windows that disable executors
- Prefer omitting the executor name and letting auto-discovery choose an enabled executor
When it happens
Trigger: A job spec sets 'executor: <name>' (jobExecutorName) where <name> matches a configured executor in Server Config > Job Executors whose Enabled checkbox is unchecked; then submitting or running the build triggers jobExecutor -> getJobExecutor.
Common situations: Admin disabled a Docker/Kubernetes executor during maintenance; spec written before the executor was disabled; executor temporarily disabled to stop runaway resource usage; specs copied from another instance where the executor is enabled.
Related errors
- Specified job executor '" + jobExecutorName + "' is not appl
- No applicable executor discovered for current job
- Duplicate dependency build '" + dependencyBuild.getReference
- Unrecognized command:
- Unable to discover cluster ip from database connection url:
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/e23df21c6af22b4c.
Report an issue: GitHub.