You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "cookiejoo (GitHub)" <gi...@apache.org> on 2019/11/04 09:47:10 UTC

[GitHub] [dubbo] cookiejoo opened issue #5278: 客户端无法调用Hessian协议接口超时

dubbo版本2.7.1,springboot版本2.1.3.RELEASE

客户端配置:
spring.application.name=demo-consumer
dubbo.scan.base-packages=com.demo.consumer
dubbo.registry.protocol=zookeeper
dubbo.registry.address=127.0.0.1:2181

    //但是version一定要指定 不然会找不到服务 直连需要加url="dubbo://localhost:12345",端口号和配置文件中保持一致,,protocol = "hessain"
    @Reference(version = "1.1", timeout = 4000,url = "hessian://192.168.1.101:20881/com.demo.provider.service.IMyService")
    private IMyService myService;

    @GetMapping("/hello")
    public String sayHello() {
        return myService.sayHello("Cookie");
    }

服务端spring配置:
dubbo.scan.basePackages=com.demo.provider
dubbo.application.name=demo-provider
dubbo.registry.protocol=zookeeper
dubbo.registry.address=127.0.0.1:2181

dubbo.protocol.name=hessian
dubbo.protocol.port=20881
dubbo.protocol.server=servlet
dubbo admin上已经显示注册到zk了,但是客户端调用一直是超时


异常:
: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.caucho.hessian.client.HessianRuntimeException: java.net.ConnectException: Connection refused] with root cause

java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_77]

[ Full content available at: https://github.com/apache/dubbo/issues/5278 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [dubbo] chickenlj commented on issue #5278: 客户端无法调用Hessian协议接口超时

Posted by "chickenlj (GitHub)" <gi...@apache.org>.
客户端收到的网络地址是正确的么?看起来是建立链接失败了。

[ Full content available at: https://github.com/apache/dubbo/issues/5278 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org