shibd commented on PR #22991: URL: https://github.com/apache/pulsar/pull/22991#issuecomment-2203193720
> Usually, the brokerUrl is pulsar://xxx:6650, and use this value to connect to the broker(TLS and non-TLS were enabled), it should work fine oh, I understand this sentence. Yes, your are right. But, in current implementation. If enable BrokerTls, will use `brokerServiceUrlTls` to create `PulsarClient` and to create `connections` https://github.com/apache/pulsar/blob/4e535cb3f4a3482b0d5dc5a3a0a63c87490704e3/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java#L1679-L1681 then, in here. It will use `BinaryProtoLookupService` to getParitionMetaData. https://github.com/apache/pulsar/blob/2662c1127c11e95cc0e8e7c71846acb14f4e4295/pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java#L1482-L1484 and will create a new BinaryProtoLookupService with incorrect param: (noTlsBrokerUrl, and enableTls) <img width="1151" alt="IntelliJ IDEA 2024-07-02 21 31 50" src="https://github.com/apache/pulsar/assets/33416836/993bcba6-a92d-4a2b-8313-31bf72ad2212"> and then, when create a new connection, into this logic, resulting in an error. https://github.com/apache/pulsar/blob/6b2938223cf45a9298f9d40ab6ae108bea9a5a6d/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionPool.java#L420-L428 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
