{"record":{"id":"06f20cc21ebd12d7","repo":"prestodb/presto","slug":"atop-cannot-start-process-error","errorCode":"ATOP_CANNOT_START_PROCESS_ERROR","errorMessage":"Cannot start %s","messagePattern":"Cannot start (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-atop/src/main/java/com/facebook/presto/atop/AtopProcessFactory.java","lineNumber":76,"sourceCode":"        this.executor = newFixedThreadPool(config.getConcurrentReadersPerNode(), daemonThreadsNamed(\"atop-\" + connectorId + \"executable-reader-%s\"));\n    }\n\n    @Override\n    public Atop create(AtopTable table, ZonedDateTime date)\n    {\n        checkArgument(date.getZone().getRules().equals(timeZone.getRules()), \"Split date (%s) is not in the local timezone (%s)\", date.getZone(), timeZone);\n\n        ProcessBuilder processBuilder = new ProcessBuilder(executablePath);\n        processBuilder.command().add(\"-P\");\n        processBuilder.command().add(table.getAtopLabel());\n        processBuilder.command().add(\"-r\");\n        processBuilder.command().add(DATE_FORMATTER.format(date));\n        Process process;\n        try {\n            process = processBuilder.start();\n        }\n        catch (IOException e) {\n            throw new PrestoException(ATOP_CANNOT_START_PROCESS_ERROR, format(\"Cannot start %s\", processBuilder.command()), e);\n        }\n        return new AtopProcess(process, readTimeout, executor);\n    }\n\n    @PreDestroy\n    public void shutdown()\n    {\n        executor.shutdownNow();\n    }\n\n    private static final class AtopProcess\n            implements Atop\n    {\n        private final Process process;\n        private final BufferedReader underlyingReader;\n        private final LineReader reader;\n        private String line;\n","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-atop/src/main/java/com/facebook/presto/atop/AtopProcessFactory.java#L58-L94","documentation":"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.","triggerScenarios":"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.","commonSituations":"Deploying Presto to a cluster where only some workers have atop installed; Docker images lacking atop; wrong atop-binary-path config.","solutions":["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","Verify the binary is executable (chmod +x, correct ownership)","Check the full command in the error message and run it manually to reproduce the failure"],"exampleFix":"// catalog properties: before\ncatalog.atop.properties = (missing binary path)\n// after\natop.binary-path=/usr/bin/atop\natop.max-history=1","handlingStrategy":"try-catch","validationCode":"// Pre-flight check before starting the connector\nProcess p = new ProcessBuilder(\"which\", \"atop\").start();\nif (p.waitFor() != 0) throw new IllegalStateException(\"atop binary not found on PATH\");","typeGuard":null,"tryCatchPattern":"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; }","preventionTips":["Install atop on all nodes serving the atop catalog","Set atop.binary-path explicitly in catalog properties","Verify binary permissions in container images"],"tags":["atop","process-execution","io"],"backgroundTag":"process-start-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"}