{"record":{"id":"824d01951aa22e09","repo":"apache/pulsar","slug":"cluster-cluster-does-not-exist-824d01","errorCode":null,"errorMessage":"Cluster ${cluster} does not exist.","messagePattern":"Cluster (.+?) does not exist\\.","errorType":"http","errorClass":"RestException","httpStatus":412,"severity":"error","filePath":"pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java","lineNumber":1177,"sourceCode":"\n    public CompletableFuture<Void> validatePoliciesReadOnlyAccessAsync() {\n        return namespaceResources().getPoliciesReadOnlyAsync().thenAccept(readOnly -> {\n            if (readOnly) {\n                    log.debug(\"Policies are read-only. Broker cannot do read-write operations\");\n                                throw new RestException(Status.FORBIDDEN,\n                                        \"Broker is forbidden to do read-write operations\");\n            }\n        });\n    }\n\n    protected CompletableFuture<Void> hasActiveNamespace(String tenant) {\n        return tenantResources().hasActiveNamespace(tenant);\n    }\n\n    protected void validateClusterExists(String cluster) {\n        try {\n            if (!clusterResources().clusterExists(cluster)) {\n                throw new RestException(Status.PRECONDITION_FAILED, \"Cluster \" + cluster + \" does not exist.\");\n            }\n        } catch (Exception e) {\n            throw new RestException(e);\n        }\n    }\n\n    /**\n     * Redirect the call to the specified broker.\n     *\n     * @param brokerId broker's id (lookup service address)\n     */\n    protected CompletableFuture<Void> maybeRedirectToBroker(String brokerId) {\n        // backwards compatibility\n        String cleanedBrokerId = brokerId.replaceFirst(\"http[s]?://\", \"\");\n        if (pulsar.getBrokerId().equals(cleanedBrokerId)\n                // backwards compatibility\n                || (\"http://\" + cleanedBrokerId).equals(pulsar().getWebServiceAddress())\n                || (\"https://\" + cleanedBrokerId).equals(pulsar().getWebServiceAddressTls())) {","sourceCodeStart":1159,"sourceCodeEnd":1195,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java#L1159-L1195","documentation":"PulsarWebResource namespace validation: the cluster named in the namespace (or request) is not registered in this Pulsar instance's cluster list, so the operation cannot proceed against an unknown cluster.","triggerScenarios":"Thrown at pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java:1177 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Register the cluster (pulsar-admin clusters create) or fix its name","Check replicationClusters entries for stale cluster names"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}