{"record":{"id":"679ec255d84b3af6","repo":"apache/pulsar","slug":"sameauthparamslookupautoclusterfailover-does-not-s","errorCode":null,"errorMessage":"SameAuthParamsLookupAutoClusterFailover does not support HTTP protocol pulsar service url so far.","messagePattern":"SameAuthParamsLookupAutoClusterFailover does not support HTTP protocol pulsar service url so far\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"pulsar-client/src/main/java/org/apache/pulsar/client/impl/SameAuthParamsLookupAutoClusterFailover.java","lineNumber":367,"sourceCode":"        public Builder markTopicNotFoundAsAvailable(boolean markTopicNotFoundAsAvailable) {\n            sameAuthParamsLookupAutoClusterFailover.markTopicNotFoundAsAvailable = markTopicNotFoundAsAvailable;\n            return this;\n        }\n\n        public Builder pulsarServiceUrlArray(String[] pulsarServiceUrlArray) {\n            if (pulsarServiceUrlArray == null || pulsarServiceUrlArray.length == 0) {\n                throw new IllegalArgumentException(\"pulsarServiceUrlArray can not be empty\");\n            }\n            sameAuthParamsLookupAutoClusterFailover.pulsarServiceUrlArray = pulsarServiceUrlArray;\n            int pulsarServiceLen = pulsarServiceUrlArray.length;\n            HashSet<String> uniqueChecker = new HashSet<>();\n            for (int i = 0; i < pulsarServiceLen; i++) {\n                String pulsarService = pulsarServiceUrlArray[i];\n                if (StringUtils.isBlank(pulsarService)) {\n                    throw new IllegalArgumentException(\"pulsarServiceUrlArray contains a blank value at index \" + i);\n                }\n                if (pulsarService.startsWith(\"http\") || pulsarService.startsWith(\"HTTP\")) {\n                    throw new IllegalArgumentException(\"SameAuthParamsLookupAutoClusterFailover does not support HTTP\"\n                            + \" protocol pulsar service url so far.\");\n                }\n                if (!uniqueChecker.add(pulsarService)) {\n                    throw new IllegalArgumentException(\"pulsarServiceUrlArray contains duplicated value \"\n                            + pulsarServiceUrlArray[i]);\n                }\n            }\n            return this;\n        }\n\n        public SameAuthParamsLookupAutoClusterFailover build() {\n            String[] pulsarServiceUrlArray = sameAuthParamsLookupAutoClusterFailover.pulsarServiceUrlArray;\n            if (pulsarServiceUrlArray == null) {\n                throw new IllegalArgumentException(\"pulsarServiceUrlArray can not be empty\");\n            }\n            int pulsarServiceLen = pulsarServiceUrlArray.length;\n            sameAuthParamsLookupAutoClusterFailover.pulsarServiceStateArray = new PulsarServiceState[pulsarServiceLen];\n            sameAuthParamsLookupAutoClusterFailover.checkCounterArray = new MutableInt[pulsarServiceLen];","sourceCodeStart":349,"sourceCodeEnd":385,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-client/src/main/java/org/apache/pulsar/client/impl/SameAuthParamsLookupAutoClusterFailover.java#L349-L385","documentation":"Builder.pulsarServiceUrlArray only supports binary-protocol service URLs (pulsar:// / pulsar+ssl://). Any entry starting with http/HTTP (i.e. an HTTP lookup URL like http://broker:8080) is rejected, because this failover provider probes the binary service port.","triggerScenarios":"Passing an HTTP(S) service URL (http://host:8080 or https://host:8443) in the array to pulsarServiceUrlArray, commonly by reusing the webServiceUrl or brokerServiceUrl value from admin tooling.","commonSituations":"Copy-pasting the URL from a Pulsar admin/REST client or from a dashboard (which uses the HTTP port 8080) instead of the binary service URL (port 6650); environment-specific config where someone mixed up the two ports.","solutions":["Replace each HTTP URL with the binary protocol equivalent: pulsar://host:6650 or pulsar+ssl://host:6651.","Check each cluster's broker.conf (bindAddress/servicePort vs webServicePort) to get the correct binary URL.","If you require HTTP-based lookup, use a different ServiceUrlProvider/mechanism — this implementation does not support it."],"exampleFix":"// before\nbuilder.pulsarServiceUrlArray(new String[]{\"http://cluster-a:8080\", \"http://cluster-b:8080\"});\n\n// after\nbuilder.pulsarServiceUrlArray(new String[]{\"pulsar://cluster-a:6650\", \"pulsar://cluster-b:6650\"});","handlingStrategy":"validation","validationCode":"for (String url : urls) {\n    if (url.toLowerCase().startsWith(\"http\")) {\n        throw new IllegalArgumentException(\"Use pulsar:// or pulsar+ssl:// URLs, not HTTP: \" + url);\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    builder.pulsarServiceUrlArray(urls);\n} catch (IllegalArgumentException e) {\n    log.error(\"HTTP service URL not supported by failover provider: {}\", e.getMessage());\n    throw new ConfigurationException(\"Convert http:// URLs to pulsar:// (6650) or pulsar+ssl:// (6651)\", e);\n}","preventionTips":["Remember Pulsar clients use the binary port (6650/6651), not the HTTP port (8080/8443).","Do not copy URLs from admin tools or dashboards into client serviceUrl settings.","Start every configured cluster URL with pulsar:// or pulsar+ssl:// by convention."],"tags":["pulsar-client","configuration","protocol","illegal-argument"],"backgroundTag":"unsupported-service-url-protocol","analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}