- [Y ] I have searched the issues of this repository and believe that this is not a duplicate.
Environment
- Dubbo version: 3.1.1
- Operating System version: Windows 10
- Java version: 1.8
Steps to reproduce this issue
- Run a Dubbo provider with port 20880
- Run another Dubbo provider with port 20880
- The second one faild to start
Expected Behavior
Show "Address already in use: bind" or similar message in log
Actual Behavior
Show "java.lang.NullPointerException: null" in log
If there is an exception, please attach the exception trace:
java.lang.NullPointerException: null
at org.apache.dubbo.remoting.transport.netty4.NettyPortUnificationServer.getLocalAddress(NettyPortUnificationServer.java:221)
at org.apache.dubbo.remoting.transport.AbstractServer.<init>(AbstractServer.java:75)
at org.apache.dubbo.remoting.api.pu.AbstractPortUnificationServer.<init>(AbstractPortUnificationServer.java:46)
at org.apache.dubbo.remoting.transport.netty4.NettyPortUnificationServer.<init>(NettyPortUnificationServer.java:82)
at org.apache.dubbo.remoting.transport.netty4.NettyPortUnificationTransporter.bind(NettyPortUnificationTransporter.java:32)
at org.apache.dubbo.remoting.api.pu.PortUnificationTransporter$Adaptive.bind(PortUnificationTransporter$Adaptive.java)
at org.apache.dubbo.remoting.exchange.PortUnificationExchanger.lambda$bind$0(PortUnificationExchanger.java:41)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
2条答案
按热度按时间txu3uszq1#
I got it, an exception is thrown when the bind method is invoked, and the channel has not been assigned at this time
6qftjkof2#
I fixed it and raised a PR #10785