apache/pulsar · error · RestException

ResourceGroup does not exist

Error message

ResourceGroup does not exist

What it means

internalSetNamespaceResourceGroup checks that the named resource group exists before binding it to the namespace; the lookup failed, so the assignment is rejected because the policy would reference a nonexistent resource group.

Source

Thrown at pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java:3169

       } catch (Exception e) {
           Throwable cause = e.getCause();
           if (!(cause instanceof RestException)) {
               throw new RestException(cause);
           } else {
               throw (RestException) cause;
           }
       }
   }

    protected void internalSetNamespaceResourceGroup(String rgName) {
        validateNamespacePolicyOperation(namespaceName, PolicyName.RESOURCEGROUP, PolicyOperation.WRITE);
        validatePoliciesReadOnlyAccess();

        if (rgName != null) {
            // check resourcegroup exists.
            try {
                if (!resourceGroupResources().resourceGroupExists(rgName)) {
                    throw new RestException(Status.PRECONDITION_FAILED, "ResourceGroup does not exist");
                }
            } catch (Exception e) {
                log.error()
                        .attr("resourceGroup", rgName)
                        .exceptionMessage(e)
                        .log("Invalid ResourceGroup");
                throw new RestException(e);
            }
        }

        internalSetPolicies("resource_group_name", rgName);
    }

    @SuppressWarnings("deprecation")
    protected void internalScanOffloadedLedgers(OffloaderObjectsScannerUtils.ScannerResultSink sink)
            throws Exception {
        log.info().attr("namespace", namespaceName).log("internalScanOffloadedLedgers");
        validateNamespacePolicyOperation(namespaceName, PolicyName.OFFLOAD, PolicyOperation.READ);

View on GitHub (pinned to 820761864e)

Solutions

  1. Create the resource group first (pulsar-admin resourcegroups create), then retry the namespace binding
  2. Check for typos in the resource group name
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java:3169 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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