wangdechong commented on issue #15641:
URL: https://github.com/apache/dubbo/issues/15641#issuecomment-3218592342

   > debug ExporterDeployListener#onModuleStarted at your provider side to see 
why metadataServiceExporter doesn't export v1.
   
   The provider's local mode is incompatible with dubbo+tri multi-protocol: 
   
   
   The findFirst() method of 
org.apache.dubbo.config.bootstrap.builders.InternalServiceConfigBuilder#getRelatedOrDefaultProtocol;
 The exportV1  selects the Dubbo MetadataService.  exportV2 registers 
tri-protocol MetadataServiceV2
   ```
   protocol = protocols.stream()
           .map(ProtocolConfig::getName)
           .filter(StringUtils::isNotEmpty)
           .filter(p -> ACCEPTABLE_PROTOCOL.contains(p))
           .findFirst()
           .orElse("");
   ```
   However, the protocol specified in the metadata content's 
dubbo.metadata-service.url-params.protocal is tri, as shown below:
   
   ```
   
dubbo.metadata-service.url-params={"prefer.serialization":"hessian2,fastjson2","version":"2.0.0","dubbo":"2.0.2","release":"3.3.5","side":"provider","port":"50053","protocol":"tri"}
   
   
dubbo.endpoints=[{"port":20881,"protocol":"dubbo"},{"port":50053,"protocol":"tri"}]
   
   dubbo.metadata.revision=79f04342a4892eddd387b62ebdf95a12
   
   dubbo.metadata.storage-type=local
   
   meta-v=2.0.0
   
   ```
   
   
   Changing the provider's metadataType from local to remote can bypass the 
issue.
   
   ```
   dubbo:
     application:
         metadata-type: remote
   ```
   


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