{"record":{"id":"5a14a82c26f4a65f","repo":"prestodb/presto","slug":"native-execution-process-launch-error","errorCode":"NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR","errorMessage":"Cannot start %s","messagePattern":"Cannot start (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"critical","filePath":"presto-spark-base/src/main/java/com/facebook/presto/spark/execution/nativeprocess/AbstractNativeProcess.java","lineNumber":232,"sourceCode":"    {\n        if (process != null) {\n            return;\n        }\n\n        ProcessBuilder processBuilder = new ProcessBuilder(getLaunchCommand());\n        processBuilder.redirectOutput(ProcessBuilder.Redirect.INHERIT);\n        customizeProcessBuilder(processBuilder);\n        try {\n            process = processBuilder.start();\n            processOutputPipe = new ProcessOutputPipe(\n                    getPid(process),\n                    process.getErrorStream(),\n                    EXECUTOR_STDERR);\n            processOutputPipe.start();\n        }\n        catch (IOException e) {\n            log.error(format(\"Cannot start %s, error message: %s\", processBuilder.command(), e.getMessage()));\n            throw new PrestoException(NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR, format(\"Cannot start %s\", processBuilder.command()), e);\n        }\n\n        if (subprocessSelectsPort) {\n            try {\n                awaitPortDiscovery();\n            }\n            catch (PrestoException e) {\n                close();\n                throw e;\n            }\n        }\n\n        try {\n            getServerInfoWithRetry().get();\n        }\n        catch (Throwable t) {\n            close();\n            throw propagateStartFailure(t);","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-spark-base/src/main/java/com/facebook/presto/spark/execution/nativeprocess/AbstractNativeProcess.java#L214-L250","documentation":"AbstractNativeProcess.start() launches the native worker executable (e.g. presto_server) via ProcessBuilder. If the OS-level process spawn fails with an IOException (binary not found, not executable, missing libraries, bad working directory), it logs the OS error message and throws PrestoException with code NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR and message 'Cannot start <command>'.","triggerScenarios":"processBuilder.start() throws IOException — the configured native executable path does not exist, lacks the execute bit, has incompatible dynamic libraries, or the working directory is unwritable/missing.","commonSituations":"presto.native-execution-process-installer / binary path misconfigured; deploying to a node without the native binary artifact; wrong architecture build (e.g. aarch64 binary on x86); missing shared libraries (glibc/openssl mismatch); noexec-mounted filesystem holding the binary.","solutions":["Read the log line 'Cannot start <command>, error message: <os message>' — it names the exact OS failure.","Verify the configured native worker binary path exists and is executable (ls -l / chmod +x).","Run the command from the SOURCE log manually on the host to expose missing-library or arch errors (ldd).","Check the working directory and any noexec mount on the binary's filesystem.","Redeploy the correct native binary artifact matching the node's OS/architecture."],"exampleFix":"// before (misconfig)\npresto.native-execution-process=/opt/wrong-path/presto_server\n// after\npresto.native-execution-process=/opt/presto-server/bin/presto_server  # exists, chmod +x, ldd-clean","handlingStrategy":"validation","validationCode":"// verify the native binary before starting the process\nPath binary = Paths.get(nativeExecutablePath);\nif (!Files.isRegularFile(binary) || !Files.isExecutable(binary)) {\n    throw new PrestoException(NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR,\n        \"Native binary missing or not executable: \" + binary);\n}","typeGuard":null,"tryCatchPattern":"try {\n    nativeProcess.start();\n} catch (PrestoException e) {\n    if (e.getErrorCode().equals(NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR)) {\n        // check OS error in logs (path, permissions, libs) and redeploy correct binary\n    }\n    throw e;\n}","preventionTips":["Checksum/verify the native binary artifact at deploy time.","Match binary architecture and glibc to target nodes.","chmod +x the binary and avoid noexec mounts for its path.","Run the launch command manually on a canary node before cluster rollout."],"tags":["native-process","process-launch","prestos-exception","spark"],"backgroundTag":"native-process-launch-error","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}