Lingzhou314 opened a new issue, #12638: URL: https://github.com/apache/dubbo/issues/12638
我看官网是有支持的,而且是有示例的([原生多协议支持](https://cn.dubbo.apache.org/zh-cn/overview/reference/protocols/triple/#原生多协议支持)),但是我本地部署一个tri服务,却访问不了,是我的方式有问题吗,还是需要额外的配置。 就一个简单的服务,然后使用tri协议注册的 ``` @DubboService public class Dubbo2ProviderImpl implements Dubbo2Provider{ @Override public String sayHello(String name) { System.out.println("sayHello " + name); return "dubbo2 sayHello "+ name; } } ``` 这是启动日志 ``` [DUBBO] Export dubbo service com.demo.dubbo2.Dubbo2Provider to local registry url : injvm://127.0.0.1/com.demo.dubbo2.Dubbo2Provider?anyhost=true&application=dubbo2&background=false&bind.ip=192.168.0.103&bind.port=50051&deprecated=false&dubbo=2.0.2&dynamic=true&executor-management-mode=isolation&exporter.listener=injvm&file-cache=true&generic=false&group=YEAHGO_GROUP&interface=com.demo.dubbo2.Dubbo2Provider&methods=findByRequest,sayHello&pid=34228&prefer.serialization=fastjson2,hessian2&qos.enable=true&release=3.2.2&revision=1.0&side=provider×tamp=1688177050319&version=1.0, dubbo version: 3.2.2, current host: 192.168.0.103 [DUBBO] Register dubbo service com.demo.dubbo2.Dubbo2Provider url tri://192.168.0.103:50051/com.demo.dubbo2.Dubbo2Provider?anyhost=true&application=dubbo2&background=false&bind.ip=192.168.0.103&bind.port=50051&deprecated=false&dubbo=2.0.2&dynamic=true&executor-management-mode=isolation&file-cache=true&generic=false&group=YEAHGO_GROUP&interface=com.demo.dubbo2.Dubbo2Provider&methods=findByRequest,sayHello&pid=34228&prefer.serialization=fastjson2,hessian2&qos.enable=true&release=3.2.2&revision=1.0&service-name-mapping=true&side=provider×tamp=1688177050319&version=1.0 to registry 127.0.0.1:8848, dubbo version: 3.2.2, current host: 192.168.0.103 [DUBBO] Start NettyPortUnificationServer bind /0.0.0.0:50051, export /0:0:0:0:0:0:0:0:50051, dubbo version: 3.2.2, current host: 192.168.0.103 [DUBBO] Successfully loaded meta cache from file .metadata.dubbo2.nacos.127.0.0.1:8848, entries 1, dubbo version: 3.2.2, current host: 192.168.0.103 ``` 然后我用http的方式访问 ``` curl --location 'http://192.168.0.103:50051/com.demo.dubbo2.Dubbo2Provider/sayHello' \ --header 'Content-Type: application/json' \ --data '"test"' ``` 没有任何返回,而且服务方报错了 ``` [DUBBO] The connection of /192.168.0.103:61757 -> /192.168.0.103:50051 is established., dubbo version: 3.2.2, current host: 192.168.0.103 [DUBBO] can not found commandContext, url: /com.demo.dubbo2.Dubbo2Provider/sayHello, dubbo version: 3.2.2, current host: 192.168.0.103, error code: 7-6. This may be caused by , go to https://dubbo.apache.org/faq/7/6 to find instructions. [DUBBO] The connection of /192.168.0.103:61757 -> /192.168.0.103:50051 is disconnected., dubbo version: 3.2.2, current host: 192.168.0.103 [DUBBO] All clients has disconnected from /192.168.0.103:50051. You can graceful shutdown now., dubbo version: 3.2.2, current host: 192.168.0.103, error code: 99-0. This may be caused by unknown error in remoting module, go to https://dubbo.apache.org/faq/99/0 to find instructions. [DUBBO] The connection of /192.168.0.103:61757 -> /192.168.0.103:50051 is disconnected., dubbo version: 3.2.2, current host: 192.168.0.103 ``` 于是我替换端口为22222的qos端口访问,也报错 ``` [DUBBO] can not found commandContext, url: /com.demo.dubbo2.Dubbo2Provider/sayHello, dubbo version: 3.2.2, current host: 192.168.0.103, error code: 7-6. This may be caused by , go to https://dubbo.apache.org/faq/7/6 to find instructions. ``` -- 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: notifications-unsubscr...@dubbo.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org