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

   <!-- 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.
   
   ## Ask your question here
   When I upgraded from 3.0.9 to 3.1.0, I found the following error when 
starting the project:
   当我从3.0.9升级到3.1.0后,启动项目时发现以下报错:
   ```
   2022-09-06 11:08:17.323 [main] ERROR 
o.a.d.r.client.ServiceDiscoveryRegistryDirectory - Unsupported protocol rest in 
notified url: DefaultServiceInstance{serviceName='sys-service', 
host='192.168.1.55', port=20001, enabled=true, healthy=true, 
metadata={preserved.register.source=SPRING_CLOUD}}, null from registry 
【REGISTRY IP ADDRESS】 to consumer 192.168.1.55, supported protocol: [dubbo, 
injvm, mock, registry, service-discovery-registry, tri]
   java.lang.IllegalStateException: Unsupported protocol rest in notified url: 
DefaultServiceInstance{serviceName='sys-service', host='192.168.1.55', 
port=20001, enabled=true, healthy=true, 
metadata={preserved.register.source=SPRING_CLOUD}}, null from registry 
【REGISTRY IP ADDRESS】 to consumer 192.168.1.55, supported protocol: [dubbo, 
injvm, mock, registry, service-discovery-registry, tri]
        at 
org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.toInvokers(ServiceDiscoveryRegistryDirectory.java:300)
        at 
org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.refreshInvoker(ServiceDiscoveryRegistryDirectory.java:251)
        at 
org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.refreshOverrideAndInvoker(ServiceDiscoveryRegistryDirectory.java:179)
        at 
org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.notify(ServiceDiscoveryRegistryDirectory.java:173)
        at 
org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.addListenerAndNotify(ServiceInstancesChangedListener.java:235)
        at 
org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.subscribeURLs(ServiceDiscoveryRegistry.java:325)
        at 
org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.doSubscribe(ServiceDiscoveryRegistry.java:216)
        at 
org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.subscribe(ServiceDiscoveryRegistry.java:184)
        at 
org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:111)
        at 
org.apache.dubbo.registry.integration.DynamicDirectory.subscribe(DynamicDirectory.java:180)
        at 
org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.subscribe(ServiceDiscoveryRegistryDirectory.java:124)
        at 
org.apache.dubbo.registry.integration.RegistryProtocol.doCreateInvoker(RegistryProtocol.java:571)
        at 
org.apache.dubbo.registry.integration.InterfaceCompatibleRegistryProtocol.getServiceDiscoveryInvoker(InterfaceCompatibleRegistryProtocol.java:65)
        at 
org.apache.dubbo.registry.client.migration.MigrationInvoker.refreshServiceDiscoveryInvoker(MigrationInvoker.java:436)
        at 
org.apache.dubbo.registry.client.migration.MigrationInvoker.migrateToApplicationFirstInvoker(MigrationInvoker.java:244)
        at 
org.apache.dubbo.registry.client.migration.MigrationRuleHandler.refreshInvoker(MigrationRuleHandler.java:73)
        at 
org.apache.dubbo.registry.client.migration.MigrationRuleHandler.doMigrate(MigrationRuleHandler.java:57)
        at 
org.apache.dubbo.registry.client.migration.MigrationRuleListener.onRefer(MigrationRuleListener.java:243)
        at 
org.apache.dubbo.registry.integration.RegistryProtocol.interceptInvoker(RegistryProtocol.java:536)
        at 
org.apache.dubbo.registry.integration.RegistryProtocol.doRefer(RegistryProtocol.java:506)
        at 
org.apache.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:488)
        at 
org.apache.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:80)
        at 
org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:74)
        at 
org.apache.dubbo.rpc.cluster.filter.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:71)
        at 
org.apache.dubbo.rpc.protocol.ProtocolSerializationWrapper.refer(ProtocolSerializationWrapper.java:52)
        at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java)
        at 
org.apache.dubbo.config.ReferenceConfig.createInvokerForRemote(ReferenceConfig.java:600)
        at 
org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:441)
        at 
org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:295)
        at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:227)
        at 
org.apache.dubbo.config.utils.SimpleReferenceCache.get(SimpleReferenceCache.java:129)
        at 
org.apache.dubbo.config.deploy.DefaultModuleDeployer.lambda$referServices$6(DefaultModuleDeployer.java:383)
        at 
java.base/java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4780)
        at 
org.apache.dubbo.config.deploy.DefaultModuleDeployer.referServices(DefaultModuleDeployer.java:363)
        at 
org.apache.dubbo.config.deploy.DefaultModuleDeployer.start(DefaultModuleDeployer.java:154)
        at 
org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onContextRefreshedEvent(DubboDeployApplicationListener.java:111)
        at 
org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:100)
        at 
org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:45)
        at 
org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
        at 
org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
        at 
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
        at 
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)
        at 
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378)
        at 
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:938)
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586)
        at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
        at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734)
        at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
        at 
cc.uncarbon.module.SaasApiApplication.main(SaasApiApplication.java:10)
   ```
   However port 20001 is the HTTP port of the downstream microservice
   然而端口20001是下游微服务的HTTP端口
   
   After tracking the code I found this:
   跟踪代码后我发现:
   
[![v7gM3F.md.png](https://s1.ax1x.com/2022/09/06/v7gM3F.md.png)](https://imgse.com/i/v7gM3F)
   
   The provider's configuration file does not actively set the rest protocol. 
This * should be actively added when registering with the registry. There seems 
to be no usage found in the feature announcement of version 3.1.0, please advise
   provider的配置文件中并没有主动设置 rest 
协议,这个*应该是注册到注册中心时主动添加的。3.1.0版本的feature公告中好像没有发现用法,请指教


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