shenyu icon indicating copy to clipboard operation
shenyu copied to clipboard

[BUG] httpClient error: recvAddress(..) failed: Connection reset by peer

Open qingchunchencheng opened this issue 8 months ago • 0 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Current Behavior

recvAddress(..) failed: Connection reset by peer

Expected Behavior

version: 2.6.1

env: docker bootstrap config as follow,

shenyu:
  netty:
    http:
      # set to false, user can custom the netty tcp server config.
      webServerFactoryEnabled: true
      selectCount: 2
      workerCount: 16
      accessLog: false
      serverSocketChannel:
        soRcvBuf: 2097152
        soBackLog: 1024
        soReuseAddr: false
        connectTimeoutMillis: 10000
        writeBufferHighWaterMark: 2097152
        writeBufferLowWaterMark: 1048576
        writeSpinCount: 16
        autoRead: false
        allocType: "unpooled"
        messageSizeEstimator: 8
        singleEventExecutorPerGroup: true
      socketChannel:
        soKeepAlive: true
        soReuseAddr: true
        soLinger: -1
        tcpNoDelay: true
        soRcvBuf: 2097152
        soSndBuf: 1048576
        ipTos: 0
        allowHalfClosure: false
        connectTimeoutMillis: 10000
        writeBufferHighWaterMark: 2097152
        writeBufferLowWaterMark: 1048576
        writeSpinCount: 16
        autoRead: false
        allocType: "unpooled"
        messageSizeEstimator: 8
        singleEventExecutorPerGroup: true
  httpclient:
    strategy: webClient # netty
    connectTimeout: 45000
    responseTimeout: 3000
    readerIdleTime: 3000
    writerIdleTime: 3000
    allIdleTime: 3000
    readTimeout: 3000
    writeTimeout: 3000
    wiretap: false
    keepAlive: false
    maxInMemorySize: 6 #6mb
    pool:
      type: ELASTIC
      name: shenyuBoot-proxy
      maxConnections: 2048
      acquireTimeout: 45000
      maxIdleTime: 10000 # unit: ms
      maxLifeTime: 300000  # unit: ms
      evictionInterval: 5000 # unit: ms
      metrics: false

Steps To Reproduce

env: k8s pod spec: 8C16G

Environment

ShenYu version(s):2.6.1
JVM:-XX:+AlwaysPreTouch -XX:-UseBiasedLocking -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./logs/heapdump.hprof -XX:ErrorFile=./logs/hs_err_%p.log -Xms8192m -Xmx8192m -Xmn2048m -Xss512K -XX:+DisableExplicitGC -XX:LargePageSizeInBytes=128m -XX:MaxDirectMemorySize=4096m -XX:MetaspaceSize=512m -XX:MaxMetaspaceSize=1024m

Debug logs

2025-06-16 07:14:07 [reactor-http-epoll-7] ERROR org.apache.shenyu.plugin.httpclient.AbstractHttpClientPlugin - recvAddress(..) failed: Connection reset by peer io.netty.channel.unix.Errors$NativeIoException: recvAddress(..) failed: Connection reset by peer 2025-06-16 07:14:07 [reactor-http-epoll-7] ERROR org.apache.shenyu.web.handler.GlobalErrorHandler - handle error: [d92603a1-592619] Resolved [ResponseStatusException: 408 REQUEST_TIMEOUT "Request timeout, the maximum number of retry times has been exceeded"; nested exception is org.apache.shenyu.plugin.httpclient.exception.ShenyuTimeoutException: Request timeout, the maximum number of retry times has been exceeded]

Anything else?

No response

qingchunchencheng avatar Jun 16 '25 10:06 qingchunchencheng