请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

gateway改为lb://business后报错。

spring.cloud.gateway.routes[1].id=business
spring.cloud.gateway.routes[1].uri=lb://business
spring.cloud.gateway.routes[1].predicates[0].name=Path
spring.cloud.gateway.routes[1].predicates[0].args[0]=/business/**

我把spring.cloud.gateway.routes[1].uri的值从http://127.0.0.1:9002改为了lb://business之后,就报错了:

11:18:10.780 ERROR o.s.b.a.w.r.e.AbstractErrorWebExceptionHandler:122  [40de1366]  500 Server Error for HTTP GET "/business/admin/chapter"
io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: DESKTOP-4K04D4K/192.168.0.103:9002
	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Error has been observed at the following site(s):
	|_ checkpoint ⇢ org.springframework.web.cors.reactive.CorsWebFilter [DefaultWebFilterChain]
	|_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain]
	|_ checkpoint ⇢ HTTP GET "/business/admin/chapter" [ExceptionHandlingWebHandler]
Stack trace:
Caused by: java.net.ConnectException: Connection refused: no further information
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
	at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:688)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:635)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:552)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:514)
	at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1050)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)

是访问接口时报的。

老师,帮我看看吧。谢谢。

正在回答

1回答

这样看不出来什么错,各服务都重启下试试,如果还有问题,可加QQ群详细沟通

0 回复 有任何疑惑可以回复我~
  • 已加您QQ,请同意一下。或者可下载我的代码:https://github.com/GaoJingsi/course
    回复 有任何疑惑可以回复我~ 2020-05-01 14:32:30
  • 谢谢老师的帮助!
    回复 有任何疑惑可以回复我~ 2020-05-01 16:01:36
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号