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 2018/08/09 12:24:53 UTC
[GitHub] jasonjoo2010 commented on a change in pull request #2111:
[Dubbo-2110]Fix subscript MonitorService lack of parameters in monitoring
jasonjoo2010 commented on a change in pull request #2111: [Dubbo-2110]Fix subscript MonitorService lack of parameters in monitoring
URL: https://github.com/apache/incubator-dubbo/pull/2111#discussion_r208908605
##########
File path: dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/AbstractInterfaceConfig.java
##########
@@ -226,7 +228,16 @@ protected URL loadMonitor(URL registryURL) {
if (ConfigUtils.getPid() > 0) {
map.put(Constants.PID_KEY, String.valueOf(ConfigUtils.getPid()));
}
+ //set ip
+ String hostToRegistry = ConfigUtils.getSystemProperty(Constants.DUBBO_IP_TO_REGISTRY);
+ if (hostToRegistry == null || hostToRegistry.length() == 0) {
+ hostToRegistry = NetUtils.getLocalHost();
+ } else if (isInvalidLocalHost(hostToRegistry)) {
+ throw new IllegalArgumentException("Specified invalid registry ip from property:" + Constants.DUBBO_IP_TO_REGISTRY + ", value:" + hostToRegistry);
Review comment:
According to the logic of subscribing or exporting logic which will be executed earlier than monitor-subscribing it should not happen here.
But it's fine to set a fallback value maybe. (While same patch has been merged to 2.6.x & master)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org