shihy1992 opened a new issue, #10958:
URL: https://github.com/apache/dubbo/issues/10958

   <!-- If you need to report a security issue please visit 
https://github.com/apache/dubbo/security/policy -->
   
   - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) 
of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: Dubbo3.x
   * Operating System version: win10
   * Java version: jdk1.8
   
   ### Steps to reproduce this issue
   
   1. In three. In version X, integrate springboot, configured in the YML file 
as follows:
   ```
   dubbo:
     application:
       name: dubbo-springboot-demo-provider
       metadata-type: local
   
     protocols:
       p1:
         name: dubbo
         port: 20883
       p3:
         name: dubbo
         port: 50052
   
     registry:
       address: zookeeper://127.0.0.1:2181
   ```
   At 2.7. In version X, the provider provides a Dubbo service on two ports, 
20883,50052, but in 3. X, found in application-level metadata: Dubbo. In the 
endpoints node, only one port, 50052, is registered, not 20883
   ```
   {
       "name": "dubbo-springboot-demo-provider",
       "id": "192.168.3.12:20883",
       "address": "192.168.3.12",
       "port": 20883,
       "sslPort": null,
       "payload": {
           "@class": "org.apache.dubbo.registry.zookeeper.ZookeeperInstance",
           "id": "192.168.3.12:20883",
           "name": "dubbo-springboot-demo-provider",
           "metadata": {
               "dubbo.endpoints": "[{\"port\":50052,\"protocol\":\"dubbo\"}]",
               "dubbo.metadata-service.url-params": 
"{\"connections\":\"1\",\"version\":\"1.0.0\",\"dubbo\":\"2.0.2\",\"release\":\"3.1.2-SNAPSHOT\",\"side\":\"provider\",\"port\":\"20883\",\"protocol\":\"dubbo\"}",
               "dubbo.metadata.revision": "4aa675d2c4cb67397f868663d408587f",
               "dubbo.metadata.storage-type": "local",
               "timestamp": "1668756205371"
           }
       },
       "registrationTimeUTC": 1668763120468,
       "serviceType": "DYNAMIC",
       "uriSpec": null
   }
   ```
   After viewing the source code, the 
`org.apache.dubbo.registry.client.metadata.ProtocolPortsMetadataCustomizer#customize`Method,
 there is a description
   The same protocol will be covered, so that the design will never know the 
existence of 20883 consumers
   
![image](https://user-images.githubusercontent.com/34291337/202666949-9e0e3573-a17f-4039-9565-a857156694db.png)
   
   
   
   
   Pls. provide [GitHub address] to reproduce this issue.
   
https://github.com/apache/dubbo/blob/3.1/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/ProtocolPortsMetadataCustomizer.java
   
   ### Expected Behavior
   
   <!-- What do you expect from the above steps?-->
   In three. In application-level registration for version X, you can register 
both ports 20883 and 50052
   
   ### Actual Behavior
   
   <!-- What actually happens? -->
   
   If there is an exception, please attach the exception trace:
   At this point, there is no impact on usage, but the provider has opened an 
additional port, resulting in waste of resources and confusion of users
   


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

Reply via email to