You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/10 13:48:29 UTC

[GitHub] [dubbo] zrlw commented on issue #8681: github构建日志里有很多涉及RegistryProtocol的异常

zrlw commented on issue #8681:
URL: https://github.com/apache/dubbo/issues/8681#issuecomment-916918335


   3.0的 org.apache.dubbo.registry.integration.RegistryProtocol.destroy()方法同样存在ApplicationConfig已释放的问题,github构建日志片段内容摘录如下:
   (Unit Test On windows-2019 (JDK: 8)完整日志:https://github.com/zrlw/dubbo/runs/3565948379?check_suite_focus=true )
   ```
   [10/09/21 10:17:42:258 UTC] main  WARN bootstrap.DubboBootstrap:  [DUBBO] There's no ApplicationConfig specified., dubbo version: 3.0.3-SNAPSHOT, current host: 172.17.224.1
   java.lang.IllegalStateException: There's no ApplicationConfig specified.
   	at org.apache.dubbo.config.context.ConfigManager.lambda$getApplicationOrElseThrow$0(ConfigManager.java:162)
   	at java.util.Optional.orElseThrow(Optional.java:290)
   	at org.apache.dubbo.config.context.ConfigManager.getApplicationOrElseThrow(ConfigManager.java:162)
   	at org.apache.dubbo.rpc.model.ApplicationModel.getCurrentConfig(ApplicationModel.java:246)
   	at org.apache.dubbo.rpc.model.ApplicationModel.getApplicationName(ApplicationModel.java:250)
   	at org.apache.dubbo.registry.integration.RegistryProtocol.destroy(RegistryProtocol.java:605)
   	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.destroy(ProtocolListenerWrapper.java:89)
   	at org.apache.dubbo.rpc.cluster.filter.ProtocolFilterWrapper.destroy(ProtocolFilterWrapper.java:79)
   	at org.apache.dubbo.rpc.protocol.ProtocolSerializationWrapper.destroy(ProtocolSerializationWrapper.java:57)
   	at org.apache.dubbo.config.bootstrap.DubboBootstrap.destroyProtocols(DubboBootstrap.java:1716)
   	at org.apache.dubbo.config.bootstrap.DubboBootstrap.destroy(DubboBootstrap.java:1646)
   	at org.apache.dubbo.config.ReferenceConfigTest.testCreateInvokerForRemoteRefer(ReferenceConfigTest.java:540)
   ```
   
   PS:
   考虑到master分支github日志ReferenceConfigTest测试方法在RegistryProtocol的doOverrideIfNecessary()里获取currentUrl时出现NPE:
   ```
       URL currentUrl = exporter.getInvoker().getUrl();
   ```
   3.0分支的此处获取currentUrl的代码也可能存在出现NPE风险。


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org