liufeiyu1002 commented on issue #10795:
URL: https://github.com/apache/dubbo/issues/10795#issuecomment-1288763352

   这个问题是由 我们指定了 protocol为  非 dubbo 协议 
   ```dubbo:
     application:
       name: dubbo-springboot-demo-provider
      #metadata-service-protocol: tri 指定metadata协议
     protocol:
       name: tri
     registry:
       id: zk-registry
       address: zookeeper://127.0.0.1:2181
     config-center:
       address: zookeeper://127.0.0.1:2181
     metadata-report:
       address: zookeeper://127.0.0.1:2181
   server:
     port: 8181
   ```
   且没有全局指定 `metadata-service-protocol` 配置,
   metadata 会默认使用 dubbo协议
   
![image](https://user-images.githubusercontent.com/32605119/197498626-20db2f5f-22d2-4013-80d5-d7b84759a7a2.png)
   在后续获取 protocol 配置中 ,并没有找到dubbo类型的协议
   
![image](https://user-images.githubusercontent.com/32605119/197498802-b0d247d8-a8ae-42a1-b4fa-5c4f4d455bbd.png)
   即调用 optional.get 会抛出 
   
![image](https://user-images.githubusercontent.com/32605119/197498978-fab1b59e-afb6-4333-b964-fc3a80127ee7.png)
   


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