spring-cloud-gateway icon indicating copy to clipboard operation
spring-cloud-gateway copied to clipboard

scg return 500 error.it does not retry although I have configured retries

Open michaelwangwangwang opened this issue 3 years ago • 0 comments

AbstractErrorWebExceptionHandler|[aa7fd694-95055961] 500 Server Error for HTTP POST "/microservice-sbr/queryData" io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /23.148.184.171:8080 Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: Error has been observed at the following site(s): |_ checkpoint ⇢ springfox.boot.starter.autoconfigure.SwaggerUiWebFluxConfiguration$CustomWebFilter [DefaultWebFilterChain] |_ checkpoint ⇢ com.tencent.ssmd.gateway.config.CorsConfiguration$$Lambda$856/0x0000000800b06040 [DefaultWebFilterChain] |_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain] |_ checkpoint ⇢ org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [DefaultWebFilterChain] |_ checkpoint ⇢ HTTP POST "/xlink-service-esdbr/queryData" [ExceptionHandlingWebHandler] Stack trace: Caused by: java.net.ConnectException: finishConnect(..) failed: Connection refused at io.netty.channel.unix.Errors.throwConnectException(Errors.java:124) ~[netty-transport-native-unix-common-4.1.54.Final.jar!/:4.1.54.Final] at io.netty.channel.unix.Socket.finishConnect(Socket.java:251) ~[netty-transport-native-unix-common-4.1.54.Final.jar!/:4.1.54.Final] at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.doFinishConnect(AbstractEpollChannel.java:673) [netty-transport-native-epoll-4.1.54.Final-linux-x86_64.jar!/:4.1.54.Final] at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.finishConnect(AbstractEpollChannel.java:650) [netty-transport-native-epoll-4.1.54.Final-linux-x86_64.jar!/:4.1.54.Final] at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.epollOutReady(AbstractEpollChannel.java:530) [netty-transport-native-epoll-4.1.54.Final-linux-x86_64.jar!/:4.1.54.Final] at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:470) [netty-transport-native-epoll-4.1.54.Final-linux-x86_64.jar!/:4.1.54.Final] at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) [netty-transport-native-epoll-4.1.54.Final-linux-x86_64.jar!/:4.1.54.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [netty-common-4.1.54.Final.jar!/:4.1.54.Final] at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.54.Final.jar!/:4.1.54.Final] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.54.Final.jar!/:4.1.54.Final] at java.lang.Thread.run(Thread.java:834) [?:?]

 discovery:
    locator:
      enabled: true
      lowerCaseServiceId: true
      'predicates[0]':
        name: Path
        args:
          patterns: '''/'' + serviceId + ''/**'''
      'filters[0]':
        name: RewritePath
        args:
          regexp: '''/'' + serviceId + ''/(?<remaining>.*)'''
          replacement: '''/$\{remaining}'''
      'filters[1]':
        name: Retry
        args:
          retries: 3
          exceptions:
            '[0]': '''java.net.ConnectException'''
            '[1]': '''java.io.IOException'''
          statuses:
            '[0]': '''BAD_GATEWAY'''
            '[1]': '''SERVICE_UNAVAILABLE'''
          series:
            '[0]': '''CLIENT_ERROR'''
          methods:
            '[0]': '''GET'''
            '[1]': '''POST'''
            '[2]': '''PUT'''
            '[3]': '''DELETE'''
          backoff:
            firstBackoff: '''100ms'''
            maxBackoff: '''500ms'''
            factor: 2
            basedOnPreviousValue: false

michaelwangwangwang avatar Aug 22 '22 03:08 michaelwangwangwang