apache/pulsar · error · ParameterException

The specified go executable binary does not exist

Error message

The specified go executable binary does not exist

What it means

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.

Source

Thrown at pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java:740

            if (isBlank(functionConfig.getJar()) && isBlank(functionConfig.getPy())
                    && isBlank(functionConfig.getGo())) {
                throw new ParameterException("Either a Java jar or a Python file or a Go executable binary needs to"
                        + " be specified for the function. Please specify one.");
            }

            if (!isBlank(functionConfig.getJar()) && !functionConfig.getJar().startsWith("builtin://")
                    && !Utils.isFunctionPackageUrlSupported(functionConfig.getJar())
                    && !new File(functionConfig.getJar()).exists()) {
                throw new ParameterException("The specified jar file does not exist");
            }
            if (!isBlank(functionConfig.getPy()) && !Utils.isFunctionPackageUrlSupported(functionConfig.getPy())
                    && !new File(functionConfig.getPy()).exists()) {
                throw new ParameterException("The specified python file does not exist");
            }
            if (!isBlank(functionConfig.getGo()) && !Utils.isFunctionPackageUrlSupported(functionConfig.getGo())
                    && !new File(functionConfig.getGo()).exists()) {
                throw new ParameterException("The specified go executable binary does not exist");
            }
        }
    }

    @Command(description = "Run a Pulsar Function locally, rather than deploy to a Pulsar cluster)")
    class LocalRunner extends FunctionDetailsCommand {

        // TODO: this should become BookKeeper URL and it should be fetched from Pulsar client.
        // for backwards compatibility purposes
        @Option(names = "--stateStorageServiceUrl", description = "The URL for the state storage service "
                + "(the default is Apache BookKeeper)", hidden = true)
        protected String deprecatedStateStorageServiceUrl;
        @Option(names = "--state-storage-service-url", description = "The URL for the state storage service "
                + "(the default is Apache BookKeeper) #Java, Python")
        protected String stateStorageServiceUrl;
        // for backwards compatibility purposes
        @Option(names = "--brokerServiceUrl", description = "The URL for Pulsar broker", hidden = true)
        protected String deprecatedBrokerServiceUrl;

View on GitHub (pinned to 820761864e)

Solutions

  1. Compile the Go function binary first (go build) and pass the resulting executable to --go
  2. Pass the correct binary path (not the .go source); use an absolute path or package URL
  3. Verify the binary is executable and built for a compatible platform

Example fix

// before
--go ./func.go
// after
go build -o pulsar-func-go ./func.go && --go /abs/path/pulsar-func-go
Defensive patterns

Strategy: validation

Validate before calling

String go = config.getGo();
if (go != null && !Utils.isFunctionPackageUrlSupported(go) && !new File(go).exists()) {
    throw new IllegalStateException("go binary does not exist: " + go);
}
if (go != null && new File(go).exists() && !new File(go).canExecute()) {
    throw new IllegalStateException("go binary is not executable: " + go);
}

Try / catch

try { admin.functions().createFunction(...); }
catch (ParameterException e) { if (e.getMessage().equals("The specified go executable binary does not exist")) { log.error("Check --go path: {}", config.getGo()); } throw e; }

Prevention

When it happens

Trigger: `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).

Common situations: 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.

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


AI-assisted analysis of apache/pulsar@820761864e (2026-09-06). Data as JSON: /api/errors/faa4e492a60218c3. Report an issue: GitHub.