0

This keeps loading, not returning response.

Log 2025-01-08T13:28:40.752+05:30 DEBUG 44541 --- [api-gateway] [reshExecutor-%d] o.s.c.g.r.RouteDefinitionRouteLocator : RouteDefinition LIMIT-SERVICE applying filter {_genkey_0=/limit-service/(?.), _genkey_1=/${segment}} to RewritePath 2025-01-08T13:28:40.754+05:30 DEBUG 44541 --- [api-gateway] [reshExecutor-%d] o.s.c.g.r.RouteDefinitionRouteLocator : RouteDefinition matched: LIMIT-SERVICE 2025-01-08T13:28:40.754+05:30 DEBUG 44541 --- [api-gateway] [reshExecutor-%d] o.s.c.g.filter.GatewayMetricsFilter : New routes count: 1 2025-01-08T13:29:00.334+05:30 DEBUG 44541 --- [api-gateway] [ parallel-2] .o.ObservationClosingWebExceptionHandler : An exception occurred and observation was not previously stopped, will stop it. The exception was [org.springframework.web.server.ResponseStatusException: 504 GATEWAY_TIMEOUT "Response took longer than timeout: PT20S"] 2025-01-08T13:29:00.352+05:30 DEBUG 44541 --- [api-gateway] [ parallel-2] r.n.http.server.HttpServerOperations : [22889089-1, L:/[0:0:0:0:0:0:0:1]:8765 - R:/[0:0:0:0:0:0:0:1]:57015] Last HTTP response frame 2025-01-08T13:29:00.352+05:30 DEBUG 44541 --- [api-gateway] [ parallel-2] r.n.http.server.HttpServerOperations : [22889089-1, L:/[0:0:0:0:0:0:0:1]:8765 - R:/[0:0:0:0:0:0:0:1]:57015] Headers are not sent before onComplete(). 2025-01-08T13:29:10.768+05:30 DEBUG 44541 --- [api-gateway] [reshExecutor-%d] o.s.c.g.r.RouteDefinitionRouteLocator : RouteDefinition LIMIT-SERVICE applying {_genkey_0=/limit-service/**} to Path 2025-01-08T13:29:10.775+05:30 DEBUG 44541 --- [api-gateway] [reshExecutor-%d] o.s.c.g.r.RouteDefinitionRouteLocator : RouteDefinition LIMIT-SERVICE applying filter {_genkey_0=/limit-service/(?.), _genkey_1=/${segment}} to RewritePath 2025-01-08T13:29:10.777+05:30 DEBUG 44541 --- [api-gateway] [reshExecutor-%d] o.s.c.g.r.RouteDefinitionRouteLocator : RouteDefinition matched: LIMIT-SERVICE 2025-01-08T13:29:10.778+05:30 DEBUG 44541 --- [api-gateway] [reshExecutor-%d] o.s.c.g.filter.GatewayMetricsFilter : New routes count: 1 2025-01-08T13:29:40.821+05:30 DEBUG 44541 --- [api-gateway] [reshExecutor-%d] o.s.c.g.r.RouteDefinitionRouteLocator : RouteDefinition LIMIT-SERVICE applying {_genkey_0=/limit-service/} to Path 2025-01-08T13:29:40.849+05:30 DEBUG 44541 --- [api-gateway] [reshExecutor-%d] o.s.c.g.r.RouteDefinitionRouteLocator : RouteDefinition LIMIT-SERVICE applying filter {_genkey_0=/limit-service/(?.*), _genkey_1=/${segment}} to RewritePath 2025-01-08T13:29:40.850+05:30 DEBUG 44541 --- [api-gateway] [reshExecutor-%d] o.s.c.g.r.RouteDefinitionRouteLocator : RouteDefinition matched: LIMIT-SERVICE 2025-01-08T13:29:40.852+05:30 DEBUG 44541 --- [api-gateway] [reshExecutor-%d] o.s.c.g.filter.GatewayMetricsFilter : New routes count: 1 2025-01-08T13:30:10.026+05:30 INFO 44541 --- [api-gateway] [rap-executor-%d] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration 2025-01-08T13:30:10.889+05:30 DEBUG 44541 --- [api-gateway] [reshExecutor-%d] o.s.c.g.r.RouteDefinitionRouteLocator : RouteDefinition LIMIT-SERVICE applying {_genkey_0=/limit-service/} to Path

Gateway Application yml is

eureka:
  client:
    serviceUrl:
      defaultZone: http://localhost:8761/eureka
  instance:
    hostname: localhost
logging:
  level:
    org:
      springframework:
        cloud:
          gateway: DEBUG
        web:
          reactive:
            function:
              client:
                 ExchangeFunctions: DEBUG
    reactor:
      netty: DEBUG
management:
  endpoint:
    gateway:
      enabled: true
    routes:
      enabled: true
  endpoints:
    web:
      exposure:
        include: '*'
  metrics:
    export:
      enabled: false
server:
  port: 8765
spring:
  application:
    name: api-gateway
  cloud:
    gateway:
      globalcors:
        corsConfigurations:
          '[/**]':
            allowedOrigins: '*'
            allowedHeaders: '*'
            allowedMethods: '*'
        add-to-simple-url-handler-mapping: 'true'
      httpclient:
        connect-timeout: 20000  # 5 seconds
        response-timeout: 20000
      routes:
        - id: LIMIT-SERVICE
          uri:
            http://localhost:8080
          predicates:
             - Path=/limit-service/**
          filters:
            - RewritePath=/limit-service/(?<segment>.*), /${segment}
      discovery:
        client:
          enabled: true
        locator:
          enabled: false
          lower-case-service-id: true
          lowerCaseServiceId: true
  web:
    cors:
      allowed-methods: GET,POST,PUT,DELETE,OPTIONS
      allowed-origins: '*'

Downstream service url is

http://localhost:8080/limits which works

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.