These are chat archives for spring-cloud/spring-cloud
I have problem with one of my services in spring zuul. Services are searched via Eureka.
And for one of them the InstanceInfo contains following properties:
instanceId = "172.20.39.197:foo-service:8763"
appName = "FOO-SERVICE"
appGroupName = null
ipAddr = "172.20.39.197"
sid = "na"
port = 8080
securePort = 443
homePageUrl = "http://172.20.39.197:8080/"
statusPageUrl = "http://172.20.39.197:8080/info"
healthCheckUrl = "http://172.20.39.197:8080/health"
The weird thing is that foo-service works on port 8763... But here port is 8080 (so the port of zull proxy server).
For others services I have correct ports (port property is same as in "172.20.39.197:foo-service:8763" string) and connection can be done.
For this single foo service cannot be.
Any idea why it may happen?
server: port: 8080
eureka: client: eureka-server-port: 8761 server: port: 8763 context-path: /foo-service/rest spring: application: name: foo-service
endpoints: shutdown: enabled: true logging: level: ... // logging staff management: context-path: /admin/system/state security: roles: ROLE_TENANT_ADMIN info: git: mode: full server: session: timeout: 7200 tomcat: accesslog: enabled: true prefix: foo_service_logs. directory: ../logs basedir: tomcat spring: http: converters: preferred-json-mapper: gson jpa.open-in-view: false thymeleaf: cache: false mode: HTML velocity: enabled: false
this is my gateway config
spring: application: name: gateway-server # routes to serviceId zuul: routes: police: path: /police/** stripPrefix: true url: http://localhost:9000/app/ eureka: client.serviceUrl.defaultZone: http://localhost:8761/eureka/ server: port: 9001
Ok I have changed the port of zuul to 9000 and updated the application.yml of foo-service.
And still 8080 displays on zuul site in InstanceInfo for foo-service. Then seems it will be some setting in foo-service.
Configuration is very complex (big application). Then need to go and check one by one.
Thank you for you support!
Ok the problem is earlier. When my foo-service registers itself to eureka already the port is wrong:
public void InstanceRegistry::register(final InstanceInfo info, final boolean isReplication)
instanceId = "172.20.39.197:foo-service:8763" appName = "FOO-SERVICE" appGroupName = null ipAddr = "172.20.39.197" sid = "na" port = 8080