Repro for issue 840 for spring-cloud-netflix
- Have a spring eureka server (@EnableEurekaServer) running on IP 172.17.0.2 (update IP to reflect reality in bootstrap.yml and bootstrap-ok.yml)
- Start the application with the default profile :
mvn spring-boot:run
- View that the application can not contact the eureka server :
IllegalArgumentException : Host name may not be null
- Start the application with the
ok
profile :mvn spring-boot:run -Drun.jvmArguments="-Dspring.profiles.active=ok"
- The application starts with no problem at all
The only difference between the two profiles is that the eureka client defaultZone is specified with the "80" port in the "ok" profile.
failing profile :
eureka:
instance:
preferIpAddress: true
client:
serviceUrl:
defaultZone: http://172.17.0.2/eureka/
ok profile :
eureka:
instance:
preferIpAddress: true
client:
serviceUrl:
defaultZone: http://172.17.0.2:80/eureka/