{"record":{"id":"2119785bec37f60a","repo":"prestodb/presto","slug":"native-execution-process-launch-error-211978","errorCode":"NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR","errorMessage":"Failed to start metadata sidecar at %s","messagePattern":"Failed to start metadata sidecar at (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"critical","filePath":"presto-spark-base/src/main/java/com/facebook/presto/spark/execution/nativeprocess/MetadataSidecarProcess.java","lineNumber":171,"sourceCode":"                \"storage_user_name=\" + storageUserName,\n                \"storage_service_name=\" + storageServiceName,\n                \"experimental.spiller-spill-path=\" + configBasePath.resolve(\"spill\").toAbsolutePath());\n    }\n\n    private Iterable<String> buildNodeConfigLines()\n    {\n        return Arrays.asList(\n                \"node.environment=presto-spark-driver-sidecar\",\n                \"node.internal-address=\" + SIDECAR_NODE_INTERNAL_ADDRESS,\n                \"node.location=presto-spark-driver-sidecar\",\n                \"node.id=\" + UUID.randomUUID());\n    }\n\n    @Override\n    protected RuntimeException propagateStartFailure(Throwable t)\n    {\n        // Driver-side: fail the Spark application, don't trigger executor failover.\n        throw new PrestoException(\n                NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR,\n                format(\"Failed to start metadata sidecar at %s\", getLocation()),\n                t);\n    }\n\n    /**\n     * Writes config.properties / node.properties into the given directory using the same\n     * content {@link #populateConfigurationFiles} writes. Exposed for unit tests that want\n     * to verify the file layout without spawning a process.\n     */\n    void writeConfigsForTest(Path configBasePath)\n            throws IOException\n    {\n        populateConfigurationFiles(configBasePath);\n    }\n}\n","sourceCodeStart":153,"sourceCodeEnd":188,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-spark-base/src/main/java/com/facebook/presto/spark/execution/nativeprocess/MetadataSidecarProcess.java#L153-L188","documentation":"MetadataSidecarProcess extends the native process launcher; propagateStartFailure converts any Throwable observed while starting the sidecar process into a PrestoException with NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR. Per the comment, this is thrown on the driver side to fail the Spark application rather than triggering executor failover.","triggerScenarios":"The metadata sidecar process fails during its startup sequence (process exits early, fails readiness handshake, or start() observes an exception); propagateStartFailure(t) wraps it, formatting the message with the process location.","commonSituations":"Missing or non-executable sidecar binary, bad sidecar command-line/working directory, port conflicts for the sidecar's HTTP server, missing native runtime dependencies (libraries, temp dirs), or the sidecar crashing at boot.","solutions":["Inspect the cause (t) attached to this exception — it shows the actual launch/startup failure","Verify the sidecar binary path is valid and executable in the Spark driver environment (see resolveProcessWorkingPath)","Check that the sidecar port is free and not blocked by firewall","Confirm native runtime dependencies (shared libraries, temp storage) exist on the driver host"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"File binary = new File(sidecarBinaryPath);\nif (!binary.exists() || !binary.canExecute()) {\n    throw new IllegalStateException(\"Sidecar binary missing or not executable: \" + sidecarBinaryPath);\n}","typeGuard":null,"tryCatchPattern":"try {\n    sidecarFactory.getOrStart();\n} catch (PrestoException e) {\n    // inspect e.getCause() for the real launch failure before failing the app\n}","preventionTips":["Verify sidecar binary existence and execute permission on driver hosts before app start","Reserve the sidecar port and check availability during deployment","Bake native runtime dependencies into the driver image"],"tags":["native-execution","process-launch","sidecar","spark-driver"],"backgroundTag":"native-process-launch-failed","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"}