Describe the bug
Simple eureka-server with two simple clients; client1 can't seem to call client2.
Both clients do appear in discoveryClient.getInstances().
Sample Attached client and server samples
Steps to reproduce:
1. start the eureka-server with ./mvnw spring-boot:run
-
start the client twice, in two terminal tabs, with
SPRING_APPLICATION_NAME=app1 ./mvnw spring-boot:runandSERVER_PORT=8081 SPRING_APPLICATION_NAME=app2 ./mvnw spring-boot:run -
call app1 with
curl http://localhost:8080/greeting/app2expected:Greeting from app2actual:Target service not found: No instances available for app2
Note: calling app1 with curl http://localhost:8080/service-instances/app2 (which returns the result of discoveryClient.getInstances("app2"))
returns:
[{"instanceInfo":{"instanceId":"192.168.1.118:app2:8081","app":"APP2","appGroupName":null,"ipAddr":"192.168.1.118","sid":"na","homePageUrl":"http://192.168.1.118:8081/","statusPageUrl":"http://192.168.1.118:8081/actuator/info","healthCheckUrl":"http://192.168.1.118:8081/actuator/health","secureHealthCheckUrl":null,"vipAddress":"app2","secureVipAddress":"app2","countryId":1,"dataCenterInfo":{"@class":"com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo","name":"MyOwn"},"hostName":"192.168.1.118","status":"UP","overriddenStatus":"UNKNOWN","leaseInfo":{"renewalIntervalInSecs":30,"durationInSecs":90,"registrationTimestamp":1615303005825,"lastRenewalTimestamp":1615303005825,"evictionTimestamp":0,"serviceUpTimestamp":1615303005311},"isCoordinatingDiscoveryServer":false,"metadata":{"management.port":"8081"},"lastUpdatedTimestamp":1615303005825,"lastDirtyTimestamp":1615303004946,"actionType":"ADDED","asgName":null},"instanceId":"192.168.1.118:app2:8081","serviceId":"APP2","uri":"http://192.168.1.118:8081","metadata":{"management.port":"8081"},"secure":false,"scheme":"http","host":"192.168.1.118","port":8081}]