{"record":{"id":"31874bb9eaca3bad","repo":"kestra-io/kestra","slug":"invalid-flow-path-31874b","errorCode":null,"errorMessage":"Invalid flow path","messagePattern":"Invalid flow path","errorType":"validation","errorClass":"CommandLine.ParameterException","httpStatus":null,"severity":"error","filePath":"cli/src/main/java/io/kestra/cli/commands/servers/StandAloneCommand.java","lineNumber":117,"sourceCode":"    public Integer call() throws Exception {\n        this.ignoreExecutionService.get().setIgnoredExecutions(ignoreExecutions);\n        this.ignoreExecutionService.get().setIgnoredFlows(ignoreFlows);\n        this.ignoreExecutionService.get().setIgnoredNamespaces(ignoreNamespaces);\n        this.ignoreExecutionService.get().setIgnoredTenants(ignoreTenants);\n        this.ignoreExecutionService.get().setIgnoredIndexerRecords(ignoreIndexerRecords);\n        this.ignoreExecutionService.get().setIgnoredQueueRecords(ignoreQueueRecords);\n\n        KestraContext.getContext().injectWorkerConfigs(workerThread);\n\n        if (tenantId != null) {\n            tenantIdSelectorService.get().createTenant(tenantId);\n        }\n\n        if (flowPath != null) {\n            try {\n                localFlowRepositoryLoader.get().load(tenantIdSelectorService.get().getTenantId(this.tenantId), this.flowPath);\n            } catch (IOException e) {\n                throw new CommandLine.ParameterException(this.spec.commandLine(), \"Invalid flow path\", e);\n            }\n        }\n\n        super.call();\n\n        try (StandAloneRunner standAloneRunner = standAloneRunnerProvider.get()) {\n\n            if (this.workerThread == 0) {\n                standAloneRunner.setWorkerEnabled(false);\n            } else {\n                standAloneRunner.setWorkerThread(this.workerThread);\n            }\n\n            if (this.controllerDisabled) {\n                standAloneRunner.setControllerEnabled(false);\n            }\n\n            if (this.indexerDisabled) {","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/kestra-io/kestra/blob/823fada9274c4f9c251ea0a516460a4f7d958032/cli/src/main/java/io/kestra/cli/commands/servers/StandAloneCommand.java#L99-L135","documentation":"Thrown by 'kestra server standalone' when loading --flow-path fails. Same logic and message as the executor command: localFlowRepositoryLoader.load throws IOException, wrapped as a picocli ParameterException 'Invalid flow path' with the IOException as cause. Fires before super.call() and before StandAloneRunner starts.","triggerScenarios":"User starts standalone with --flow-path <p>; localFlowRepositoryLoader.load(tenantId, p) raises IOException; catch rethrows CommandLine.ParameterException(spec, \"Invalid flow path\", e).","commonSituations":"Flow file missing/unreadable, malformed YAML, wrong working directory for a relative path, or permissions issue on a mounted volume.","solutions":["Use an absolute path for --flow-path.","Confirm the file is readable by the Kestra process user.","Pre-validate the flow with 'kestra flow validate'.","Read the IOException cause in the stack trace for the exact reason."],"exampleFix":"# before\nkestra server standalone --flow-path flows\n# after\nkestra server standalone --flow-path /opt/kestra/flows/myflow.yaml","handlingStrategy":"try-catch","validationCode":"Path p = Path.of(flowPath);\nif (!Files.exists(p) || !Files.isReadable(p)) {\n  throw new IllegalArgumentException('Flow path does not exist or is not readable: ' + p);\n}","typeGuard":null,"tryCatchPattern":"try {\n  localFlowRepositoryLoader.get().load(tenantId, flowPath);\n} catch (IOException e) {\n  throw new CommandLine.ParameterException(this.spec.commandLine(), \"Invalid flow path\", e);\n}","preventionTips":["Use absolute paths for --flow-path.","Pre-validate the flow file before standalone startup.","Check filesystem permissions on mounted volumes."],"tags":["cli","standalone","flow-load","usage","io"],"backgroundTag":null,"analyzedSha":"823fada9274c4f9c251ea0a516460a4f7d958032","analyzedAt":"2026-08-14T06:15:17.947Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}