'Gateway-service. 500 Server Error for HTTP GET "/"
I'm having some troubles related to the gateway service in Spring boot. I have the following .yml
#spring.profiles.active: local
server:
port: 80
#ssl:
# enabled: true # Uses self-signed certificate because no key-store configuration is specified.
internal.lb.uri: http://34.125.111.144
spring:
cloud:
gateway:
routes:
- id: customers
uri: ${internal.lb.uri}:9001
predicates:
- Path=/api/customers**
filters:
- RewritePath=/(?<path>.*), /$\{path}
- id: employees
uri: ${internal.lb.uri}:9000
predicates:
- Path=/api/employees**
filters:
- RewritePath=/(?<path>.*), /$\{path}
- id: suppliers
uri: ${internal.lb.uri}:9002
predicates:
- Path=/api/suppliers**
filters:
- RewritePath=/(?<path>.*), /$\{path}
- id: webapp
uri: ${internal.lb.uri}:9003
predicates:
- Path=/**
filters:
- RewritePath=/(?<path>.*), /$\{path}
When I run it, it runs perfect! But once I try to connect to localhost it says the following:
So I don't know what's going on! I can't find any solution! Thanks in advance!
Solution 1:[1]
You need to change your -> internal.lb.uri: http://34.125.111.144
and replace it by -> internal.lb.uri: http://localhost
Then restart all the microservices again.
That worked for me
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | elias moreno mata |