poorbarcode opened a new pull request, #21972:
URL: https://github.com/apache/pulsar/pull/21972

   ### Motivation
   
   At the beginning of the design, these two configurations(`brokerServiceURL & 
brokerServiceURLTLS`) do not support setting multiple broker addresses, which 
should instead be set to a “discovery service provider.” see: 
https://github.com/apache/pulsar/pull/1002 and 
https://github.com/apache/pulsar/pull/14682
   
   Users will get the below error if they set A to a multi-broker URLs
   
   ```
   "2024-01-09 00:20:10,261 -0800 [pulsar-proxy-io-4-7] WARN  
io.netty.channel.DefaultChannelPipeline - An exceptionCaught() event was fired, 
and it reached at the tail of the pipeline. It usually means the last handler 
in the pipeline did not handle the exception.
   java.lang.IllegalArgumentException: port out of range:-1
           at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143) 
~[?:?]
           at 
java.net.InetSocketAddress.createUnresolved(InetSocketAddress.java:254) ~[?:?]
           at 
org.apache.pulsar.proxy.server.LookupProxyHandler.getAddr(LookupProxyHandler.java:432)
 ~[org.apache.pulsar-pulsar-proxy-2.9.0.jar:2.9.0]
           at 
org.apache.pulsar.proxy.server.LookupProxyHandler.handleGetSchema(LookupProxyHandler.java:357)
 ~[org.apache.pulsar-pulsar-proxy-2.9.0.jar:2.9.0]
           at 
org.apache.pulsar.proxy.server.ProxyConnection.handleGetSchema(ProxyConnection.java:463)
 ~[org.apache.pulsar-pulsar-proxy-2.9.0.jar:2.9.0]
           at 
org.apache.pulsar.common.protocol.PulsarDecoder.channelRead(PulsarDecoder.java:326)
 ~[io.streamnative-pulsar-common-2.9.2.12.jar:2.9.2.12]
           at 
org.apache.pulsar.proxy.server.ProxyConnection.channelRead(ProxyConnection.java:221)
 ~[org.apache.pulsar-pulsar-proxy-2.9.0.jar:2.9.0]
           at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
 ~[io.netty-netty-transport-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
 ~[io.netty-netty-transport-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
 ~[io.netty-netty-transport-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327)
 ~[io.netty-netty-codec-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:299)
 ~[io.netty-netty-codec-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
 ~[io.netty-netty-transport-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
 ~[io.netty-netty-transport-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
 ~[io.netty-netty-transport-4.1.74.Final.jar:4.1.74.Final]
           at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1372) 
~[io.netty-netty-handler-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1246) 
~[io.netty-netty-handler-4.1.74.Final.jar:4.1.74.Final]
           at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1286) 
~[io.netty-netty-handler-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:510)
 ~[io.netty-netty-codec-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:449)
 ~[io.netty-netty-codec-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:279)
 ~[io.netty-netty-codec-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
 ~[io.netty-netty-transport-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
 ~[io.netty-netty-transport-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
 ~[io.netty-netty-transport-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
 ~[io.netty-netty-transport-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
 ~[io.netty-netty-transport-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
 ~[io.netty-netty-transport-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
 ~[io.netty-netty-transport-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:795)
 ~[io.netty-netty-transport-classes-epoll-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:480) 
~[io.netty-netty-transport-classes-epoll-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) 
~[io.netty-netty-transport-classes-epoll-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
 ~[io.netty-netty-common-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) 
~[io.netty-netty-common-4.1.74.Final.jar:4.1.74.Final]
           at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
 ~[io.netty-netty-common-4.1.74.Final.jar:4.1.74.Final]
   ```
   
   ### Modifications
   - Improve the description
   - Add a check to prevent wrong settings
   
   
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: x


-- 
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]

Reply via email to