{"action":"created","issue":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/issues/789","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/issues/789/labels{/name}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/issues/789/comments","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/issues/789/events","html_url":"https://github.com/spring-cloud/spring-cloud-netflix/issues/789","id":128405816,"number":789,"title":"eureka client registration determines wrong statuspageurl and healthurl after update from brixton m3 to m4","user":{"login":"pcornelissen","id":1177440,"avatar_url":"https://avatars.githubusercontent.com/u/1177440?v=3","gravatar_id":"","url":"https://api.github.com/users/pcornelissen","html_url":"https://github.com/pcornelissen","followers_url":"https://api.github.com/users/pcornelissen/followers","following_url":"https://api.github.com/users/pcornelissen/following{/other_user}","gists_url":"https://api.github.com/users/pcornelissen/gists{/gist_id}","starred_url":"https://api.github.com/users/pcornelissen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcornelissen/subscriptions","organizations_url":"https://api.github.com/users/pcornelissen/orgs","repos_url":"https://api.github.com/users/pcornelissen/repos","events_url":"https://api.github.com/users/pcornelissen/events{/privacy}","received_events_url":"https://api.github.com/users/pcornelissen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-01-24T15:51:59Z","updated_at":"2016-01-29T15:29:26Z","closed_at":"2016-01-29T13:14:16Z","body":"I am building an application that uses eureka and spring-cloud. I evaluated brixton m3 and everything works fine, but after an update to m4 the clients could not connect to each other anymore.\r\n\r\nAfter some investigation I found out that the eureka client now sends the wrong statuspageurl and healthurl after the update.\r\n\r\nI have attached the corresponding log with debug info from the apache http lib to show the difference:\r\n[brixton-m3.txt](https://github.com/spring-cloud/spring-cloud-netflix/files/102399/brixton-m3.txt)\r\n[brixton-m4.txt](https://github.com/spring-cloud/spring-cloud-netflix/files/102400/brixton-m4.txt)\r\n\r\nThe important part is this:\r\nM3: \"homePageUrl\":\"http://192.168.99.1:48090/\",\"statusPageUrl\":\"http://192.168.99.1:48090/internal/info\",\"healthCheckUrl\":\"http://192.168.99.1:48090/internal/health\",\"vipAddress\":\"lunchdeals\"\r\nM4: \"homePageUrl\":\"http://192.168.99.1:48090/\",\"statusPageUrl\":\"http://192.168.99.1:8080/info\",\"healthCheckUrl\":\"http://192.168.99.1:8080/health\",\"vipAddress\":\"lunchdeals\"\r\nThis is the eureka config that is used by the client:\r\n\r\nHave a look at the ports, M3 uses the correct 48090 and m4 uses 8080 which is wrong the app is not bound to this port at all. (the port is completely free)\r\n\r\n```\r\neureka:\r\n  instance:\r\n    preferIpAddress: true\r\n    leaseRenewalIntervalInSeconds: 10\r\n    statusPageUrlPath: /internal/info\r\n    healthCheckUrlPath: /internal/health\r\n    non-secure-port: 0\r\n    metadataMap:\r\n      instanceId: ${spring.application.name}:${spring.application.instance_id:${random.value}}\r\n      password: ${security.user.password}\r\n  client:\r\n    serviceUrl:\r\n      defaultZone: ${vcap.services.${PREFIX:}eureka.credentials.uri:http://user:password@dockermachine:8761}/eureka/\r\n```\r\n\r\nTo clarify what I did:\r\ndo a clean build with m3 run against my eureka server, capture network traffic, switch to m4 clean again and run the app. So no residual old libs should be present."},"comment":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/issues/comments/176814893","html_url":"https://github.com/spring-cloud/spring-cloud-netflix/issues/789#issuecomment-176814893","issue_url":"https://api.github.com/repos/spring-cloud/spring-cloud-netflix/issues/789","id":176814893,"user":{"login":"dsyer","id":124075,"avatar_url":"https://avatars.githubusercontent.com/u/124075?v=3","gravatar_id":"","url":"https://api.github.com/users/dsyer","html_url":"https://github.com/dsyer","followers_url":"https://api.github.com/users/dsyer/followers","following_url":"https://api.github.com/users/dsyer/following{/other_user}","gists_url":"https://api.github.com/users/dsyer/gists{/gist_id}","starred_url":"https://api.github.com/users/dsyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsyer/subscriptions","organizations_url":"https://api.github.com/users/dsyer/orgs","repos_url":"https://api.github.com/users/dsyer/repos","events_url":"https://api.github.com/users/dsyer/events{/privacy}","received_events_url":"https://api.github.com/users/dsyer/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T15:29:26Z","updated_at":"2016-01-29T15:29:26Z","body":"Actually it's a lot worse than that. The URLs are computed from the port, and so that has to be done again. But the killer is that the instance info (stuff that is registered with eureka) is baked into the `EurekaClient` when it is created. That's why we need lazy beans (per the commit above)."}}