Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Error while trying to run the docker compose file. Not able to run the api-gateway #1576

Open
Satyam018 opened this issue Feb 27, 2025 · 0 comments

Comments

@Satyam018
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant