【错误日志dubbo】Failed to invoke remote method: sayHello, provider:dubbo://192.168.2.xxx

找不到zookeeper register中的方法
原因:使用了本地tomcat8
解决:在provider和consumer的pom.xml中添加tomcat7plugin maven启动
问题结局,但我不知道是为何,启动本地的tomcat8时,运行完全是规范的???

类型 异常报告

消息 Request processing failed; nested exception is com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method sayHello in the service com.cheung.service.HelloService. Tried 3 times of the providers [192.168.2.xxx:20881] (1/1) from the registry 10.xxx.55.7:2181 on the consumer 192.168.2.xxx using the dubbo version 2.6.0. Last error is: Failed to invoke remote method: sayHello, provider: dubbo://192.168.2.xxx:20881/com.cheung.service.HelloService?anyhost=true&application=dubbo_consumer&check=false&dubbo=2.6.0&generic=false&interface=com.cheung.service.HelloService&methods=satHello&pid=85829&register.ip=192.168.2.101&remote.timestamp=1647394108767&side=consumer&timestamp=1647394159250, cause: com.alibaba.dubbo.rpc.RpcException: Failed to invoke remote proxy method sayHello to registry://10.xxx.55.7:2181/com.alibaba.dubbo.registry.RegistryService?application=provider_dubbo&dubbo=2.6.0&export=dubbo%3A%2F%2F192.168.2.xxx%3A20881%2Fcom.cheung.service.HelloService%3Fanyhost%3Dtrue%26application%3Dprovider_dubbo%26bind.ip%3D192.168.2.xxx%26bind.port%3D20881%26dubbo%3D2.6.0%26generic%3Dfalse%26interface%3Dcom.cheung.service.HelloService%26methods%3DsatHello%26pid%3D85748%26side%3Dprovider%26timestamp%3D1647394108767&pid=85748&registry=zookeeper&timestamp=1647394108763, cause: Not found method "sayHello" in class com.cheung.service.impl.HelloServiceImpl.
provider pom.xml
<build>
  <plugins>
    <plugin>
            <!--tomcat7插件-->
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <version>2.2</version>
            <configuration>
                <!--指定端口-->
                <port>8888</port>
                <!--请求路径-->
                <path>/</path>
            </configuration>
    </plugin>
  </plugins>
</build>

consumer pom.xml:
<build>
  <plugins>
    <plugin>
            <!--tomcat7插件-->
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <version>2.2</version>
            <configuration>
                <!--指定端口-->
                <port>8887</port>
                <!--请求路径-->
                <path>/</path>
            </configuration>
    </plugin>
  </plugins>
</build>

成功运行结果:
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值