{"record":{"id":"74155f9982136758","repo":"prestodb/presto","slug":"native-execution-binary-not-exist-74155f","errorCode":"NATIVE_EXECUTION_BINARY_NOT_EXIST","errorMessage":"File doesn't exist %s","messagePattern":"File doesn't exist (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"critical","filePath":"presto-spark-base/src/main/java/com/facebook/presto/spark/execution/nativeprocess/NativeExecutionProcess.java","lineNumber":114,"sourceCode":"                workerConfigFile(configBasePath),\n                workerNodeConfigFile(configBasePath),\n                workerCatalogDir(configBasePath));\n    }\n\n    @Override\n    protected String resolveProcessWorkingPath(String path)\n    {\n        File absolutePath = new File(path);\n        // In the case of SparkEnv is not initialed (e.g. unit test), we just use current location instead of calling SparkFiles.getRootDirectory() to avoid error.\n        String rootDirectory = SparkEnv$.MODULE$.get() != null ? SparkFiles.getRootDirectory() : \".\";\n        File workingDir = new File(rootDirectory);\n        if (!absolutePath.isAbsolute()) {\n            absolutePath = new File(workingDir, path);\n        }\n\n        if (!absolutePath.exists()) {\n            log.error(format(\"File doesn't exist %s\", absolutePath.getAbsolutePath()));\n            throw new PrestoException(NATIVE_EXECUTION_BINARY_NOT_EXIST, format(\"File doesn't exist %s\", absolutePath.getAbsolutePath()));\n        }\n\n        return absolutePath.getAbsolutePath();\n    }\n\n    protected void updateWorkerProperties()\n    {\n        // Update memory properties\n        updateWorkerMemoryProperties();\n\n        // The reason we have to pick and assign the port per worker is in our prod environment,\n        // there is no port isolation among all the containers running on the same host, so we have\n        // to pick unique port per worker to avoid port collision. This config will be passed down to\n        // the native execution process eventually for process initialization.\n        workerProperty.getSystemConfig()\n                .update(NativeExecutionSystemConfig.HTTP_SERVER_HTTP_PORT, String.valueOf(getPort()));\n\n        // Update the temp storage configs for spilling and broadcast join.","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-spark-base/src/main/java/com/facebook/presto/spark/execution/nativeprocess/NativeExecutionProcess.java#L96-L132","documentation":"NativeExecutionProcess.resolveProcessWorkingPath() resolves a configured process path to an absolute path (relative paths are resolved against the process working directory). If the resolved file does not exist, it logs and throws PrestoException NATIVE_EXECUTION_BINARY_NOT_EXIST so native process startup fails fast with a clear message instead of an obscure exec failure.","triggerScenarios":"A native binary/resource path passed to NativeExecutionProcess (e.g., the native worker binary path) resolves via resolveProcessWorkingPath to a File whose exists() is false — thrown at NativeExecutionProcess.java:114.","commonSituations":"Wrong native.binary-path config value, binary not shipped/spark-added to the working directory on this node, typo in path, binary deleted by cleanup between jobs, or running outside Spark where SparkFiles root differs from expectation.","solutions":["Verify the path printed in the error message exists on the node and fix the configuration value","Distribute the native binary via spark.files / spark.archives so it lands in SparkFiles.getRootDirectory()","Make the configured path absolute if you intend it to bypass the working-dir resolution","Check node-local cleanup policies are not deleting the native binary directory"],"exampleFix":"// before\n--native-binary=presto_native  # relative, not present in working dir\n// after\n--native-binary=/opt/presto/bin/presto_native  # absolute, verified to exist","handlingStrategy":"validation","validationCode":"File binary = new File(nativeBinaryPath);\nif (!binary.isAbsolute()) binary = new File(workingDir, nativeBinaryPath);\nif (!binary.exists()) {\n    throw new IllegalStateException(\"Native binary missing: \" + binary.getAbsolutePath());\n}","typeGuard":null,"tryCatchPattern":"try {\n    processFactory.createNativeExecutionProcess(...);\n} catch (PrestoException e) {\n    if (e.getErrorCode().getName().equals(\"NATIVE_EXECUTION_BINARY_NOT_EXIST\")) {\n        // fix path config or re-distribute binary\n    }\n}","preventionTips":["Use absolute verified paths in native binary configuration","Ship binaries with spark.files/spark.archives to every node","Ensure node cleanup jobs do not remove the native binary install dir"],"tags":["file-not-found","configuration","native-execution","process-launch"],"backgroundTag":"native-binary-not-found","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"}