prestodb/presto · error · PrestoException

ATOP_CANNOT_START_PROCESS_ERROR

ATOP_CANNOT_START_PROCESS_ERROR

Error message

Cannot start %s

What it means

AtopProcessFactory.create launches the external 'atop' (with a date argument) via ProcessBuilder. If Process.start() fails with IOException — typically the binary is missing or not executable — it rethrows as a PrestoException with ATOP_CANNOT_START_PROCESS_ERROR and includes the full command for diagnosis.

Source

Thrown at presto-atop/src/main/java/com/facebook/presto/atop/AtopProcessFactory.java:76

        this.executor = newFixedThreadPool(config.getConcurrentReadersPerNode(), daemonThreadsNamed("atop-" + connectorId + "executable-reader-%s"));
    }

    @Override
    public Atop create(AtopTable table, ZonedDateTime date)
    {
        checkArgument(date.getZone().getRules().equals(timeZone.getRules()), "Split date (%s) is not in the local timezone (%s)", date.getZone(), timeZone);

        ProcessBuilder processBuilder = new ProcessBuilder(executablePath);
        processBuilder.command().add("-P");
        processBuilder.command().add(table.getAtopLabel());
        processBuilder.command().add("-r");
        processBuilder.command().add(DATE_FORMATTER.format(date));
        Process process;
        try {
            process = processBuilder.start();
        }
        catch (IOException e) {
            throw new PrestoException(ATOP_CANNOT_START_PROCESS_ERROR, format("Cannot start %s", processBuilder.command()), e);
        }
        return new AtopProcess(process, readTimeout, executor);
    }

    @PreDestroy
    public void shutdown()
    {
        executor.shutdownNow();
    }

    private static final class AtopProcess
            implements Atop
    {
        private final Process process;
        private final BufferedReader underlyingReader;
        private final LineReader reader;
        private String line;

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Install atop on the coordinator/worker nodes running the atop catalog and confirm it is on PATH or set atop-binary-path in the catalog properties
  2. Verify the binary is executable (chmod +x, correct ownership)
  3. Check the full command in the error message and run it manually to reproduce the failure

Example fix

// catalog properties: before
catalog.atop.properties = (missing binary path)
// after
atop.binary-path=/usr/bin/atop
atop.max-history=1
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-flight check before starting the connector
Process p = new ProcessBuilder("which", "atop").start();
if (p.waitFor() != 0) throw new IllegalStateException("atop binary not found on PATH");

Try / catch

try { /* run atop query */ } catch (PrestoException e) { if (e.getErrorCode().getName().equals("ATOP_CANNOT_START_PROCESS_ERROR")) { /* install/fix atop binary and retry */ } throw e; }

Prevention

When it happens

Trigger: Running an atop connector catalog on a node where the atop binary is not installed, not on PATH, or not executable; filesystem permissions preventing execution.

Common situations: Deploying Presto to a cluster where only some workers have atop installed; Docker images lacking atop; wrong atop-binary-path config.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/06f20cc21ebd12d7. Report an issue: GitHub.