gateway改为lb://business后报错。
来源:5-3 大章列表查询功能开发3
他门说这就是人生
2020-05-01
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群详细沟通
022020-05-01
相似问题