{"record":{"id":"faa4e492a60218c3","repo":"apache/pulsar","slug":"the-specified-go-executable-binary-does-not-exist","errorCode":null,"errorMessage":"The specified go executable binary does not exist","messagePattern":"The specified go executable binary does not exist","errorType":"validation","errorClass":"ParameterException","httpStatus":null,"severity":"error","filePath":"pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java","lineNumber":740,"sourceCode":"\n            if (isBlank(functionConfig.getJar()) && isBlank(functionConfig.getPy())\n                    && isBlank(functionConfig.getGo())) {\n                throw new ParameterException(\"Either a Java jar or a Python file or a Go executable binary needs to\"\n                        + \" be specified for the function. Please specify one.\");\n            }\n\n            if (!isBlank(functionConfig.getJar()) && !functionConfig.getJar().startsWith(\"builtin://\")\n                    && !Utils.isFunctionPackageUrlSupported(functionConfig.getJar())\n                    && !new File(functionConfig.getJar()).exists()) {\n                throw new ParameterException(\"The specified jar file does not exist\");\n            }\n            if (!isBlank(functionConfig.getPy()) && !Utils.isFunctionPackageUrlSupported(functionConfig.getPy())\n                    && !new File(functionConfig.getPy()).exists()) {\n                throw new ParameterException(\"The specified python file does not exist\");\n            }\n            if (!isBlank(functionConfig.getGo()) && !Utils.isFunctionPackageUrlSupported(functionConfig.getGo())\n                    && !new File(functionConfig.getGo()).exists()) {\n                throw new ParameterException(\"The specified go executable binary does not exist\");\n            }\n        }\n    }\n\n    @Command(description = \"Run a Pulsar Function locally, rather than deploy to a Pulsar cluster)\")\n    class LocalRunner extends FunctionDetailsCommand {\n\n        // TODO: this should become BookKeeper URL and it should be fetched from Pulsar client.\n        // for backwards compatibility purposes\n        @Option(names = \"--stateStorageServiceUrl\", description = \"The URL for the state storage service \"\n                + \"(the default is Apache BookKeeper)\", hidden = true)\n        protected String deprecatedStateStorageServiceUrl;\n        @Option(names = \"--state-storage-service-url\", description = \"The URL for the state storage service \"\n                + \"(the default is Apache BookKeeper) #Java, Python\")\n        protected String stateStorageServiceUrl;\n        // for backwards compatibility purposes\n        @Option(names = \"--brokerServiceUrl\", description = \"The URL for Pulsar broker\", hidden = true)\n        protected String deprecatedBrokerServiceUrl;","sourceCodeStart":722,"sourceCodeEnd":758,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java#L722-L758","documentation":"Thrown when --go is set to a local path that does not exist and is not a supported package URL. Go Pulsar Functions are deployed as pre-built executables, so the CLI verifies the binary exists before submitting.","triggerScenarios":"`pulsar-admin functions create/update/localrun` with --go <path> where the path is not a supported package URL and new File(path).exists() is false (CmdFunctions.java:740).","commonSituations":"Pointing at the Go source file instead of the compiled binary; forgetting to run `go build` (or cross-compiling for the wrong OS/arch); path typo or wrong working directory; binary cleaned by CI before upload.","solutions":["Compile the Go function binary first (go build) and pass the resulting executable to --go","Pass the correct binary path (not the .go source); use an absolute path or package URL","Verify the binary is executable and built for a compatible platform"],"exampleFix":"// before\n--go ./func.go\n// after\ngo build -o pulsar-func-go ./func.go && --go /abs/path/pulsar-func-go","handlingStrategy":"validation","validationCode":"String go = config.getGo();\nif (go != null && !Utils.isFunctionPackageUrlSupported(go) && !new File(go).exists()) {\n    throw new IllegalStateException(\"go binary does not exist: \" + go);\n}\nif (go != null && new File(go).exists() && !new File(go).canExecute()) {\n    throw new IllegalStateException(\"go binary is not executable: \" + go);\n}","typeGuard":null,"tryCatchPattern":"try { admin.functions().createFunction(...); }\ncatch (ParameterException e) { if (e.getMessage().equals(\"The specified go executable binary does not exist\")) { log.error(\"Check --go path: {}\", config.getGo()); } throw e; }","preventionTips":["Run `go build` before deploying Go functions","Pass the compiled binary path, never the .go source","Ensure the binary is executable (chmod +x) and built for the right platform"],"tags":["cli","filesystem","go","pulsar-functions"],"backgroundTag":"file-not-found","analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}