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/10/08 01:36:29 UTC

[GitHub] [dubbo] zhoutianli518 commented on issue #8726: 容器上使用DUBBO 为什么2.7.12版本 Bind端口强制使用了注册端口号,导致容器下无法正确访问

zhoutianli518 commented on issue #8726:
URL: https://github.com/apache/dubbo/issues/8726#issuecomment-938270546


   这个问题我也发现了。服务绑定的端口是容器内的端口,而上报到注册中心的端口应该是宿主机的端口。比如内部IP和端口是IP1:Port1,上报到注册中心的IP和端口应该是宿主机的IP端口,比如IP2:Port2。 容器负载配置port2映射到port1。主机外的消费者看到的服务提供者的地址是IP2:Port2。因为消费者不能直接通过IP1:Port1访问服务。将请求发给IP2:Port2,然后宿主机将其转发到内部的容器实例IP1:Port1。
   
   dubbo这么一改后,业务配置的绑定端口port1就无效了,直接监听端口DUBBO_PORT_TO_REGISTRY,即port2了。以前端口映射配置是port2->port1,现在就变成了port2->port2了。port1就没用了。


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