painAdmin opened a new issue, #16074: URL: https://github.com/apache/dubbo/issues/16074
### Pre-check - [x] I am sure that all the content I provide is in English. ### Search before asking - [x] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues. ### Apache Dubbo Component Java SDK (apache/dubbo) ### Dubbo Version Dubbo:3.2.6, jdk:8,sring-boot:3.2.6 ### Steps to reproduce this issue 背景:定义这个一个dubbo provider服务,使用zookeeper 注册中心,定义一个service接口,并实现它: Background: Define a Dubbo provider service, using ZooKeeper as the registry center, define a service interface, and implement it: 部署: 部署时,在服务器最好是k8s里部署一个服务,应用名为application=ApplicationName_A 组名为 group=group_A, 本地启动一个服务应用名为application=ApplicationName_B 组名为 group=group_B, ps: 限制本地开发环境无法访问服务器中的ip,当2个服务都启动成功以后 During deployment, it's best to deploy a service on a Kubernetes server with the application name `application=ApplicationName_A` and the group name `group=group_A`. Start a local service with the application name application=ApplicationName_B and the group name group=group_B. P.S.: To prevent the local development environment from accessing the server's IP address, this will be implemented after both services have started successfully. 测试:本地开发一个consumer服务,使用同一个zookeeper注册中心,但引用本地服务的组名, Test: Develop a local consumer service using the same ZooKeeper registry, but referencing the group name of the local service. @DubboReference(group = "group_B") private BatchInnerService BatchInnerService; 期望效果:服务器中的服务为业务正常提供服务,本地启动的provider和consumer用来开发和测试,利用group区分不同的实例,相互不打扰 Desired outcome: The services on the server provide normal business operations, while the locally started provider and consumer are used for development and testing. Different instances are distinguished by groups, ensuring they do not interfere with each other. 运行结果: consmuer 启动失败,而且报错中的url即不是本地或者服务器中的组名,而是服务器里服务的应用名, Consumer failed to start, and the URL in the error message is not the local or server group name, but the name of the application running on the server. Invoke remote method timeout. method: getMetadataInfo, provider: dubbo://100.121.246.112:20880/org.apache.dubbo.metadata.MetadataService?connections=1&corethreads=2&dubbo=2.0.2&group=ApplicationName_A&port=20880&prefer.serialization=hessian2&protocol=dubbo&release=3.2.6&retries=0&serialization=hessian2&side=consumer&threadpool=cached&threads=100&timeout=5000&version=1.0.0, cause: Timeout after 5000ms waiting for result. ### What you expected to happen dubbo3 优先应用级发现,当发现service提供的应用名有多个时候,随机取了一个应用名,但是如果这个应用名是本地服务访问的,那么consumer就会启动失败,及时加了忽略check检查也不行,当改为接口级别时即可没有问题, Dubbo3 prioritizes application-level discovery. When multiple application names are found provided by a service, a random application name is selected. However, if this application name is accessed by a local service, the consumer will fail to start, even with the addition of an ignore check. Switching to interface-level discovery resolves the issue. 另外一个解法是, @DubboReference指定providedBy和group组名,也可以,但是想问,这个是否违背了,group或者application即可区分应用的初衷,逻辑有些混乱,理解上应用级别发现,可以用应用名区分或者组名区分,为什么这个问题里必须同时设置 Another solution is to specify `providedBy` and `group` in `@DubboReference`, which also works. However, I wonder if this violates the original intention of distinguishing applications using only `group` or `application`. The logic seems a bit confusing. At the application level, it seems that either the application name or the group name can be used for differentiation. Why is it necessary to set both in this case? ### Anything else _No response_ ### Do you have a (mini) reproduction demo? - [ ] Yes, I have a minimal reproduction demo to help resolve this issue more effectively! ### Are you willing to submit a pull request to fix on your own? - [ ] Yes I am willing to submit a pull request on my own! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
