会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 128425个问题
JAVA 全系列/第十八阶段:亿级高并发电商项目/亿级高并发电商项目-新 1楼
JAVA 全系列/第十八阶段:亿级高并发电商项目/亿级高并发电商项目-新 3楼

org.apache.dubbo.rpc.RpcException: Failed to invoke the method pcPay in the service com.wgsc.shopping_common.service.ZfbpayService. Tried 3 times of the providers [192.168.66.10:20886] (1/1) from the registry 192.168.66.100:2181 on the consumer 192.168.31.89 using the dubbo version 2.7.8. Last error is: Invoke remote method timeout. method: pcPay, provider: dubbo://192.168.66.10:20886/com.wgsc.shopping_common.service.ZfbpayService?anyhost=true&application=shopping_order_customer_api&check=false&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&init=false&interface=com.wgsc.shopping_common.service.ZfbpayService&metadata-type=remote&methods=checkSign,addPayment,pcPay&pid=15996&qos.enable=false&register.ip=192.168.31.89&release=2.7.8&remote.application=shopping_pay_service&side=consumer&sticky=false&timestamp=1712156082349, cause: org.apache.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer. start time: 2024-04-03 23:00:01.354, end time: 2024-04-03 23:00:02.373, client elapsed: 1 ms, server elapsed: 1018 ms, timeout: 1000 ms, request: Request [id=26, version=2.0.2, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=pcPay, parameterTypes=[class com.wgsc.shopping_common.pojo.Orders], arguments=[Orders(id=1775458507525468161, cartGoods=[CartGoods(id=null, goodId=149187842867996, goodsName=iphone15promax, price=12000.00, headerPic=http://192.168.66.100/group1/M00/00/00/wKhCZGX_UzuASKq3AAAdpJbX8H4755.jpg, num=1, orderId=1775458507525468161)], payment=12000.00, paymentType=2, postFee=null, status=1, createTime=Wed Apr 03 17:41:09 CST 2024, paymentTime=null, consignTime=null, endTime=null, closeTime=null, shippingName=null, shippingCode=null, userId=29, buyerMessage=null, buyerNick=null, receiverAreaName=北京市 市辖区 海淀区 bz, receiverMobile=12345678988, receiverZipCode=01000, receiver=hjw, expire=null)], attachments={path=com.wgsc.shopping_common.service.ZfbpayService, remote.application=shopping_order_customer_api, interface=com.wgsc.shopping_common.service.ZfbpayService, version=0.0.0}]], channel: /192.168.66.10:58839 -> /192.168.66.10:20886
	at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:113)
	at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:260)
	at org.apache.dubbo.rpc.cluster.interceptor.ClusterInterceptor.intercept(ClusterInterceptor.java:47)
	at org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$InterceptorInvokerNode.invoke(AbstractCluster.java:92)
	at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:88)
	at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:74)
	at org.apache.dubbo.common.bytecode.proxy3.pcPay(proxy3.java)
	at com.wgsc.shopping_order_customer_api.controller.PaymentController.pcPay(PaymentController.java:31)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.util.concurrent.ExecutionException: org.apache.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer. start time: 2024-04-03 23:00:01.354, end time: 2024-04-03 23:00:02.373, client elapsed: 1 ms, server elapsed: 1018 ms, timeout: 1000 ms, request: Request [id=26, version=2.0.2, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=pcPay, parameterTypes=[class com.wgsc.shopping_common.pojo.Orders], arguments=[Orders(id=1775458507525468161, cartGoods=[CartGoods(id=null, goodId=149187842867996, goodsName=iphone15promax, price=12000.00, headerPic=http://192.168.66.100/group1/M00/00/00/wKhCZGX_UzuASKq3AAAdpJbX8H4755.jpg, num=1, orderId=1775458507525468161)], payment=12000.00, paymentType=2, postFee=null, status=1, createTime=Wed Apr 03 17:41:09 CST 2024, paymentTime=null, consignTime=null, endTime=null, closeTime=null, shippingName=null, shippingCode=null, userId=29, buyerMessage=null, buyerNick=null, receiverAreaName=北京市 市辖区 海淀区 bz, receiverMobile=12345678988, receiverZipCode=01000, receiver=hjw, expire=null)], attachments={path=com.wgsc.shopping_common.service.ZfbpayService, remote.application=shopping_order_customer_api, interface=com.wgsc.shopping_common.service.ZfbpayService, version=0.0.0}]], channel: /192.168.66.10:58839 -> /192.168.66.10:20886
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2022)
	at org.apache.dubbo.rpc.AsyncRpcResult.get(AsyncRpcResult.java:181)
	at org.apache.dubbo.rpc.protocol.AsyncToSyncInvoker.invoke(AsyncToSyncInvoker.java:61)
	at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:78)
	at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:89)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:83)
	at org.apache.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:51)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:83)
	at org.apache.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:69)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:83)
	at org.apache.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56)
	at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:82)
	... 57 more
Caused by: org.apache.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer. start time: 2024-04-03 23:00:01.354, end time: 2024-04-03 23:00:02.373, client elapsed: 1 ms, server elapsed: 1018 ms, timeout: 1000 ms, request: Request [id=26, version=2.0.2, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=pcPay, parameterTypes=[class com.wgsc.shopping_common.pojo.Orders], arguments=[Orders(id=1775458507525468161, cartGoods=[CartGoods(id=null, goodId=149187842867996, goodsName=iphone15promax, price=12000.00, headerPic=http://192.168.66.100/group1/M00/00/00/wKhCZGX_UzuASKq3AAAdpJbX8H4755.jpg, num=1, orderId=1775458507525468161)], payment=12000.00, paymentType=2, postFee=null, status=1, createTime=Wed Apr 03 17:41:09 CST 2024, paymentTime=null, consignTime=null, endTime=null, closeTime=null, shippingName=null, shippingCode=null, userId=29, buyerMessage=null, buyerNick=null, receiverAreaName=北京市 市辖区 海淀区 bz, receiverMobile=12345678988, receiverZipCode=01000, receiver=hjw, expire=null)], attachments={path=com.wgsc.shopping_common.service.ZfbpayService, remote.application=shopping_order_customer_api, interface=com.wgsc.shopping_common.service.ZfbpayService, version=0.0.0}]], channel: /192.168.66.10:58839 -> /192.168.66.10:20886
	at org.apache.dubbo.remoting.exchange.support.DefaultFuture.doReceived(DefaultFuture.java:210)
	at org.apache.dubbo.remoting.exchange.support.DefaultFuture.received(DefaultFuture.java:175)
	at org.apache.dubbo.remoting.exchange.support.DefaultFuture$TimeoutCheckTask.notifyTimeout(DefaultFuture.java:298)
	at org.apache.dubbo.remoting.exchange.support.DefaultFuture$TimeoutCheckTask.lambda$run$0(DefaultFuture.java:285)
	at org.apache.dubbo.common.threadpool.ThreadlessExecutor.waitAndDrain(ThreadlessExecutor.java:93)
	at org.apache.dubbo.rpc.AsyncRpcResult.get(AsyncRpcResult.java:179)
	... 67 more

老师,报错说 Dubbo 远程调用服务时出现了超时异常,但是我修改了超时时间后还是不行

image.png

JAVA 全系列/第十八阶段:亿级高并发电商项目/亿级高并发电商项目(旧) 4楼

java.lang.RuntimeException: org.springframework.data.elasticsearch.RestStatusException: Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]; nested exception is ElasticsearchStatusException[Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Field [tags] is not a completion suggest field]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Field [tags] is not a completion suggest field]];
RestStatusException{status=400} org.springframework.data.elasticsearch.RestStatusException: Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]; nested exception is ElasticsearchStatusException[Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Field [tags] is not a completion suggest field]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Field [tags] is not a completion suggest field]];
Caused by: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Field [tags] is not a completion suggest field]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Field [tags] is not a completion suggest field]];

老师,启动之后搜索补齐关键字,发现底下没有关键词出来,然后看了一下日志发现报错信息是指定的字段(Field)"tags"不是一个完整的建议字段。 但我对比了下视频里的代码发现都是一样的,而且向ES同步商品数据是成功的,不知道怎么解决了

image.png

JAVA 全系列/第十八阶段:亿级高并发电商项目/亿级高并发电商项目(旧) 5楼
JAVA 全系列/第十八阶段:亿级高并发电商项目/亿级高并发电商项目(旧) 6楼
JAVA 全系列/第十八阶段:亿级高并发电商项目/亿级高并发电商项目(旧) 7楼
JAVA 全系列/第十八阶段:亿级高并发电商项目/亿级高并发电商项目(旧) 8楼
JAVA 全系列/第十八阶段:亿级高并发电商项目/亿级高并发电商项目(旧) 9楼
JAVA 全系列/第十八阶段:亿级高并发电商项目/亿级高并发电商项目(旧) 10楼
JAVA 全系列/第十八阶段:亿级高并发电商项目/亿级高并发电商项目(旧) 11楼
JAVA 全系列/第十八阶段:亿级高并发电商项目/亿级高并发电商项目(旧) 12楼
JAVA 全系列/第十八阶段:亿级高并发电商项目/亿级高并发电商项目(旧) 13楼
JAVA 全系列/第十八阶段:亿级高并发电商项目/亿级高并发电商项目(旧) 14楼

JAVA 全系列/第十八阶段:亿级高并发电商项目/亿级高并发电商项目(旧) 15楼

百战程序员微信公众号

百战程序员微信小程序

©2014-2024 百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637