spring-cloud / spring-cloud-netflix

Integration with Netflix OSS components
http://cloud.spring.io/spring-cloud-netflix/
Apache License 2.0
4.87k stars 2.44k forks source link

spring boot 2.0,eureka registration failed with spring security #2754

Closed yuanych closed 6 years ago

yuanych commented 6 years ago

spring boot 1.5.x is ok, but when i update to boot 2.0,eureka client registration failed.

1.eureka server config:

server.port=9001 
spring.application.name=eureka-server 

spring.security.user.name=admin 
spring.security.user.password=pwd 

eureka.instance.hostname=localhost 
eureka.client.register-with-eureka=false 
eureka.client.fetch-registry=false 
eureka.client.service-url.defaultZone=http://admin:pwd@localhost:9001/eureka/

2.eureka client config:

server.port=8401 
spring.application.name=eureka-client 

spring.security.basic.enabled=true 
spring.security.user.name=admin 
spring.security.user.password=pwd 

eureka.instance.hostname=localhost 
eureka.client.service-url.defaultZone=http://admin:pwd@localhost:9001/eureka/

3.eureka client logs:

/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/bin/java -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=64118 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=64119:/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/lib/tools.jar:/Users/yuanych/IdeaProjects/gradle-demo/xdemo2/out/production/classes:/Users/yuanych/IdeaProjects/gradle-demo/xdemo2/out/production/resources:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-starter-netflix-eureka-client/2.0.0.M7/8afefb053e6acdae8bfe5bd929543a53f69a081/spring-cloud-starter-netflix-eureka-client-2.0.0.M7.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-starter-openfeign/2.0.0.M1/f1ced3d4d3d65f9dd83d100b6424fd6932764c45/spring-cloud-starter-openfeign-2.0.0.M1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-starter-netflix-ribbon/2.0.0.M7/fd22af7015d48f86f2aa85e4367dec269eab15f6/spring-cloud-starter-netflix-ribbon-2.0.0.M7.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-starter-security/2.0.0.M3/3e40fe97bc6444e3532b1657b070eae9bc9590c6/spring-cloud-starter-security-2.0.0.M3.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-actuator/2.0.0.RELEASE/22d7f64be5452ddad3fd0d651c818de658a18f3e/spring-boot-starter-actuator-2.0.0.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-security/2.0.0.M3/8ac35d5896cc16029a5f9049021e581b3b40686f/spring-cloud-security-2.0.0.M3.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-web/2.0.0.RELEASE/fcb2a9e18f98382e626935841f85ed44d7153615/spring-boot-starter-web-2.0.0.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-security/2.0.0.RELEASE/393ab221bc9aba9c5c59808115177dc5cfaf1b4c/spring-boot-starter-security-2.0.0.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-starter-netflix-archaius/2.0.0.M7/2f0a23e5149a531a4d8b2188f9790d487cb79316/spring-cloud-starter-netflix-archaius-2.0.0.M7.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-starter/2.0.0.M8/b9e41ecbeac88cbc2b1690a3e1f501caa3096d73/spring-cloud-starter-2.0.0.M8.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-netflix-eureka-client/2.0.0.M7/679294e8ab30a86cbb8961dd399be5efb7cabd1c/spring-cloud-netflix-eureka-client-2.0.0.M7.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-netflix-core/2.0.0.M7/ad0e213aac3d8852a4402efb5cddf0d98678cb99/spring-cloud-netflix-core-2.0.0.M7.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.netflix.eureka/eureka-core/1.8.6/edbbe1bb8dd27dfe18d2584b9b77e382846fd28/eureka-core-1.8.6.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.netflix.ribbon/ribbon-eureka/2.2.4/21a27ef8be22e85df2b837398004aea907a920fb/ribbon-eureka-2.2.4.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.netflix.eureka/eureka-client/1.8.6/1d10095e205772617fc6d4bfa2fced4d230c0446/eureka-client-1.8.6.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.thoughtworks.xstream/xstream/1.4.9/c43f6e6bfa79b56e04a8898a923c3cf7144dd460/xstream-1.4.9.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-openfeign-core/2.0.0.M1/918f3917501ef3e3c9a4b20983645e5b774cfadc/spring-cloud-openfeign-core-2.0.0.M1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-netflix-ribbon/2.0.0.M7/f8bcfcffae7edf81d07c6eb9a8a1ad58bff74809/spring-cloud-netflix-ribbon-2.0.0.M7.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.netflix.ribbon/ribbon/2.2.4/6cd5aaa08e53e8871df633c94dc814f1c365ba5d/ribbon-2.2.4.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.netflix.ribbon/ribbon-httpclient/2.2.4/7abf937cdc019e6137aecf5499e95ea213802255/ribbon-httpclient-2.2.4.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.netflix.ribbon/ribbon-transport/2.2.4/84c8b4801225ba52a929fdca41ccc0f2177f3db4/ribbon-transport-2.2.4.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.netflix.ribbon/ribbon-loadbalancer/2.2.4/2927d9956875fe0cbe8cd7d8e845b1943d08548c/ribbon-loadbalancer-2.2.4.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.netflix.ribbon/ribbon-core/2.2.4/f86e87244899fb0e5afda719aa76b5ce6b87453b/ribbon-core-2.2.4.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/io.github.openfeign/feign-hystrix/9.5.1/f9efeb59ff2380447dc75863eb7e4ecf054891c/feign-hystrix-9.5.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.netflix.hystrix/hystrix-core/1.5.12/75379b6671fcaa9cec33035df684a68ec7741ca6/hystrix-core-1.5.12.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/io.reactivex/rxnetty-contexts/0.4.9/6efe17a25602a5424c18ab975aa9c28b6d6b7f56/rxnetty-contexts-0.4.9.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/io.reactivex/rxnetty-servo/0.4.9/b7d6d6e132686c280f16710eaa3e90719f6808f8/rxnetty-servo-0.4.9.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/io.reactivex/rxnetty/0.4.9/5aff3c9d6bb9d9066c378bb3d2a4413ed1773bcf/rxnetty-0.4.9.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/io.reactivex/rxjava/1.2.0/42bfaf64c94f3848ebf5cf1c2ea4ec9d1b3ac6c8/rxjava-1.2.0.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-json/2.0.0.RELEASE/5a09c939d8bd60d7f163c1c0c20a3127ba9fffa/spring-boot-starter-json-2.0.0.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.security.oauth.boot/spring-security-oauth2-autoconfigure/2.0.0.RELEASE/33a13c816d32b6360c4ab4fa34a80dbab4b4bbf1/spring-security-oauth2-autoconfigure-2.0.0.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.security.oauth/spring-security-oauth2/2.2.1.RELEASE/963dee6004e5969511d594269af42b9cfc13a19f/spring-security-oauth2-2.2.1.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework/spring-webmvc/5.0.4.RELEASE/addcf1caa22613c474bd6dde8c7134fef940b1f0/spring-webmvc-5.0.4.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-web/5.0.3.RELEASE/1c688054bfe015bcd067426f5ad77c01dd6486ac/spring-security-web-5.0.3.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework/spring-web/5.0.4.RELEASE/9565bbc67bf1a850a6505deaa5103931712a7b80/spring-web-5.0.4.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-commons/2.0.0.M8/500008e1901a2c72889a4d12d7004aeedf195d0a/spring-cloud-commons-2.0.0.M8.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/io.github.openfeign/feign-slf4j/9.5.1/4770c5f4ad5d9014c161a86ff67891f81af409f1/feign-slf4j-9.5.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/io.github.openfeign/feign-java8/9.5.1/598f938d41e60e87e4a9f6f859c7254645d8877c/feign-java8-9.5.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/io.github.openfeign/feign-core/9.5.1/590613b1bd18ec0396391fb259e00b7d685ee3e6/feign-core-9.5.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-aop/2.0.0.RELEASE/9afd572ca8de272e6d919d914db5c73cd7d06ea2/spring-boot-starter-aop-2.0.0.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter/2.0.0.RELEASE/6d7d8e4bf053cd1833f3c7dbce676bc274f0892f/spring-boot-starter-2.0.0.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-actuator-autoconfigure/2.0.0.RELEASE/ffaa094aef881dbb30621f6f042dcfec125ffe9/spring-boot-actuator-autoconfigure-2.0.0.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/io.micrometer/micrometer-core/1.0.1/698281b5829a16ddea19f3a5d4414d7ece1d3f11/micrometer-core-1.0.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-tomcat/2.0.0.RELEASE/908bc9de1a7cfa857edf44182d426f6e0d8a3008/spring-boot-starter-tomcat-2.0.0.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.hibernate.validator/hibernate-validator/6.0.7.Final/8b9d9c7ec8c73963ea0fe81912fc67711a4ef76/hibernate-validator-6.0.7.Final.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-config/5.0.3.RELEASE/6581e8c83eb5a08e1578fdd3093fd096e81e82ba/spring-security-config-5.0.3.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/2.0.0.RELEASE/c89896a469ecf92996ecba40755919896ace5470/spring-boot-autoconfigure-2.0.0.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-actuator/2.0.0.RELEASE/309a5d45b09e361d29c9e7d1def644d70a50173b/spring-boot-actuator-2.0.0.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot/2.0.0.RELEASE/771da2071ff14a47f108642a641c204ae4ef7b15/spring-boot-2.0.0.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-core/5.0.3.RELEASE/6cc79dd1db872ff306a3c9ae9e5c047b649c84e3/spring-security-core-5.0.3.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework/spring-context/5.0.4.RELEASE/3e76d08c851113077642c5704f0f94d5ce58e905/spring-context-5.0.4.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aop/5.0.4.RELEASE/f8e029e54c0267dadb6b9f713f3feb54ec4f3a0e/spring-aop-5.0.4.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-context/2.0.0.M8/4bddeb99b5af8f887a18f51a693edb375d1cf7f4/spring-cloud-context-2.0.0.M8.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-rsa/1.0.5.RELEASE/31bd1111ada2f455eb0f492ed09e39deda18ca99/spring-security-rsa-1.0.5.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.codehaus.jettison/jettison/1.3.7/7d36a59a0577f11b12088b9e215d6860345b9e1d/jettison-1.3.7.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.netflix.netflix-commons/netflix-eventbus/0.3.0/3f864adbe81f0849729fcbba3fe693c32be739ea/netflix-eventbus-0.3.0.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.netflix.archaius/archaius-core/0.7.5/dca1d103bb45a12bd128906dd5372ee237a90de8/archaius-core-0.7.5.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.sun.jersey.contribs/jersey-apache-client4/1.19.1/e1c45701a003097ace96bed4bc8fb937e9867498/jersey-apache-client4-1.19.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.sun.jersey/jersey-client/1.19.1/2df97ebd4e5c01599584c45caa3aeb563d268eef/jersey-client-1.19.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.sun.jersey/jersey-core/1.19.1/4282d106f2acd5051bd9bc2935ed9a2920c9385/jersey-core-1.19.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/javax.ws.rs/jsr311-api/1.1.1/59033da2a1afd56af1ac576750a8d0b1830d59e6/jsr311-api-1.1.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.netflix.servo/servo-core/0.10.1/7461ed61647f9996c88ad822546ffc7851a45e0e/servo-core-0.10.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.5/1603dfd56ebcd583ccdf337b6c3984ac55d89e58/httpclient-4.5.5.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.google.inject/guice/4.1.0/eeb69005da379a10071aa4948c48d89250febb07/guice-4.1.0.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.github.vlsi.compactmap/compactmap/1.2.1/27aec1f3162c14b8a1178bb5c75ab43b618308ef/compactmap-1.2.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.9.3/7d739db3f7975d082acbbade17986d018dc473c2/jackson-datatype-jsr310-2.9.3.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/2.9.3/75004a75b8a4d5927211141a679951d39999e6c4/jackson-datatype-jdk8-2.9.3.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.module/jackson-module-parameter-names/2.9.3/34c22452e76a4074ef47070c2f5e7a1f0ff95d7/jackson-module-parameter-names-2.9.3.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.9.3/193b96ef555b2f2573b576887ba9a93e4bf48e8c/jackson-databind-2.9.3.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.9.0/7c10d545325e3a6e72e06381afe469fd40eb701/jackson-annotations-2.9.0.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.9.3/ea9b6fc7bc3ccba9777b0827091f9aa1f8580371/jackson-core-2.9.3.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.codehaus.woodstox/woodstox-core-asl/4.4.1/84fee5eb1a4a1cefe65b6883c73b3fa83be3c1a1/woodstox-core-asl-4.4.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-netflix-archaius/2.0.0.M7/7bf059bea45a690adf790f80195e62b495b3951/spring-cloud-netflix-archaius-2.0.0.M7.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/commons-configuration/commons-configuration/1.8/6cce40435bcd8018018f16898de01976b319941a/commons-configuration-1.8.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.netflix.netflix-commons/netflix-infix/0.3.0/acc65969f7367ddd2f1265e0cd7330509ed530dc/netflix-infix-0.3.0.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.netflix.servo/servo-internal/0.10.1/bb6f9cd7b309189bad01b93a806ba9d6cb5d915a/servo-internal-0.10.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/18.0/cce0823396aa693798f8882e64213b1772032b09/guava-18.0.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.netflix.netflix-commons/netflix-commons-util/0.1.1/39e67061780476f207b31465baaed84a91ff659f/netflix-commons-util-0.1.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.netflix.netflix-commons/netflix-statistics/0.1.1/12f6e48253f9cafa0e24d7d232ff504c52143212/netflix-statistics-0.1.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-logging/2.0.0.RELEASE/fe939b71659ef1f98a53cce0b5bcf771685cf6a6/spring-boot-starter-logging-2.0.0.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.3/7c4f3c474fb2c041d8028740440937705ebb473a/logback-classic-1.2.3.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-to-slf4j/2.10.0/f7e631ccf49cfc0aefa4a2a728da7d374c05bd3c/log4j-to-slf4j-2.10.0.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.slf4j/jul-to-slf4j/1.7.25/af5364cd6679bfffb114f0dec8a157aaa283b76/jul-to-slf4j-1.7.25.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.25/da76ca59f6a57ee3102f8f9bd9cee742973efa8a/slf4j-api-1.7.25.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/xmlpull/xmlpull/1.1.3.1/2b8e230d2ab644e4ecaa94db7cdedbc40c805dfa/xmlpull-1.1.3.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/xpp3/xpp3_min/1.1.4c/19d4e90b43059058f6e056f794f0ea4030d60b86/xpp3_min-1.1.4c.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/javax.inject/javax.inject/1/6975da39a7040257bd51d21a231b76c915872d38/javax.inject-1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/commons-lang/commons-lang/2.6/ce1edb914c94ebc388f086c6827e8bdeec71ac2/commons-lang-2.6.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/commons-collections/commons-collections/3.2.2/8ad72fe39fa8c91eaaf12aadb21e0c3661fe26d5/commons-collections-3.2.2.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/5.0.4.RELEASE/7a8c3d48d4c33621e64d1399721d8e067450fcbd/spring-beans-5.0.4.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/5.0.4.RELEASE/4bda161f2e34c1486f2527a23eb47293567f473c/spring-expression-5.0.4.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/5.0.4.RELEASE/2221a957b5561a34f044350ba4e30ef5870254a3/spring-core-5.0.4.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-crypto/5.0.3.RELEASE/3781c0af8e85e18d1d8807f9731eb347641fac13/spring-security-crypto-5.0.3.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/javax.annotation/javax.annotation-api/1.3.2/934c04d3cfef185a8008e7bf34331b79730a9d43/javax.annotation-api-1.3.2.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.yaml/snakeyaml/1.19/2d998d3d674b172a588e54ab619854d073f555b5/snakeyaml-1.19.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.hdrhistogram/HdrHistogram/2.1.10/9e1ac84eed220281841b75e72fb9de5a297fbf04/HdrHistogram-2.1.10.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.latencyutils/LatencyUtils/2.0.3/769c0b82cb2421c8256300e907298a9410a2a3d3/LatencyUtils-2.0.3.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-websocket/8.5.28/8a5a48740dd80cad644ceb541e77fd8e0809e3b7/tomcat-embed-websocket-8.5.28.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-core/8.5.28/b684c98cf77c6528079c4e59fc1feeb218bf82f1/tomcat-embed-core-8.5.28.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-el/8.5.28/75745598f60646ccf0c4b105468a9c8be9b8432e/tomcat-embed-el-8.5.28.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/javax.validation/validation-api/2.0.1.Final/cb855558e6271b1b32e716d24cb85c7f583ce09e/validation-api-2.0.1.Final.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.jboss.logging/jboss-logging/3.3.2.Final/3789d00e859632e6c6206adc0c71625559e6e3b0/jboss-logging-3.3.2.Final.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.fasterxml/classmate/1.3.4/3d5f48f10bbe4eb7bd862f10c0583be2e0053c6/classmate-1.3.4.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-jwt/1.0.9.RELEASE/3b060c3c397a7638b07c2a4850e03affd335097f/spring-security-jwt-1.0.9.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcpkix-jdk15on/1.56/4648af70268b6fdb24674fb1fd7c1fcc73db1231/bcpkix-jdk15on-1.56.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.aspectj/aspectjweaver/1.8.13/ad94df2a28d658a40dc27bbaff6a1ce5fbf04e9b/aspectjweaver-1.8.13.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/stax/stax-api/1.0.1/49c100caf72d658aca8e58bd74a4ba90fa2b0d70/stax-api-1.0.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-math/2.2/4877b85d388275f994a5cfc7eceb73a8045d3006/commons-math-2.2.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.9/a86ce739e5a7175b4b234c290a00a5fdb80957a0/httpcore-4.4.9.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/commons-codec/commons-codec/1.11/3acb4705652e16236558f0f4f2192cc33c3bd189/commons-codec-1.11.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/aopalliance/aopalliance/1.0/235ba8b489512805ac13a8f9ea77a1ca5ebe3e8/aopalliance-1.0.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.github.andrewoma.dexx/dexx-collections/0.2/a1cff10827ee471c215a99585b99f00d3a602194/dexx-collections-0.2.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/javax.xml.stream/stax-api/1.0-2/d6337b0de8b25e53e81b922352fbea9f9f57ba0b/stax-api-1.0-2.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.codehaus.woodstox/stax2-api/3.1.4/ac19014b1e6a7c08aad07fe114af792676b685b7/stax2-api-3.1.4.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/io.netty/netty-codec-http/4.1.22.Final/3805f3ca0d57630200defc7f9bb6ed3382dcb10b/netty-codec-http-4.1.22.Final.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/io.netty/netty-transport-native-epoll/4.1.22.Final/8d2149a9381fe8e38c44a9433d752aaa060bd4d3/netty-transport-native-epoll-4.1.22.Final.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.springframework/spring-jcl/5.0.4.RELEASE/3053e2bad0a18571bdbb9596ce51f9d458f5934f/spring-jcl-5.0.4.RELEASE.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.56/a153c6f9744a3e9dd6feab5e210e1c9861362ec7/bcprov-jdk15on-1.56.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/commons-jxpath/commons-jxpath/1.3/c22d7d0f0f40eb7059a23cfa61773a416768b137/commons-jxpath-1.3.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/joda-time/joda-time/2.9.9/f7b520c458572890807d143670c9b24f4de90897/joda-time-2.9.9.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.antlr/antlr-runtime/3.4/8f011408269a8e42b8548687e137d8eeb56df4b4/antlr-runtime-3.4.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.8.2/3edcfe49d2c6053a70a2a47e4e1c2f94998a49cf/gson-2.8.2.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/io.netty/netty-codec/4.1.22.Final/239c0af275952e70bb4adf7cf8c03d88ddc394c9/netty-codec-4.1.22.Final.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/io.netty/netty-transport-native-unix-common/4.1.22.Final/6bacdbb3711aa9db2984da0b0ed7c5bc838136d2/netty-transport-native-unix-common-4.1.22.Final.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/io.netty/netty-transport/4.1.22.Final/3bd455cd9e5e5fb2e08fd9cd0acfa54c079ca989/netty-transport-4.1.22.Final.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/io.netty/netty-buffer/4.1.22.Final/15e964a2095031364f534a6e21977f5ee9ca32a9/netty-buffer-4.1.22.Final.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/io.netty/netty-resolver/4.1.22.Final/b5484d17a97cb57b07d2a1ac092c249e47234c17/netty-resolver-4.1.22.Final.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/io.netty/netty-common/4.1.22.Final/56ff4deca53fc791ed59ac2b72eb6718714a4de9/netty-common-4.1.22.Final.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-core/1.2.3/864344400c3d4d92dfeb0a305dc87d953677c03c/logback-core-1.2.3.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-api/2.10.0/fec5797a55b786184a537abd39c3fa1449d752d6/log4j-api-2.10.0.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.codehaus.jackson/jackson-mapper-asl/1.9.13/1ee2f2bed0e5dd29d1cb155a166e6f8d50bbddb7/jackson-mapper-asl-1.9.13.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.antlr/stringtemplate/3.2.1/59ec8083721eae215c6f3caee944c410d2be34de/stringtemplate-3.2.1.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/antlr/antlr/2.7.7/83cd2cd674a217ade95a4bb83a8a14f351f48bd0/antlr-2.7.7.jar:/Users/yuanych/.gradle/caches/modules-2/files-2.1/org.codehaus.jackson/jackson-core-asl/1.9.13/3c304d70f42f832e0a86d45bd437f692129299a4/jackson-core-asl-1.9.13.jar com.example.xdemo2.Xdemo2Application 
objc[521]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined. 
2018-03-03 11:08:26.373  INFO 521 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@293a5bf6: startup date [Sat Mar 03 11:08:26 CST 2018]; root of context hierarchy 
2018-03-03 11:08:26.943  INFO 521 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring 
2018-03-03 11:08:27.025  INFO 521 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$1ea8e527] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 

  .   ____          _            __ _ _ 
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \ 
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ 
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) ) 
  '  |____| .__|_| |_|_| |_\__, | / / / / 
 =========|_|==============|___/=/_/_/_/ 
 :: Spring Boot ::        (v2.0.0.RELEASE) 

2018-03-03 11:08:27.266  INFO 521 --- [           main] com.example.xdemo2.Xdemo2Application     : No active profile set, falling back to default profiles: default 
2018-03-03 11:08:27.287  INFO 521 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@59d4cd39: startup date [Sat Mar 03 11:08:27 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@293a5bf6 
2018-03-03 11:08:28.601  INFO 521 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'environmentWebEndpointExtension' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.actuate.autoconfigure.env.EnvironmentEndpointAutoConfiguration; factoryMethodName=environmentWebEndpointExtension; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/actuate/autoconfigure/env/EnvironmentEndpointAutoConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.cloud.autoconfigure.LifecycleMvcEndpointAutoConfiguration$EndpointConfiguration; factoryMethodName=environmentWebEndpointExtension; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/cloud/autoconfigure/LifecycleMvcEndpointAutoConfiguration$EndpointConfiguration.class]] 
2018-03-03 11:08:28.949  INFO 521 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=3abc6631-d217-33a6-a8c0-7d6a8f13cae5 
2018-03-03 11:08:28.990  INFO 521 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring 
2018-03-03 11:08:29.113  INFO 521 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$1ea8e527] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 
2018-03-03 11:08:29.439  INFO 521 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8401 (http) 
2018-03-03 11:08:29.466  INFO 521 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat] 
2018-03-03 11:08:29.467  INFO 521 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.28 
2018-03-03 11:08:29.473  INFO 521 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/Users/yuanych/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.] 
2018-03-03 11:08:29.580  INFO 521 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext 
2018-03-03 11:08:29.580  INFO 521 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2293 ms 
2018-03-03 11:08:30.804  INFO 521 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*] 
2018-03-03 11:08:30.804  INFO 521 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*] 
2018-03-03 11:08:30.804  INFO 521 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*] 
2018-03-03 11:08:30.804  INFO 521 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*] 
2018-03-03 11:08:30.805  INFO 521 --- [ost-startStop-1] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*] 
2018-03-03 11:08:30.805  INFO 521 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpTraceFilter' to: [/*] 
2018-03-03 11:08:30.805  INFO 521 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webMvcMetricsFilter' to: [/*] 
2018-03-03 11:08:30.805  INFO 521 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/] 
2018-03-03 11:08:31.177  WARN 521 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources. 
2018-03-03 11:08:31.178  INFO 521 --- [           main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath. 
2018-03-03 11:08:31.184  WARN 521 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources. 
2018-03-03 11:08:31.184  INFO 521 --- [           main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath. 
2018-03-03 11:08:31.425  INFO 521 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@59d4cd39: startup date [Sat Mar 03 11:08:27 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@293a5bf6 
2018-03-03 11:08:31.525  INFO 521 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest) 
2018-03-03 11:08:31.526  INFO 521 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) 
2018-03-03 11:08:31.583  INFO 521 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 
2018-03-03 11:08:31.583  INFO 521 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 
2018-03-03 11:08:31.638  INFO 521 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 
2018-03-03 11:08:32.417  INFO 521 --- [           main] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher@1, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@3bd6ba24, org.springframework.security.web.context.SecurityContextPersistenceFilter@4375b013, org.springframework.security.web.header.HeaderWriterFilter@429f7919, org.springframework.security.web.csrf.CsrfFilter@4e49ce2b, org.springframework.security.web.authentication.logout.LogoutFilter@640ab13c, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@6ab4a5b, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@507d64aa, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@2d4608a6, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@4f5b08d, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@47c40b56, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@58f437b0, org.springframework.security.web.session.SessionManagementFilter@cda6019, org.springframework.security.web.access.ExceptionTranslationFilter@5d8ab698, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@9679750] 
2018-03-03 11:08:32.764  INFO 521 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/health],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>) 
2018-03-03 11:08:32.765  INFO 521 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/info],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>) 
2018-03-03 11:08:32.766  INFO 521 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto protected java.util.Map<java.lang.String, java.util.Map<java.lang.String, org.springframework.boot.actuate.endpoint.web.Link>> org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping.links(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) 
2018-03-03 11:08:32.971  INFO 521 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup 
2018-03-03 11:08:32.989  INFO 521 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure 
2018-03-03 11:08:32.990  INFO 521 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'environmentManager' has been autodetected for JMX exposure 
2018-03-03 11:08:32.992  INFO 521 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'refreshScope' has been autodetected for JMX exposure 
2018-03-03 11:08:32.996  INFO 521 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean 'environmentManager': registering with JMX server as MBean [org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager] 
2018-03-03 11:08:33.013  INFO 521 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean 'refreshScope': registering with JMX server as MBean [org.springframework.cloud.context.scope.refresh:name=refreshScope,type=RefreshScope] 
2018-03-03 11:08:33.055  INFO 521 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [org.springframework.cloud.context.properties:name=configurationPropertiesRebinder,context=59d4cd39,type=ConfigurationPropertiesRebinder] 
2018-03-03 11:08:33.078  INFO 521 --- [           main] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 0 
2018-03-03 11:08:33.096  INFO 521 --- [           main] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING 
2018-03-03 11:08:33.246  INFO 521 --- [           main] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1 
2018-03-03 11:08:33.546  INFO 521 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson 
2018-03-03 11:08:33.546  INFO 521 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson 
2018-03-03 11:08:33.624  INFO 521 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml 
2018-03-03 11:08:33.624  INFO 521 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml 
2018-03-03 11:08:33.860  INFO 521 --- [           main] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration 
2018-03-03 11:08:33.894  INFO 521 --- [           main] com.netflix.discovery.DiscoveryClient    : Disable delta property : false 
2018-03-03 11:08:33.894  INFO 521 --- [           main] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null 
2018-03-03 11:08:33.894  INFO 521 --- [           main] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false 
2018-03-03 11:08:33.894  INFO 521 --- [           main] com.netflix.discovery.DiscoveryClient    : Application is null : false 
2018-03-03 11:08:33.894  INFO 521 --- [           main] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true 
2018-03-03 11:08:33.894  INFO 521 --- [           main] com.netflix.discovery.DiscoveryClient    : Application version is -1: true 
2018-03-03 11:08:33.894  INFO 521 --- [           main] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server 
2018-03-03 11:08:34.632  INFO 521 --- [           main] com.netflix.discovery.DiscoveryClient    : The response status is 200 
2018-03-03 11:08:34.634  INFO 521 --- [           main] com.netflix.discovery.DiscoveryClient    : Starting heartbeat executor: renew interval is: 30 
2018-03-03 11:08:34.636  INFO 521 --- [           main] c.n.discovery.InstanceInfoReplicator     : InstanceInfoReplicator onDemand update allowed rate per min is 4 
2018-03-03 11:08:34.640  INFO 521 --- [           main] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1520046514639 with initial instances count: 0 
2018-03-03 11:08:34.645  INFO 521 --- [           main] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application eureka-client with eureka with status UP 
2018-03-03 11:08:34.646  INFO 521 --- [           main] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1520046514646, current=UP, previous=STARTING] 
2018-03-03 11:08:34.650  INFO 521 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_EUREKA-CLIENT/10.0.0.3:eureka-client:8401: registering service... 
2018-03-03 11:08:34.730  INFO 521 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8401 (http) with context path '' 
2018-03-03 11:08:34.731  INFO 521 --- [           main] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 8401 
2018-03-03 11:08:34.735  INFO 521 --- [           main] com.example.xdemo2.Xdemo2Application     : Started Xdemo2Application in 9.518 seconds (JVM running for 10.4) 
2018-03-03 11:08:34.807  WARN 521 --- [nfoReplicator-0] c.n.d.s.t.d.RetryableEurekaHttpClient    : Request execution failure with status code 403; retrying on another server if available 
2018-03-03 11:08:34.815  WARN 521 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_EUREKA-CLIENT/10.0.0.3:eureka-client:8401 - registration failed Cannot execute request on any known server 

com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server 
        at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:111) ~[eureka-client-1.8.6.jar:1.8.6] 
        at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) ~[eureka-client-1.8.6.jar:1.8.6] 
        at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59) ~[eureka-client-1.8.6.jar:1.8.6] 
        at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) ~[eureka-client-1.8.6.jar:1.8.6] 
        at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) ~[eureka-client-1.8.6.jar:1.8.6] 
        at com.netflix.discovery.DiscoveryClient.register(DiscoveryClient.java:829) ~[eureka-client-1.8.6.jar:1.8.6] 
        at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:104) [eureka-client-1.8.6.jar:1.8.6] 
        at com.netflix.discovery.InstanceInfoReplicator$1.run(InstanceInfoReplicator.java:88) [eureka-client-1.8.6.jar:1.8.6] 
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_92] 
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_92] 
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_92] 
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_92] 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_92] 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_92] 
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_92] 

2018-03-03 11:08:34.817  WARN 521 --- [nfoReplicator-0] c.n.discovery.InstanceInfoReplicator     : There was a problem with the instance info replicator 

com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server 
        at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:111) ~[eureka-client-1.8.6.jar:1.8.6] 
        at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) ~[eureka-client-1.8.6.jar:1.8.6] 
        at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59) ~[eureka-client-1.8.6.jar:1.8.6] 
        at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) ~[eureka-client-1.8.6.jar:1.8.6] 
        at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) ~[eureka-client-1.8.6.jar:1.8.6] 
        at com.netflix.discovery.DiscoveryClient.register(DiscoveryClient.java:829) ~[eureka-client-1.8.6.jar:1.8.6] 
        at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:104) ~[eureka-client-1.8.6.jar:1.8.6] 
        at com.netflix.discovery.InstanceInfoReplicator$1.run(InstanceInfoReplicator.java:88) [eureka-client-1.8.6.jar:1.8.6] 
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_92] 
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_92] 
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_92] 
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_92] 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_92] 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_92] 
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_92] 
ryanjbaxter commented 6 years ago

What version of Spring Boot 2.0 and what version of Spring Cloud?

yuanych commented 6 years ago

springBootVersion = '2.0.0.RELEASE' springCloudVersion = 'Finchley.M8'

on36 commented 6 years ago

ME too!

But spring boot 2.0.0.RC1 and spring cloud Finchley.M6 its ok

sebarswee commented 6 years ago

I have the same problem. springBootVersion = '2.0.0.RELEASE' springCloudVersion = 'Finchley.M8'

ldmzw commented 6 years ago

have the same problem. springBootVersion = '2.0.0.RELEASE' springCloudVersion = 'Finchley.M7'

spencergibb commented 6 years ago

@happymzw M8 is the only compatible version with 2.0.0.RELEASE

ldmzw commented 6 years ago

@spencergibb thanks!

Hoermann commented 6 years ago

have the same problem with: springBootVersion = '2.0.0.RELEASE' springCloudVersion = 'Finchley.M8'

but with: springBootVersion = '2.0.0.RC1' springCloudVersion='Finchley.M6' on the EurekaService it is working to register instances with basic authentication.

ryanjbaxter commented 6 years ago

This is because @EnableWebSecurity is now added by default when Spring Security is on the classpath. This enable CSRF protection by default. You will have the same problem in 1.5.10 if you add @EnableWebSeurity. One work around, which is not the most secure workaround if you have browsers using the Eureka dashboard, is to disable CSRF protection. This can be done by adding the following configuration to your app.

    @EnableWebSecurity
    static class WebSecurityConfig extends WebSecurityConfigurerAdapter {
        @Override
        protected void configure(HttpSecurity http) throws Exception {
            http.csrf().disable();
        }
    }

As a team we need to decide what the right course of action is going forward. We will update this issue once we have a solution or any updates.

spencergibb commented 6 years ago

Add documentation that mentions having separate authn/authz for UI and API(/eureka/apps).

azizabah commented 6 years ago

@ryanjbaxter - I'm still seeing the issue with csrf disabled. Running SB 2.0.0.RELEASE and Finchley.M9. I'm binding to a Pivotal Cloud Foundry provided eureka instance by the service registry tile.

ryanjbaxter commented 6 years ago

@azizabah If you are binding to a Pivotal CF eureka instance, I dont see why you would have this problem, or why it would be the same problem, it is not using Boot 2.0

azizabah commented 6 years ago

@ryanjbaxter - You're right. Looks like we're running into a different issue on the pivotal spring cloud connectors not injecting the eureka config information. Sorry about that.

fengyws commented 6 years ago

@spencergibb if use Finchley.M9, how to do it?

anandwali commented 6 years ago

I see this issue when I deploy my app (registry and client) on PCF, but works okay in local. Is there any workaround? or is it resolved? I have used - Spring boot 2.0.1.Release Spring cloud Finchley M9 I do not have Spring Security in classpath.

ryanjbaxter commented 6 years ago

@anandwali there is no way that you are seeing this issue without having spring security on the classpath

anandwali commented 6 years ago

@ryanjbaxter I checked app dependencies. I have included spring-cloud-config-server as dependency and it has transitive dependency on spring-security-crypto and spring-security-rsa.

Would these dependencies cause this problem? Should I include spring-security and add Configurer to disable CORS, solve the issue?

anandwali commented 6 years ago

I rechecked my configurations. It was eureka client defaultZone - typo with server.port, that caused the issue. My bad, sorry about that. Its working fine now.

denisolek commented 6 years ago

Any update on this?

i have springBootVersion = '2.0.0.RELEASE' springCloudVersion = 'Finchley.M8'

on both server and client and basic auth still doesn't work (403)

shahpulkitrajen commented 6 years ago

I am facing the same issue, I have

2.0.0.RC1 Finchley.BUILD-SNAPSHOT Any resolution found yet?
ryanjbaxter commented 6 years ago

The resolution is going to add documentation.

276234199 commented 6 years ago

I am facing the same issue, I have

org.springframework.boot spring-boot-starter-parent 2.0.2.RELEASE Finchley.RC2 Any resolution found yet?
Meziano commented 6 years ago

With

<parent>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-parent</artifactId>
   <version>2.0.2.RELEASE</version>
   <relativePath/> <!-- lookup parent from repository -->
</parent>

and <spring-cloud.version>Finchley.RC2</spring-cloud.version> I am facing the same issue.

eacdy commented 6 years ago

@Meziano Look at this post: https://github.com/spring-cloud/spring-cloud-netflix/issues/2754#issuecomment-372808529

It helps.

ryanjbaxter commented 6 years ago

Or look at the documentation I added https://github.com/spring-cloud/spring-cloud-netflix/pull/2992

Meziano commented 6 years ago

@ryanjbaxter @eacdy

@Meziano Look at this post: #2754 (comment) It helps.

Yes, but the eureka client is able to register even with

eureka.client.service-url.defaultZone=http://localhost:9001/eureka/

which means no security at all.

ryanjbaxter commented 6 years ago

Not what I am seeing, without the username and password in defaultZone on the client the registration fails

skyofdust commented 6 years ago

Remove security settings from eureka config file, and create new @Configuration class where you setup the user and disable csrf.

@Configuration
public class WebSecurityConfig extends WebSecurityConfigurerAdapter{

    @Override
    public void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth.inMemoryAuthentication()
        .passwordEncoder(NoOpPasswordEncoder.getInstance())
        .withUser("admin").password("admin")
        .authorities("ADMIN");
    }

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
            .csrf()
                .disable()
            .authorizeRequests()
              .anyRequest().authenticated()
              .and()
              .httpBasic();
    }
}
sumit89 commented 6 years ago

Unable to register the client with eureka server (The is no security in the classpath)

pom.xml (server)

spring boot version 2.0.3.RELEASE

org.springframework.cloud spring-cloud-dependencies Finchley.RELEASE org.springframework.cloud spring-cloud-starter-netflix-eureka-server

application.yml (server)

spring: application: name: eureka-service

server: port: 8302

eureka: client: register-with-eureka: false fetch-registry: false server: wait-time-in-ms-when-sync-empty: 0

The eureka server started fine and can be accessed at http://localhost:8302/

pom.xml (client)

spring boot version 2.0.3.RELEASE

org.springframework.cloud spring-cloud-dependencies Finchley.RELEASE org.springframework.cloud spring-cloud-starter-netflix-eureka-client

application.yml (client)

spring: application: name: stock-service

server: port: 8301

eureka: client: register-with-eureka: false fetch-registry: false service-url: default-zone: http://localhost:8302/

instance: hostname: localhost

When running the client application, getting the following stack trace

2018-07-09 13:42:40.279 INFO 265144 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration 2018-07-09 13:42:50.123 INFO 265144 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Disable delta property : false 2018-07-09 13:42:50.123 INFO 265144 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Single vip registry refresh property : null 2018-07-09 13:42:50.123 INFO 265144 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Force full registry fetch : false 2018-07-09 13:42:50.123 INFO 265144 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Application is null : false 2018-07-09 13:42:50.123 INFO 265144 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Registered Applications size is zero : true 2018-07-09 13:42:50.123 INFO 265144 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Application version is -1: true 2018-07-09 13:42:50.123 INFO 265144 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Getting all instance registry info from the eureka server 2018-07-09 13:42:52.128 ERROR 265144 --- [freshExecutor-0] c.n.d.s.t.d.RedirectingEurekaHttpClient : Request execution error

com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187) ~[jersey-apache-client4-1.19.1.jar:1.19.1] at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123) ~[jersey-client-1.19.1.jar:1.19.1] at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27) ~[eureka-client-1.9.2.jar:1.9.2] at com.sun.jersey.api.client.Client.handle(Client.java:652) ~[jersey-client-1.19.1.jar:1.19.1] at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682) ~[jersey-client-1.19.1.jar:1.19.1] at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) ~[jersey-client-1.19.1.jar:1.19.1] at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:509) ~[jersey-client-1.19.1.jar:1.19.1] at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getApplicationsInternal(AbstractJerseyEurekaHttpClient.java:194) ~[eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getApplications(AbstractJerseyEurekaHttpClient.java:165) ~[eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137) [eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73) ~[eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134) [eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137) [eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118) ~[eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79) ~[eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134) [eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137) [eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120) [eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134) [eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137) [eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) [eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134) [eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.DiscoveryClient.getAndStoreFullRegistry(DiscoveryClient.java:1051) [eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:965) [eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1471) [eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1438) [eureka-client-1.9.2.jar:1.9.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_171] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_171] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_171] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_171] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171] Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) ~[na:1.8.0_171] at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85) ~[na:1.8.0_171] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_171] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_171] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_171] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[na:1.8.0_171] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_171] at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_171] at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121) ~[httpclient-4.5.5.jar:4.5.5] at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) ~[httpclient-4.5.5.jar:4.5.5] at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) ~[httpclient-4.5.5.jar:4.5.5] at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134) ~[httpclient-4.5.5.jar:4.5.5] at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610) ~[httpclient-4.5.5.jar:4.5.5] at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445) ~[httpclient-4.5.5.jar:4.5.5] at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) ~[httpclient-4.5.5.jar:4.5.5] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118) ~[httpclient-4.5.5.jar:4.5.5] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) ~[httpclient-4.5.5.jar:4.5.5] at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173) ~[jersey-apache-client4-1.19.1.jar:1.19.1] ... 30 common frames omitted

2018-07-09 13:42:52.128 WARN 265144 --- [freshExecutor-0] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failed with message: java.net.ConnectException: Connection refused: connect 2018-07-09 13:42:52.129 ERROR 265144 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_STOCK-SERVICE/del1-lhp-n02547.synapse.com:stock-service:8301 - was unable to refresh its cache! status = Cannot execute request on any known server

com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112) ~[eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134) ~[eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137) ~[eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) ~[eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134) ~[eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.DiscoveryClient.getAndStoreFullRegistry(DiscoveryClient.java:1051) [eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:965) [eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1471) [eureka-client-1.9.2.jar:1.9.2] at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1438) [eureka-client-1.9.2.jar:1.9.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_171] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_171] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_171] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_171] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171]

ryanjbaxter commented 6 years ago

Please open a separate issue Please learn how to format code on GitHub.

dyhack commented 6 years ago

metoo the springboot 2.0.0 release and eureka1.4.5 I have the same problem.

ryanjbaxter commented 6 years ago

@dyhack please dont comment on multiple issues with the same problem, I already answered your question

dyhack commented 6 years ago

where?

ryanjbaxter commented 6 years ago

https://github.com/spring-cloud/spring-cloud-release/issues/99

dyhack commented 6 years ago

i want to connection the remote eureka server。 How can i do

ryanjbaxter commented 6 years ago

The documentation is here http://cloud.spring.io/spring-cloud-static/Finchley.RELEASE/single/spring-cloud.html#_logging_configuration

dyhack commented 6 years ago

thanks 。if i have some other questions , may i asl you?

dyhack commented 6 years ago

i know how to solve the problem. just #eureka.client.registerWithEureka=false

eureka.client.fetchRegistry=false

or don't write this,you can register from the remote server. but i don't know why notes this,it's default values are true

zhaijp commented 6 years ago

springboot:2.0.1.RELEASE springcloud:Finchley.RELEASE I want use username and password to auth,can you tell me how to do。 I have try @EnableWebSecurity in my eureka ,but it seemd not auth the username and password。

zhaijp commented 6 years ago

@ryanjbaxter

zhaijp commented 6 years ago

I have use @EnableWebSecurity ,the client can registe when the password is error @ryanjbaxter

ryanjbaxter commented 6 years ago

@zhaijp please dont spam us with multiple issues and comments

chengshwu commented 6 years ago
using the following code can do auth     @zhaijp 

@EnableWebSecurity
static class WebSecurityConfig extends WebSecurityConfigurerAdapter {
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.csrf().disable().authorizeRequests()
                .anyRequest()
                .authenticated()
                .and()
                .httpBasic();
    }
}
MythLove commented 6 years ago

Remove security settings from eureka config file, and create new @configuration class where you setup the user and disable csrf.

@Configuration
public class WebSecurityConfig extends WebSecurityConfigurerAdapter{

    @Override
    public void configure(AuthenticationManagerBuilder auth) throws Exception {
      auth.inMemoryAuthentication()
        .passwordEncoder(NoOpPasswordEncoder.getInstance())
        .withUser("admin").password("admin")
        .authorities("ADMIN");
    }

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
          .csrf()
              .disable()
          .authorizeRequests()
            .anyRequest().authenticated()
            .and()
            .httpBasic();
    }
}

it works!

Romlengrd commented 5 years ago

in my case, it works for access to eureka dashboard, but eureka client isn't able to connect to server.

yongqilei commented 5 years ago

I also have the problem with it. Spring Boot Version: 2.1.3.RELEASE Spring Cloud: Greenwich.RELEASE

And I disabled csrf in my configuration.

@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.csrf().disable()
                .authorizeRequests()
                .antMatchers("/actuator/**").permitAll()
                .anyRequest()
                .authenticated()
                .and().httpBasic();
    }
}

Eureka Server's application.yml:

spring:
  application:
    name: registration-center
  security:
    user:
      name: eureka
      password: 123456
server:
  port: 8761
eureka:
  instance:
    hostname: localhost
  client:
    fetch-registry: false
    register-with-eureka: false
  server:
    enable-self-preservation: false

Eureka Client application.yml:

spring:
  cloud:
    gateway:
      discovery:
        locator:
          enabled: true
      routes:
      - id: route_service_user
        uri: lb://SERVICE-USER
        predicates:
        - Path=/user/**
  application:
    name: gateway-client
server:
  port: 8901
eureka:
  client:
    servers-url:
      default-zone: http://eureka:123456@localhost:8761/eureka
    register-with-eureka: true
    fetch-registry: true
  instance:
    prefer-ip-address: true
    hostname: localhost

The exception is:

2019-05-11 20:01:07.454  WARN 3864 --- [nfoReplicator-0] c.n.discovery.InstanceInfoReplicator     : There was a problem with the instance info replicator

com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
    at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112) ~[eureka-client-1.9.8.jar:1.9.8]
    at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) ~[eureka-client-1.9.8.jar:1.9.8]
    at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59) ~[eureka-client-1.9.8.jar:1.9.8]
    at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) ~[eureka-client-1.9.8.jar:1.9.8]
    at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) ~[eureka-client-1.9.8.jar:1.9.8]
    at com.netflix.discovery.DiscoveryClient.register(DiscoveryClient.java:829) ~[eureka-client-1.9.8.jar:1.9.8]
    at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:121) ~[eureka-client-1.9.8.jar:1.9.8]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_201]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_201]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_201]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_201]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_201]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_201]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_201]

It haunt me for a few days, could u please help me out? @ryanjbaxter

spencergibb commented 5 years ago

Please don't ask in multiple places (here, stack overflow and eureka).

scorpionaps commented 5 years ago

@keanu96 : You need to put eureka client request to skip the security config of Eureka server. You must be having protected void configure(HttpSecurity http) throws Exception { http.httpBasic().and().authorizeRequests().antMatchers("/","/login").permitAll(). add "/eureka/**" for antMatchers like below

protected void configure(HttpSecurity http) throws Exception { http.httpBasic().and().authorizeRequests().antMatchers("/","/login","/eureka/**").permitAll().

Hope this helps.

fish13x commented 5 years ago

In response to this problem, the latest version of spring cloud has given the official solution.

Add the following code to the eureka server project.

@EnableWebSecurity
class WebSecurityConfig extends WebSecurityConfigurerAdapter {

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.csrf().ignoringAntMatchers("/eureka/**");
        super.configure(http);
    }
}

reference: https://cloud.spring.io/spring-cloud-static/Greenwich.SR2/single/spring-cloud.html#_securing_the_eureka_server