{"record":{"id":"bd15d24090db419f","repo":"testcontainers/testcontainers-java","slug":"the-eventing-service-is-only-supported-with-the-enterprise","errorCode":null,"errorMessage":"The Eventing Service is only supported with the Enterprise version","messagePattern":"The Eventing Service is only supported with the Enterprise version","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"modules/couchbase/src/main/java/org/testcontainers/couchbase/CouchbaseContainer.java","lineNumber":398,"sourceCode":"    /**\n     * Fetches edition (enterprise or community) of started container.\n     */\n    private void initializeIsEnterprise() {\n        @Cleanup\n        Response response = doHttpRequest(MGMT_PORT, \"/pools\", \"GET\", null, true);\n\n        try {\n            isEnterprise = MAPPER.readTree(response.body().string()).get(\"isEnterprise\").asBoolean();\n        } catch (IOException e) {\n            throw new IllegalStateException(\"Couchbase /pools did not return valid JSON\");\n        }\n\n        if (!isEnterprise) {\n            if (enabledServices.contains(CouchbaseService.ANALYTICS)) {\n                throw new IllegalStateException(\"The Analytics Service is only supported with the Enterprise version\");\n            }\n            if (enabledServices.contains(CouchbaseService.EVENTING)) {\n                throw new IllegalStateException(\"The Eventing Service is only supported with the Enterprise version\");\n            }\n        }\n    }\n\n    /**\n     * Initializes the {@link #hasTlsPorts} flag.\n     * <p>\n     * Community Edition might support TLS one happy day, so use a \"supports TLS\" flag separate from\n     * the \"enterprise edition\" flag.\n     */\n    private void initializeHasTlsPorts() {\n        @Cleanup\n        Response response = doHttpRequest(MGMT_PORT, \"/pools/default/nodeServices\", \"GET\", null, true);\n\n        try {\n            String clusterTopology = response.body().string();\n            hasTlsPorts =\n                !MAPPER","sourceCodeStart":380,"sourceCodeEnd":416,"githubUrl":"https://github.com/testcontainers/testcontainers-java/blob/8e549514e3f01c57d70546fbb8599d138f3903e5/modules/couchbase/src/main/java/org/testcontainers/couchbase/CouchbaseContainer.java#L380-L416","documentation":"initializeIsEnterprise() reads isEnterprise from the /pools management endpoint; when the edition is Community and the EVENTING service was requested, the container throws IllegalStateException because the Eventing Service is Enterprise-only, analogous to the Analytics check.","triggerScenarios":"Using a Community couchbase image while calling .withServiceQuota(CouchbaseService.EVENTING, ...) or otherwise adding EVENTING to the enabled services.","commonSituations":"Community images in CI to avoid licensing; enabling all services by default; image tag downgrades that silently switch to Community.","solutions":["Switch to an Enterprise Edition image tag (couchbase:enterprise-...).","Remove EVENTING from the enabled services and any withServiceQuota(CouchbaseService.EVENTING, ...) call.","Restructure the test so eventing behavior is covered against an Enterprise-based environment."],"exampleFix":"// before\nnew CouchbaseContainer(\"couchbase:community-7.0.2\")\n    .withServiceQuota(CouchbaseService.EVENTING, 512)\n// after\nnew CouchbaseContainer(\"couchbase:enterprise-7.1.1\")\n    .withServiceQuota(CouchbaseService.EVENTING, 512)","handlingStrategy":"validation","validationCode":"if (!image.contains(\"enterprise\") && services.contains(CouchbaseService.EVENTING)) {\n    throw new IllegalStateException(\"EVENTING requires an Enterprise image\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    container.start();\n} catch (IllegalStateException e) {\n    if (e.getMessage().contains(\"Eventing Service is only supported with the Enterprise\")) {\n        // rebuild container without EVENTING or with an enterprise image\n    } else {\n        throw e;\n    }\n}","preventionTips":["Only enable EVENTING with couchbase:enterprise-* tags.","Audit CI images after tag upgrades/downgrades for accidental community editions.","Centralize which services are enabled per edition."],"tags":["testcontainers","couchbase","licensing","configuration"],"backgroundTag":"conflicting-config-options","analyzedSha":"8e549514e3f01c57d70546fbb8599d138f3903e5","analyzedAt":"2026-09-12T14:56:41.227Z","contentChangedAt":"2026-09-12T14:56:41.227Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}