{"action":"closed","issue":{"url":"https://api.github.com/repos/springfox/springfox/issues/1673","repository_url":"https://api.github.com/repos/springfox/springfox","labels_url":"https://api.github.com/repos/springfox/springfox/issues/1673/labels{/name}","comments_url":"https://api.github.com/repos/springfox/springfox/issues/1673/comments","events_url":"https://api.github.com/repos/springfox/springfox/issues/1673/events","html_url":"https://github.com/springfox/springfox/issues/1673","id":207107203,"number":1673,"title":"@EnableSwagger2 cause the microservice could not be accessed","user":{"login":"GreatJohnny","id":18709866,"avatar_url":"https://avatars.githubusercontent.com/u/18709866?v=3","gravatar_id":"","url":"https://api.github.com/users/GreatJohnny","html_url":"https://github.com/GreatJohnny","followers_url":"https://api.github.com/users/GreatJohnny/followers","following_url":"https://api.github.com/users/GreatJohnny/following{/other_user}","gists_url":"https://api.github.com/users/GreatJohnny/gists{/gist_id}","starred_url":"https://api.github.com/users/GreatJohnny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreatJohnny/subscriptions","organizations_url":"https://api.github.com/users/GreatJohnny/orgs","repos_url":"https://api.github.com/users/GreatJohnny/repos","events_url":"https://api.github.com/users/GreatJohnny/events{/privacy}","received_events_url":"https://api.github.com/users/GreatJohnny/received_events","type":"User","site_admin":false},"labels":[{"id":4478205,"url":"https://api.github.com/repos/springfox/springfox/labels/not-reproducable","name":"not-reproducable","color":"cccccc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/springfox/springfox/milestones/39","html_url":"https://github.com/springfox/springfox/milestone/39","labels_url":"https://api.github.com/repos/springfox/springfox/milestones/39/labels","id":1974106,"number":39,"title":"2.7.0","description":"","creator":{"login":"dilipkrish","id":73257,"avatar_url":"https://avatars.githubusercontent.com/u/73257?v=3","gravatar_id":"","url":"https://api.github.com/users/dilipkrish","html_url":"https://github.com/dilipkrish","followers_url":"https://api.github.com/users/dilipkrish/followers","following_url":"https://api.github.com/users/dilipkrish/following{/other_user}","gists_url":"https://api.github.com/users/dilipkrish/gists{/gist_id}","starred_url":"https://api.github.com/users/dilipkrish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dilipkrish/subscriptions","organizations_url":"https://api.github.com/users/dilipkrish/orgs","repos_url":"https://api.github.com/users/dilipkrish/repos","events_url":"https://api.github.com/users/dilipkrish/events{/privacy}","received_events_url":"https://api.github.com/users/dilipkrish/received_events","type":"User","site_admin":false},"open_issues":110,"closed_issues":45,"state":"open","created_at":"2016-08-31T03:16:25Z","updated_at":"2017-02-16T17:12:35Z","due_on":"2017-03-01T08:00:00Z","closed_at":null},"comments":2,"created_at":"2017-02-13T02:19:07Z","updated_at":"2017-02-16T17:12:35Z","closed_at":"2017-02-16T17:12:35Z","body":"Hi:\r\nI implement a microservice demo  with spring cloud, everything  works fine. but when add @EnableSwagger2 on a service. And it registered with Eureka successfully. But when a @FeignClient access the service . The exception occured:\r\n```\r\n2017-02-13 09:36:00.663  INFO 8840 --- [-hbca-service-1] c.n.l.DynamicServerListLoadBalancer      : DynamicServerListLoadBalancer for client hbca-service initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=hbca-service,current list of Servers=[],Load balancer stats=Zone stats: {},Server stats: []}ServerList:org.springframework.cloud.netflix.ribbon.eureka.DomainExtractingServerList@bf8e220\r\n2017-02-13 09:36:00.727 ERROR 8840 --- [nio-3333-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.netflix.hystrix.exception.HystrixRuntimeException: SalesProxy#index() failed and no fallback available.] with root cause\r\n\r\ncom.netflix.client.ClientException: Load balancer does not have available server for client: hbca-service\r\n\tat com.netflix.loadbalancer.LoadBalancerContext.getServerFromLoadBalancer(LoadBalancerContext.java:483) ~[ribbon-loadbalancer-2.2.2.jar:2.2.2]\r\n...\r\n```\r\nThis is the build.gradle of EurekaServer :\r\n\r\n```\r\nbuildscript {\r\n\text {\r\n\t\tspringBootVersion = '1.5.1.RELEASE'\r\n\t}\r\n\t...\r\n\tdependencies {\r\n\t\tclasspath(\"org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}\")\r\n\t}\r\n}\r\n...\r\ndependencies {\r\n\tcompile('org.springframework.cloud:spring-cloud-starter-eureka-server')\r\n\ttestCompile('org.springframework.boot:spring-boot-starter-test')\r\n}\r\n\r\ndependencyManagement {\r\n\timports {\r\n\t\tmavenBom \"org.springframework.cloud:spring-cloud-dependencies:Dalston.M1\"\r\n\t}\r\n}\r\n```\r\nthe application.yml of EurekaServer:\r\n```\r\nserver:\r\n  port: 1111\r\n\r\nspring:\r\n  application:\r\n    name: eurekaserver\r\n\r\neureka:\r\n  instance:\r\n    hostname: localhost\r\n    preferIpAddress: true   \r\n  client:\r\n    registerWithEureka: false\r\n    fetchRegistry: false\r\n    serviceUrl:\r\n      defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/\r\n```\r\n---------------------------------------------------------\r\nTHe build.gradle of HBService:\r\n```\r\nbuildscript {\r\n\text {\r\n\t\tspringBootVersion = '1.5.1.RELEASE'\r\n\t}\r\n\t...\r\n\tdependencies {\r\n\t\tclasspath(\"org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}\")\r\n\t}\r\n}\r\n...\r\ndependencies {\r\n\tcompile('org.springframework.boot:spring-boot-starter-web')\r\n\tcompile('org.springframework.cloud:spring-cloud-starter-feign')\r\n\tcompile('org.springframework.cloud:spring-cloud-starter-eureka')\r\n\t\r\n\tcompile \"io.springfox:springfox-swagger2:2.6.1\"\r\n\tcompile 'io.springfox:springfox-swagger-ui:2.6.1'\r\n\t\r\n\ttestCompile('org.springframework.boot:spring-boot-starter-test')\r\n}\r\n\r\ndependencyManagement {\r\n\timports {\r\n\t\tmavenBom \"org.springframework.cloud:spring-cloud-dependencies:Camden.RELEASE\"\r\n\t}\r\n}\r\n```\r\nthe applcation.yml of HBService:\r\n```\r\nserver:\r\n  port: 8081\r\n  contextPath: /hbca\r\nspring:\r\n  application:\r\n    name: hbca-service\r\n     \r\neureka:\r\n  client:\r\n    serviceUrl:\r\n      defaultZone: http://127.0.0.1:1111/eureka/\r\n  instance: \r\n    healthCheckUrlPath: ${management.context-path}/health \r\n    appname: hbca-service\r\n```\r\n----------------------------------------------------------------\r\nThe build.gradle of client:\r\n```\r\nbuildscript {\r\n\text {\r\n\t\tspringBootVersion = '1.5.1.RELEASE'\r\n\t}\r\n\t...\r\n\tdependencies {\r\n\t\tclasspath(\"org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}\")\r\n\t}\r\n}\r\n...\r\ndependencies {\r\n\tcompile('org.springframework.boot:spring-boot-starter-web')\r\n\tcompile('org.springframework.cloud:spring-cloud-starter-eureka')\r\n\tcompile('org.springframework.cloud:spring-cloud-starter-feign')\r\n\t\r\n\ttestCompile('org.springframework.boot:spring-boot-starter-test')\r\n}\r\n\r\ndependencyManagement {\r\n\timports {\r\n\t\tmavenBom \"org.springframework.cloud:spring-cloud-dependencies:Dalston.M1\"\r\n\t}\r\n}\r\n```\r\nthe application.yml of client:\r\n```\r\nserver:\r\n  port: 3333\r\n   \r\neureka:\r\n  client:\r\n    serviceUrl:\r\n      defaultZone: http://localhost:1111/eureka/\r\n  instance:\r\n    preferIpAddress: true\r\n```\r\n-----------------------------------------------------------\r\nHere is the demo.[SpringCloudTest.zip](https://github.com/springfox/springfox/files/769916/SpringCloudTest.zip)\r\n\r\nThanks!"}}
{"actor":{"display_login":"dilipkrish"}}