kestra-io/kestra · critical · RuntimeException
{} not started in time
Error message
{} not started in time What it means
Thrown by StandAloneRunner when one or more embedded services (Controller, Worker, Scheduler, Indexer, SystemWorker) fail to reach RUNNING/MAINTENANCE state within the configured startup timeout (default 1 minute via ServerConfig.Standalone.Running.timeout). The message lists each lagging service with its simple class name and current ServiceState. It is a bare RuntimeException wrapping a ConditionTimeoutException from Awaitility.
Source
Thrown at cli/src/main/java/io/kestra/cli/StandAloneRunner.java:111
poolExecutor.execute(scheduler);
servers.add(scheduler);
}
if (indexerEnabled) {
Indexer indexer = indexerProvider.get();
poolExecutor.execute(indexer);
servers.add(indexer);
}
// start the embedded SystemWorker (always present in STANDALONE mode)
SystemWorker systemWorker = systemWorkerProvider.get();
poolExecutor.execute(systemWorker::start);
servers.add(systemWorker);
try {
Await.await().atMost(getRunningTimeout()).until(() -> servers.stream().allMatch(StandAloneRunner::isStarted));
} catch (ConditionTimeoutException e) {
throw new RuntimeException(
servers.stream().filter(s -> !isStarted(s))
.map(s -> s.getClass().getSimpleName() + " (state: " + s.getState() + ")")
.toList() + " not started in time"
);
}
}
/**
* A service is only considered started once it reached RUNNING (or MAINTENANCE).
*/
private static boolean isStarted(Service service) {
Service.ServiceState state = service.getState();
return Service.ServiceState.RUNNING == state || Service.ServiceState.MAINTENANCE == state;
}
private Duration getRunningTimeout() {
return Optional.ofNullable(serverConfig.standalone())
.map(ServerConfig.Standalone::running)View on GitHub (pinned to 823fada927)
Solutions
- Read the listed service(s) and their ServiceState in the message — that names which component is stuck.
- Check the logs above this exception for the underlying cause (DB connection refused, port bind failure, plugin load error).
- Verify all required backends (database, queue, search) are reachable and credentials are valid.
- Increase kestra.server.standalone.running.timeout if the environment is legitimately slow (e.g. cold H2/Postgres).
- Ensure no port conflict (default 8080) and that enough CPU/heap is available for startup.
Example fix
// before: default 1 minute may be too short on cold start Await.await().atMost(getRunningTimeout()).until(...); // after: raise the timeout in application.yml # kestra: # server: # standalone: # running: # timeout: PT2M
Defensive patterns
Strategy: try-catch
Validate before calling
// Before run(): probe required backends
if (!isDbReachable(datasourceUrl)) { throw new IllegalStateException('DB unreachable'); } Try / catch
try {
runner.run();
} catch (RuntimeException e) {
if (e.getMessage() != null && e.getMessage().endsWith(" not started in time")) {
log.error('Startup timed out; stuck services: {}', e.getMessage());
dumpServiceStates();
}
throw e;
} Prevention
- Verify DB/queue/search connectivity before launching standalone.
- Tune kestra.server.standalone.running.timeout to the environment's cold-start budget.
- Watch startup logs for the first failing service; the aggregate message hides the root cause.
- Reserve enough CPU/heap so services reach RUNNING within the timeout.
When it happens
Trigger: StandAloneRunner.run() submits all enabled services to the pool, then Await.await().atMost(timeout).until(allMatch(isStarted)) times out; the catch builds a list of services where isStarted is false and throws.
Common situations: Database (JDBC queue / repository) unreachable or slow to connect, Kafka/Elasticsearch backend down, port conflict on the worker/controller, a plugin failing during initialization blocks a service thread, low resources (CPU/memory) on cold start, or the standalone running timeout is set too low.
Related errors
- Invalid flow path
- No log store configured through the application property '%s
- Migration lock is held by another process. Another instance
- Scheme not supported: {}
- Both username and password must be provided if either is pre
AI-assisted analysis of kestra-io/kestra@823fada927 (2026-08-14).
Data as JSON: /api/errors/39daa82d0af36731.
Report an issue: GitHub.