使用dubbo遇到的问题

部分日志:

2020-01-08 11:04:14,692 [http-nio-8080-exec-8] ERROR [o.a.c.c.C.[.[localhost].[/].[dispatcherServlet]] DirectJDKLog.java:175 - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.apache.dubbo.rpc.RpcException: Failed to invoke the method getResultCode in the service com.gxxw.cloud.rollcall.task.service.ConnectTimerService. Tried 3 times of the providers [192.168.200.80:20880, 192.168.200.184:20881] (2/10) from the registry 127.0.0.1:2181 on the consumer 192.168.200.80 using the dubbo version 2.7.1. Last error is: Failed to invoke remote method: getResultCode, provider: dubbo://192.168.200.80:20880/com.gxxw.cloud.rollcall.task.service.ConnectTimerService?anyhost=true&application=cloud-web-manager&bean.name=providers:dubbo:com.gxxw.cloud.rollcall.task.service.ConnectTimerService&check=false&default.deprecated=false&default.dynamic=false&default.lazy=false&default.register=true&default.service.filter=dubboProviderFilter&default.sticky=false&default.timeout=10000&deprecated=false&dubbo=2.0.2&dynamic=false&generic=false&interface=com.gxxw.cloud.rollcall.task.service.ConnectTimerService&lazy=false&methods=getResultCode,getFailedTimes,setTimer,reRun,getTimer,isShutdown&pid=18904&register=true&register.ip=192.168.200.80&release=2.7.1&remote.application=cloud-rollcall-service&remote.timestamp=1578358840548&serialization=kryo&side=consumer&sticky=false&timestamp=1578452029303, cause: org.apache.dubbo.remoting.RemotingException: Not found exported service: com.gxxw.cloud.rollcall.task.service.ConnectTimerService:20880 in [com.gxxw.cloud.system.service.SysLogService:20880, com.gxxw.cloud.system.service.SysConfigService:20880, com.gxxw.cloud.system.service.SysRoleMenuService:20880, com.gxxw.cloud.system.service.SysMenuService:20880, com.gxxw.cloud.system.service.SysOssService:20880, com.gxxw.cloud.system.service.SysUserService:20880, com.gxxw.cloud.system.service.SysRoleService:20880, com.gxxw.cloud.system.service.SysUserRoleService:20880], may be version or group mismatch , channel: consumer: /192.168.200.80:49344 --> provider: /192.168.200.80:20880, message:RpcInvocation [methodName=getResultCode, parameterTypes=[], arguments=[], attachments={path=com.gxxw.cloud.rollcall.task.service.ConnectTimerService, input=273, dubbo=2.0.2, interface=com.gxxw.cloud.rollcall.task.service.ConnectTimerService, version=0.0.0, userId=null, timeout=10000}]
org.apache.dubbo.remoting.RemotingException: Not found exported service: com.gxxw.cloud.rollcall.task.service.ConnectTimerService:20880 in [com.gxxw.cloud.system.service.SysLogService:20880, com.gxxw.cloud.system.service.SysConfigService:20880, com.gxxw.cloud.system.service.SysRoleMenuService:20880, com.gxxw.cloud.system.service.SysMenuService:20880, com.gxxw.cloud.system.service.SysOssService:20880, com.gxxw.cloud.system.service.SysUserService:20880, com.gxxw.cloud.system.service.SysRoleService:20880, com.gxxw.cloud.system.service.SysUserRoleService:20880], may be version or group mismatch , channel: consumer: /192.168.200.80:49344 --> provider: /192.168.200.80:20880, message:RpcInvocation [methodName=getResultCode, parameterTypes=[], arguments=[], attachments={path=com.gxxw.cloud.rollcall.task.service.ConnectTimerService, input=273, dubbo=2.0.2, interface=com.gxxw.cloud.rollcall.task.service.ConnectTimerService, version=0.0.0, userId=null, timeout=10000}]
   at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.getInvoker(DubboProtocol.java:248)
   at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:102)
   at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:103)
   at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:200)
   at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51)
   at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at java.lang.Thread.run(Thread.java:748)
] with root cause
org.apache.dubbo.remoting.RemotingException: org.apache.dubbo.remoting.RemotingException: Not found exported service: com.gxxw.cloud.rollcall.task.service.ConnectTimerService:20880 in [com.gxxw.cloud.system.service.SysLogService:20880, com.gxxw.cloud.system.service.SysConfigService:20880, com.gxxw.cloud.system.service.SysRoleMenuService:20880, com.gxxw.cloud.system.service.SysMenuService:20880, com.gxxw.cloud.system.service.SysOssService:20880, com.gxxw.cloud.system.service.SysUserService:20880, com.gxxw.cloud.system.service.SysRoleService:20880, com.gxxw.cloud.system.service.SysUserRoleService:20880], may be version or group mismatch , channel: consumer: /192.168.200.80:49344 --> provider: /192.168.200.80:20880, message:RpcInvocation [methodName=getResultCode, parameterTypes=[], arguments=[], attachments={path=com.gxxw.cloud.rollcall.task.service.ConnectTimerService, input=273, dubbo=2.0.2, interface=com.gxxw.cloud.rollcall.task.service.ConnectTimerService, version=0.0.0, userId=null, timeout=10000}]
org.apache.dubbo.remoting.RemotingException: Not found exported service: com.gxxw.cloud.rollcall.task.service.ConnectTimerService:20880 in [com.gxxw.cloud.system.service.SysLogService:20880, com.gxxw.cloud.system.service.SysConfigService:20880, com.gxxw.cloud.system.service.SysRoleMenuService:20880, com.gxxw.cloud.system.service.SysMenuService:20880, com.gxxw.cloud.system.service.SysOssService:20880, com.gxxw.cloud.system.service.SysUserService:20880, com.gxxw.cloud.system.service.SysRoleService:20880, com.gxxw.cloud.system.service.SysUserRoleService:20880], may be version or group mismatch , channel: consumer: /192.168.200.80:49344 --> provider: /192.168.200.80:20880, message:RpcInvocation [methodName=getResultCode, parameterTypes=[], arguments=[], attachments={path=com.gxxw.cloud.rollcall.task.service.ConnectTimerService, input=273, dubbo=2.0.2, interface=com.gxxw.cloud.rollcall.task.service.ConnectTimerService, version=0.0.0, userId=null, timeout=10000}]
   at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.getInvoker(DubboProtocol.java:248)
   at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:102)
   at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:103)
   at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:200)
   at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51)
   at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at java.lang.Thread.run(Thread.java:748)

   at org.apache.dubbo.remoting.exchange.support.DefaultFuture.returnFromResponse(DefaultFuture.java:297)
   at org.apache.dubbo.remoting.exchange.support.DefaultFuture.get(DefaultFuture.java:191)
   at org.apache.dubbo.remoting.exchange.support.DefaultFuture.get(DefaultFuture.java:164)
   at org.apache.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:108)
   at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:157)
   at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:88)
   at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
   at org.apache.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:49)
   at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
   at org.apache.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:54)
   at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
   at com.gxxw.cloud.common.utils.DubboConsumerFilter.invoke(DubboConsumerFilter.java:20)
   at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
   at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:78)
   at org.apache.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56)
   at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:80)
   at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:242)
   at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:76)
   at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:57)
   at org.apache.dubbo.common.bytecode.proxy14.getResultCode(proxy14.java)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:498)
   at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor$ReferenceBeanInvocationHandler.invoke(ReferenceAnnotationBeanPostProcessor.java:165)
   at com.sun.proxy.$Proxy109.getResultCode(Unknown Source)
   at com.gxxw.cloud.config.interceptor.BasicInterceptor.preHandle(BasicInterceptor.java:37)
   at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:137)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1035)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
   at org.springframework.web.servlet.FrameworkServlet.doOptions(FrameworkServlet.java:945)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:669)
   at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   at com.gxxw.cloud.common.xss.XssFilter.doFilter(XssFilter.java:20)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
   at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
   at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
   at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
   at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
   at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
   at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
   at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
   at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
   at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387)
   at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
   at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
   at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358)
   at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:94)
   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
   at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
   at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
   at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589)
   at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Thread.java:748)

重点错误日志:

1.Tried 3 times of the providers [192.168.200.184:20880] (1/10) from the registry 127.0.0.1:2181 on the consumer 192.168.200.80 using the dubbo version 2.7.1.
2.java.lang.NoClassDefFoundError: com/esotericsoftware/kryo/io/Input

consumer和provider以及zookeeper都是在本机(内网ip地址:x.x.200.80)开启测试。

产生原因是本机IP地址是随机获取的,之前ip是x.x.200.184,由于注册到zookeeper的节点是永久存在的。节点信息不会自动删除,因此获取的节点信息是旧的信息,从而报错。

解决方法:重新解压一份zookeeper,或者项目中不使用127.0.0.1,使用内网ip连接zookeeper。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值