prestodb/presto · error · PrestoException
NATIVE_EXECUTION_BINARY_NOT_EXIST
NATIVE_EXECUTION_BINARY_NOT_EXIST
Error message
File doesn't exist %s
What it means
Thrown by AbstractNativeProcess.resolveProcessWorkingPath (used via configPathStr) when a required native-execution configuration file path does not exist on the local filesystem. The method resolves relative paths against the current directory and fails fast with NATIVE_EXECUTION_BINARY_NOT_EXIST so the native process is never launched with a missing file.
Source
Thrown at presto-spark-base/src/main/java/com/facebook/presto/spark/execution/nativeprocess/AbstractNativeProcess.java:349
*/
protected abstract void populateConfigurationFiles(Path configBasePath)
throws IOException;
/**
* Resolves a path used for binary or config-dir lookup. Default implementation
* treats the path as an absolute filesystem path and verifies the file exists.
* Subclasses may override (e.g. to resolve relative paths against
* {@code SparkFiles.getRootDirectory()}).
*/
protected String resolveProcessWorkingPath(String path)
{
File absolutePath = new File(path);
if (!absolutePath.isAbsolute()) {
absolutePath = new File(".", path);
}
if (!absolutePath.exists()) {
log.error(format("File doesn't exist %s", absolutePath.getAbsolutePath()));
throw new PrestoException(NATIVE_EXECUTION_BINARY_NOT_EXIST, format("File doesn't exist %s", absolutePath.getAbsolutePath()));
}
return absolutePath.getAbsolutePath();
}
@VisibleForTesting
public SettableFuture<ServerInfo> getServerInfoWithRetry()
{
SettableFuture<ServerInfo> future = SettableFuture.create();
doGetServerInfo(future);
return future;
}
/**
* Triggers coredump (also terminates the process).
*/
public void terminateWithCore(Duration timeout)
{
// chosen as the least likely core signal to occur naturally (invalid sys call)View on GitHub (pinned to 55bb57d202)
Solutions
- Verify the path exists on the exact host that launches the native process (Spark executor/driver), not just the client machine
- Use absolute paths in configuration instead of relying on the current working directory
- If packaging in a container, confirm the config file is copied/mounted into the image at the configured path
- Check permissions so the process user can stat/read the file (a permission issue can look like a missing file in some setups)
- Correct the config property (e.g. native.process.max-error-duration file paths in Spark conf) to point at the deployed location
Example fix
// before
String config = "conf/native/velox.properties"; // relative, wrong CWD
String resolved = process.configPathStr(config);
// after
String config = "/opt/presto/conf/native/velox.properties"; // absolute path
if (!new File(config).exists()) {
throw new IllegalStateException("Native config missing before launch: " + config);
}
String resolved = process.configPathStr(config); Defensive patterns
Strategy: validation
Validate before calling
public static void requireNativeFiles(String... paths) {
for (String p : paths) {
File f = new File(p);
File abs = f.isAbsolute() ? f : new File(".", p);
if (!abs.exists()) {
throw new IllegalStateException("Required native file missing: " + abs.getAbsolutePath());
}
}
}
// call before constructing the process:
requireNativeFiles(nativeBinaryPath, veloxConfigPath, catalogConfigPath); Try / catch
try {
String resolved = process.configPathStr(path);
} catch (PrestoException e) {
if (e.getErrorCode().getName().equals("NATIVE_EXECUTION_BINARY_NOT_EXIST")) {
log.error("Missing native file, cwd=%s path=%s", new File(".").getAbsolutePath(), path);
// fix config or fail fast before launch
}
} Prevention
- Always configure absolute paths for native binaries and config files
- Validate all configured paths exist on the launching host (executor/driver) at startup
- Bake native configs into container images and verify with a startup check
- Log the process working directory alongside the error to catch CWD-relative path mistakes
When it happens
Trigger: Calling configPathStr()/resolveProcessWorkingPath() with a path string whose resolved absolute File.exists() is false — e.g. passing a bad config path or binary path when constructing the native process arguments.
Common situations: Typo in the config file path; file present on the coordinator but not on the Spark executor/driver host; container image missing the config; relative path with a different working directory than expected; path not mounted in Kubernetes/Docker.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Failed to acquire port on host
- GENERIC_INTERNAL_ERROR
- NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR
- NATIVE_EXECUTION_PROCESS_LAUNCH_ERROR
- NATIVE_EXECUTION_BINARY_NOT_EXIST
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/3f474d28ce0daf32.
Report an issue: GitHub.