启动服务提供者与服务消费者,页面调用时报错:HTTP Status 500 - Request processing failed;nested exception is com.alibaba...

在尝试调用服务提供者时,遇到了HTTP 500错误,原因是Dubbo RPC调用超时。错误显示服务消费者无法从服务注册中心找到有效的提供者。经过检查,发现数据库连接配置不正确,数据库驱动版本为8.0.11,但driverClass使用了过时的com.mysql.jdbc.Driver,正确的是com.mysql.cj.jdbc.Driver。修正driverClass后,问题得到解决。
摘要由CSDN通过智能技术生成

错误页面:
HTTP Status 500 - Request processing failed; nested exception is com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method findAll in the service com.pinyougou.sellergoods.service.BrandService. Tried 3 times of the providers [192.168.101.23:20881] (1/1) from the registry 192.168.25.134:2181 on the consumer 192.168.101.23 using the dubbo version 2.8.4. Last error is: Invoke remote method timeout. method: findAll, provider: dubbo://192.168.101.23:20881/com.pinyougou.sellergoods.service.BrandService?anyhost=true&application=pinyougou-manager-web&check=false&dubbo=2.8.4&generic=false&interface=com.pinyougou.sellergoods.service.BrandService&methods=findAll&pid=11136&revision=0.0.2-SNAPSHOT&side=consumer&timestamp=1568347137185, cause: Waiting server-side response timeout by scan timer. start time: 2019-09-13 11:59:01.068, end time: 2019-09-13 11:59:02.099, client elapsed: 0 ms, server elapsed: 1030 ms, timeout: 1000 ms, request: Request [id=2, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=findAll, parameterTypes=[], arguments=[], attachments={path=com.pinyougou.sellergoods.service.BrandService, interface=com.pinyougou.sellergoods.service.BrandService, version=0.0.0}]], channel: /192.168.101.23:54403 -> /192.168.101.23:20881
type Exception report

message Request processing failed; nested exception is com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method findAll in the service com.pinyougou.sellergoods.service.BrandService. Tried 3 times of the providers [192.168.101.23:20881] (1/1) from the registry 192.168.25.134:2181 on the consumer 192.168.101.23 using the dubbo version 2.8.4. Last error is: Invoke remote method timeout. method: findAll, provider: dubbo://192.168.101.23:20881/com.pinyougou.sellergoods.service.BrandService?anyhost=true&application=pinyougou-manager-web&check=false&dubbo=2.8.4&generic=false&interface=com.pinyougou.sellergoods.service.BrandService&methods=findAll&pid=11136&revision=0.0.2-SNAPSHOT&side=consumer&timestamp=1568347137185, cause: Waiting server-side response timeout by scan timer. start time: 2019-09-13 11:59:01.068, end time: 2019-09-13 11:59:02.099, client elapsed: 0 ms, server elapsed: 1030 ms, timeout: 1000 ms, request: Request [id=2, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=findAll, parameterTypes=[], arguments=[], attachments={path=com.pinyougou.sellergoods.service.BrandService, interface=com.pinyougou.sellergoods.service.BrandService, version=0.0.0}]], channel: /192.168.101.23:54403 -> /192.168.101.23:20881

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method findAll in the service com.pinyougou.sellergoods.service.BrandService. Tried 3 times of the providers [192.168.101.23:20881] (1/1) from the registry 192.168.25.134:2181 on the consumer 192.168.101.23 using the dubbo version 2.8.4. Last error is: Invoke remote method timeout. method: findAll, provider: dubbo://192.168.101.23:20881/com.pinyougou.sellergoods.service.BrandService?anyhost=true&application=pinyougou-manager-web&check=false&dubbo=2.8.4&generic=false&interface=com.pinyougou.sellergoods.service.BrandService&methods=findAll&pid=11136&revision=0.0.2-SNAPSHOT&side=consumer&timestamp=1568347137185, cause: Waiting server-side response timeout by scan timer. start time: 2019-09-13 11:59:01.068, end time: 2019-09-13 11:59:02.099, client elapsed: 0 ms, server elapsed: 1030 ms, timeout: 1000 ms, request: Request [id=2, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=findAll, parameterTypes=[], arguments=[], attachments={path=com.pinyougou.sellergoods.service.BrandService, interface=com.pinyougou.sellergoods.service.BrandService, version=0.0.0}]], channel: /192.168.101.23:54403 -> /192.168.101.23:20881
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:981)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:860)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
root cause

com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method findAll in the service com.pinyougou.sellergoods.service.BrandService. Tried 3 times of the providers [192.168.101.23:20881] (1/1) from the registry 192.168.25.134:2181 on the consumer 192.168.101.23 using the dubbo version 2.8.4. Last error is: Invoke remote method timeout. method: findAll, provider: dubbo://192.168.101.23:20881/com.pinyougou.sellergoods.service.BrandService?anyhost=true&application=pinyougou-manager-web&check=false&dubbo=2.8.4&generic=false&interface=com.pinyougou.sellergoods.service.BrandService&methods=findAll&pid=11136&revision=0.0.2-SNAPSHOT&side=consumer&timestamp=1568347137185, cause: Waiting server-side response timeout by scan timer. start time: 2019-09-13 11:59:01.068, end time: 2019-09-13 11:59:02.099, client elapsed: 0 ms, server elapsed: 1030 ms, timeout: 1000 ms, request: Request [id=2, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=findAll, parameterTypes=[], arguments=[], attachments={path=com.pinyougou.sellergoods.service.BrandService, interface=com.pinyougou.sellergoods.service.BrandService, version=0.0.0}]], channel: /192.168.101.23:54403 -> /192.168.101.23:20881
com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:108)
com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:227)
com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:72)
com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52)
com.alibaba.dubbo.common.bytecode.proxy0.findAll(proxy0.java)
com.pinyougou.manager.controller.BrandController.findAll(BrandController.java:24)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:497)
org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:222)
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:814)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:737)
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:860)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
root cause

com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer. start time: 2019-09-13 11:59:01.068, end time: 2019-09-13 11:59:02.099, client elapsed: 0 ms, server elapsed: 1030 ms, timeout: 1000 ms, request: Request [id=2, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=findAll, parameterTypes=[], arguments=[], attachments={path=com.pinyougou.sellergoods.service.BrandService, interface=com.pinyougou.sellergoods.service.BrandService, version=0.0.0}]], channel: /192.168.101.23:54403 -> /192.168.101.23:20881
com.alibaba.dubbo.remoting.exchange.support.DefaultFuture.returnFromResponse(DefaultFuture.java:188)
com.alibaba.dubbo.remoting.exchange.support.DefaultFuture.get(DefaultFuture.java:110)
com.alibaba.dubbo.remoting.exchange.support.DefaultFuture.get(DefaultFuture.java:84)
com.alibaba.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:96)
com.alibaba.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:144)
com.alibaba.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:74)
com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75)
com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
com.alibaba.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:53)
com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
com.alibaba.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:48)
com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
com.alibaba.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:53)
com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:77)
com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:227)
com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:72)
com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52)
com.alibaba.dubbo.common.bytecode.proxy0.findAll(proxy0.java)
com.pinyougou.manager.controller.BrandController.findAll(BrandController.java:24)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:497)
org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:222)
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:814)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:737)
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:860)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.47 logs.

Apache Tomcat/7.0.47

控制台错误信息:
严重: Servlet.service() for servlet [springmvc] in context with path [] threw exception [Request processing failed; nested exception is com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method findAll in the service com.pinyougou.sellergoods.service.BrandService. Tried 3 times of the providers [192.168.101.23:20881] (1/1) from the registry 192.168.25.134:2181 on the consumer 192.168.101.23 using the dubbo version 2.8.4. Last error is: Invoke remote method timeout. method: findAll, provider: dubbo://192.168.101.23:20881/com.pinyougou.sellergoods.service.BrandService?anyhost=true&application=pinyougou-manager-web&check=false&dubbo=2.8.4&generic=false&interface=com.pinyougou.sellergoods.service.BrandService&methods=findAll&pid=11136&revision=0.0.2-SNAPSHOT&side=consumer&timestamp=1568347137185, cause: Waiting server-side response timeout by scan timer. start time: 2019-09-13 11:59:01.068, end time: 2019-09-13 11:59:02.099, client elapsed: 0 ms, server elapsed: 1030 ms, timeout: 1000 ms, request: Request [id=2, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=findAll, parameterTypes=[], arguments=[], attachments={path=com.pinyougou.sellergoods.service.BrandService, interface=com.pinyougou.sellergoods.service.BrandService, version=0.0.0}]], channel: /192.168.101.23:54403 -> /192.168.101.23:20881] with root cause
com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer. start time: 2019-09-13 11:59:01.068, end time: 2019-09-13 11:59:02.099, client elapsed: 0 ms, server elapsed: 1030 ms, timeout: 1000 ms, request: Request [id=2, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=findAll, parameterTypes=[], arguments=[], attachments={path=com.pinyougou.sellergoods.service.BrandService, interface=com.pinyougou.sellergoods.service.BrandService, version=0.0.0}]], channel: /192.168.101.23:54403 -> /192.168.101.23:20881
at com.alibaba.dubbo.remoting.exchange.support.DefaultFuture.returnFromResponse(DefaultFuture.java:188)
at com.alibaba.dubbo.remoting.exchange.support.DefaultFuture.get(DefaultFuture.java:110)
at com.alibaba.dubbo.remoting.exchange.support.DefaultFuture.get(DefaultFuture.java:84)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:96)
at com.alibaba.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:144)
at com.alibaba.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:74)
at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:53)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:48)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper 1. i n v o k e ( P r o t o c o l F i l t e r W r a p p e r . j a v a : 91 ) a t c o m . a l i b a b a . d u b b o . r p c . p r o t o c o l . I n v o k e r W r a p p e r . i n v o k e ( I n v o k e r W r a p p e r . j a v a : 53 ) a t c o m . a l i b a b a . d u b b o . r p c . c l u s t e r . s u p p o r t . F a i l o v e r C l u s t e r I n v o k e r . d o I n v o k e ( F a i l o v e r C l u s t e r I n v o k e r . j a v a : 77 ) a t c o m . a l i b a b a . d u b b o . r p c . c l u s t e r . s u p p o r t . A b s t r a c t C l u s t e r I n v o k e r . i n v o k e ( A b s t r a c t C l u s t e r I n v o k e r . j a v a : 227 ) a t c o m . a l i b a b a . d u b b o . r p c . c l u s t e r . s u p p o r t . w r a p p e r . M o c k C l u s t e r I n v o k e r . i n v o k e ( M o c k C l u s t e r I n v o k e r . j a v a : 72 ) a t c o m . a l i b a b a . d u b b o . r p c . p r o x y . I n v o k e r I n v o c a t i o n H a n d l e r . i n v o k e ( I n v o k e r I n v o c a t i o n H a n d l e r . j a v a : 52 ) a t c o m . a l i b a b a . d u b b o . c o m m o n . b y t e c o d e . p r o x y 0. f i n d A l l ( p r o x y 0. j a v a ) a t c o m . p i n y o u g o u . m a n a g e r . c o n t r o l l e r . B r a n d C o n t r o l l e r . f i n d A l l ( B r a n d C o n t r o l l e r . j a v a : 24 ) a t s u n . r e f l e c t . N a t i v e M e t h o d A c c e s s o r I m p l . i n v o k e 0 ( N a t i v e M e t h o d ) a t s u n . r e f l e c t . N a t i v e M e t h o d A c c e s s o r I m p l . i n v o k e ( N a t i v e M e t h o d A c c e s s o r I m p l . j a v a : 62 ) a t s u n . r e f l e c t . D e l e g a t i n g M e t h o d A c c e s s o r I m p l . i n v o k e ( D e l e g a t i n g M e t h o d A c c e s s o r I m p l . j a v a : 43 ) a t j a v a . l a n g . r e f l e c t . M e t h o d . i n v o k e ( M e t h o d . j a v a : 497 ) a t o r g . s p r i n g f r a m e w o r k . w e b . m e t h o d . s u p p o r t . I n v o c a b l e H a n d l e r M e t h o d . d o I n v o k e ( I n v o c a b l e H a n d l e r M e t h o d . j a v a : 222 ) a t o r g . s p r i n g f r a m e w o r k . w e b . m e t h o d . s u p p o r t . I n v o c a b l e H a n d l e r M e t h o d . i n v o k e F o r R e q u e s t ( I n v o c a b l e H a n d l e r M e t h o d . j a v a : 137 ) a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . m v c . m e t h o d . a n n o t a t i o n . S e r v l e t I n v o c a b l e H a n d l e r M e t h o d . i n v o k e A n d H a n d l e ( S e r v l e t I n v o c a b l e H a n d l e r M e t h o d . j a v a : 110 ) a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . m v c . m e t h o d . a n n o t a t i o n . R e q u e s t M a p p i n g H a n d l e r A d a p t e r . i n v o k e H a n d l e r M e t h o d ( R e q u e s t M a p p i n g H a n d l e r A d a p t e r . j a v a : 814 ) a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . m v c . m e t h o d . a n n o t a t i o n . R e q u e s t M a p p i n g H a n d l e r A d a p t e r . h a n d l e I n t e r n a l ( R e q u e s t M a p p i n g H a n d l e r A d a p t e r . j a v a : 737 ) a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . m v c . m e t

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值