SpringBoot Gateway整合过程中的问题

现象描述:
第一次请求正常,第二次报错,错误如下:

2023-12-25 00:47:46.928 ERROR 5484 --- [ctor-http-nio-6] a.w.r.e.AbstractErrorWebExceptionHandler : [34ab38d8-2]  500 Server Error for HTTP GET "/gateway/config/ip/get?id=1"

io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /10.244.22.41:8080
	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Error has been observed at the following site(s):
	*__checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ HTTP GET "/gateway/config/ip/get?id=1" [ExceptionHandlingWebHandler]
Original 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:337)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	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)

原因是,以下配置设置为true,设置为false即可。还没有追其原因,暂时先这样处理,随后再深入查下原因。

spring:
  cloud:
    gateway:
      discovery:
        locator:
          enabled: true

相关推荐

  1. SpringBoot Gateway整合过程问题

    2023-12-25 06:14:03       51 阅读
  2. 数据库开发与设计过程问题分析总结

    2023-12-25 06:14:03       34 阅读
  3. 微服务使用过程 常见问题 解决方案

    2023-12-25 06:14:03       40 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-25 06:14:03       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-25 06:14:03       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-25 06:14:03       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-25 06:14:03       18 阅读

热门阅读

  1. Spring DefaultListableBeanFactory源码分析

    2023-12-25 06:14:03       41 阅读
  2. Python jupyter notebook 自定义魔术方法

    2023-12-25 06:14:03       30 阅读
  3. conda镜像源,Jupyter内核配置

    2023-12-25 06:14:03       38 阅读
  4. EtherCAT主站SOEM -- 11 -- EtherCAT从站 XML 文件解析

    2023-12-25 06:14:03       35 阅读
  5. 【PostgreSQL表增加/删除字段是否会重写表】

    2023-12-25 06:14:03       34 阅读
  6. C#编程简单应用程序批量修改文件名2.0

    2023-12-25 06:14:03       42 阅读
  7. Node.js教程-mysql模块

    2023-12-25 06:14:03       36 阅读
  8. SQL面试题挑战06:互相关注的人

    2023-12-25 06:14:03       32 阅读
  9. 客户需求分析常用的ChatGPT通用提示词模板

    2023-12-25 06:14:03       38 阅读