-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Unable to run the api-gateway while using docker compose. #4417
Comments
Hello, @Satyam018. If you'd like us to look into it, please provide a minimal, complete, verifiable example that reproduces the issue, along with the |
I am working on a spring-boot microservices-based application. I have created separate services for user authentication using auth-services however, I wanted to verify by the user using the jwt token passed in api-gateway. but for some reason I am not able to call the authfilter. spring.application.name=api-gateway AuthFilter class package com.example.api_gateway.filter; import org.springframework.beans.factory.annotation.Autowired; @component
} Auth validator package com.example.api_gateway.filter; import org.springframework.http.HttpHeaders; import java.util.List; @component
JWTservices package com.example.api_gateway.filter; import io.jsonwebtoken.Claims; import java.security.Key; @component
I am not able to call the RouteValidator Functions. what am I missing? Thanks in advance. |
api-gateway-1 | 2025-02-27T05:04:36.938Z INFO 1 --- [api-gateway] [ main] c.n.d.s.t.d.RedirectingEurekaHttpClient : Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://server-registry:8761/eureka/}, exception=I/O error on GET request for "http://server-registry:8761/eureka/apps/": Connect to http://server-registry:8761 [se
rver-registry/172.19.0.6] failed: Connection refused stacktrace=org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://server-registry:8761/eureka/apps/": Connect to http://server-registry:8761 [server-registry/172.19.0.6] failed: Connection refused
Docker Compose File (API-gateway Code):
services:
server-registry:
build: ./server-registry
ports:
- "8761:8761"
networks:
- my-networks
api-gateway:
build: ./api-gateway
depends_on:
- server-registry
ports:
- "8060:8060"
links:
- server-registry
networks:
- my-networks
customer-service:
build: ./customer-service
depends_on:
- server-registry
ports:
- "8080:8080"
networks:
- my-networks
API-gatework (application.properties) file:
spring.application.name=api-gateway
server.port=8760
spring.cloud.gateway.discovery.locator.enabled=true
spring.cloud.gateway.discovery.locator.lower-case-service-id=true
eureka.client.serviceUrl.defaultZone=http://server-registry:8761/eureka/ //(the same URL for other services)
The text was updated successfully, but these errors were encountered: