Application failed to connect to Nacos server: Please check your Nacos server config

启动springboot你们遇到过这样的错误信息吗?

E:\jdk\jdk1.8.0_151\bin\java -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always "-javaagent:E:\idea\IntelliJ IDEA 2017.1.5\lib\idea_rt.jar=10152:E:\idea\IntelliJ IDEA 2017.1.5\bin" -Dfile.encoding=UTF-8 -classpath E:\jdk\jdk1.8.0_151\jre\lib\charsets.jar;E:\jdk\jdk1.8.0_151\jre\lib\deploy.jar;E:\jdk\jdk1.8.0_151\jre\lib\ext\access-bridge-64.jar;E:\jdk\jdk1.8.0_151\jre\lib\ext\cldrdata.jar;E:\jdk\jdk1.8.0_151\jre\lib\ext\dnsns.jar;E:\jdk\jdk1.8.0_151\jre\lib\ext\jaccess.jar;E:\jdk\jdk1.8.0_151\jre\lib\ext\jfxrt.jar;E:\jdk\jdk1.8.0_151\jre\lib\ext\localedata.jar;E:\jdk\jdk1.8.0_151\jre\lib\ext\nashorn.jar;E:\jdk\jdk1.8.0_151\jre\lib\ext\sunec.jar;E:\jdk\jdk1.8.0_151\jre\lib\ext\sunjce_provider.jar;E:\jdk\jdk1.8.0_151\jre\lib\ext\sunmscapi.jar;E:\jdk\jdk1.8.0_151\jre\lib\ext\sunpkcs11.jar;E:\jdk\jdk1.8.0_151\jre\lib\ext\zipfs.jar;E:\jdk\jdk1.8.0_151\jre\lib\javaws.jar;E:\jdk\jdk1.8.0_151\jre\lib\jce.jar;E:\jdk\jdk1.8.0_151\jre\lib\jfr.jar;E:\jdk\jdk1.8.0_151\jre\lib\jfxswt.jar;E:\jdk\jdk1.8.0_151\jre\lib\jsse.jar;E:\jdk\jdk1.8.0_151\jre\lib\management-agent.jar;E:\jdk\jdk1.8.0_151\jre\lib\plugin.jar;E:\jdk\jdk1.8.0_151\jre\lib\resources.jar;E:\jdk\jdk1.8.0_151\jre\lib\rt.jar;F:\gmall_study\gulimall-third-party\target\classes;F:\gmall_study\guligmall-commons\target\classes;C:\Users\86175\.m2\repository\org\projectlombok\lombok\1.18.10\lombok-1.18.10.jar;C:\Users\86175\.m2\repository\org\apache\httpcomponents\httpcore\4.4.12\httpcore-4.4.12.jar;C:\Users\86175\.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;C:\Users\86175\.m2\repository\mysql\mysql-connector-java\8.0.18\mysql-connector-java-8.0.18.jar;C:\Users\86175\.m2\repository\com\alibaba\cloud\spring-cloud-starter-alibaba-nacos-discovery\2.1.1.RELEASE\spring-cloud-starter-alibaba-nacos-discovery-2.1.1.RELEASE.jar;C:\Users\86175\.m2\repository\com\alibaba\cloud\spring-cloud-alibaba-nacos-discovery\2.1.1.RELEASE\spring-cloud-alibaba-nacos-discovery-2.1.1.RELEASE.jar;C:\Users\86175\.m2\repository\com\alibaba\nacos\nacos-client\1.1.4\nacos-client-1.1.4.jar;C:\Users\86175\.m2\repository\com\alibaba\nacos\nacos-common\1.1.4\nacos-common-1.1.4.jar;C:\Users\86175\.m2\repository\org\apache\commons\commons-lang3\3.9\commons-lang3-3.9.jar;C:\Users\86175\.m2\repository\com\alibaba\nacos\nacos-api\1.1.4\nacos-api-1.1.4.jar;C:\Users\86175\.m2\repository\com\alibaba\fastjson\1.2.58\fastjson-1.2.58.jar;C:\Users\86175\.m2\repository\io\prometheus\simpleclient\0.5.0\simpleclient-0.5.0.jar;C:\Users\86175\.m2\repository\org\springframework\cloud\spring-cloud-starter-netflix-ribbon\2.2.4.RELEASE\spring-cloud-starter-netflix-ribbon-2.2.4.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\cloud\spring-cloud-starter-netflix-archaius\2.2.4.RELEASE\spring-cloud-starter-netflix-archaius-2.2.4.RELEASE.jar;C:\Users\86175\.m2\repository\com\netflix\ribbon\ribbon\2.3.0\ribbon-2.3.0.jar;C:\Users\86175\.m2\repository\com\netflix\ribbon\ribbon-transport\2.3.0\ribbon-transport-2.3.0.jar;C:\Users\86175\.m2\repository\io\reactivex\rxnetty-contexts\0.4.9\rxnetty-contexts-0.4.9.jar;C:\Users\86175\.m2\repository\io\reactivex\rxnetty-servo\0.4.9\rxnetty-servo-0.4.9.jar;C:\Users\86175\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\86175\.m2\repository\io\reactivex\rxnetty\0.4.9\rxnetty-0.4.9.jar;C:\Users\86175\.m2\repository\com\netflix\ribbon\ribbon-core\2.3.0\ribbon-core-2.3.0.jar;C:\Users\86175\.m2\repository\com\netflix\ribbon\ribbon-httpclient\2.3.0\ribbon-httpclient-2.3.0.jar;C:\Users\86175\.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;C:\Users\86175\.m2\repository\com\sun\jersey\jersey-client\1.19.1\jersey-client-1.19.1.jar;C:\Users\86175\.m2\repository\com\sun\jersey\contribs\jersey-apache-client4\1.19.1\jersey-apache-client4-1.19.1.jar;C:\Users\86175\.m2\repository\com\netflix\servo\servo-core\0.12.21\servo-core-0.12.21.jar;C:\Users\86175\.m2\repository\com\netflix\netflix-commons\netflix-commons-util\0.3.0\netflix-commons-util-0.3.0.jar;C:\Users\86175\.m2\repository\com\netflix\ribbon\ribbon-loadbalancer\2.3.0\ribbon-loadbalancer-2.3.0.jar;C:\Users\86175\.m2\repository\com\netflix\netflix-commons\netflix-statistics\0.1.1\netflix-statistics-0.1.1.jar;C:\Users\86175\.m2\repository\com\alibaba\cloud\spring-cloud-starter-alibaba-nacos-config\2.1.1.RELEASE\spring-cloud-starter-alibaba-nacos-config-2.1.1.RELEASE.jar;C:\Users\86175\.m2\repository\com\alibaba\cloud\spring-cloud-alibaba-nacos-config\2.1.1.RELEASE\spring-cloud-alibaba-nacos-config-2.1.1.RELEASE.jar;C:\Users\86175\.m2\repository\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;C:\Users\86175\.m2\repository\com\alibaba\cloud\spring-cloud-starter-alicloud-oss\2.1.1.RELEASE\spring-cloud-starter-alicloud-oss-2.1.1.RELEASE.jar;C:\Users\86175\.m2\repository\com\alibaba\cloud\spring-cloud-alicloud-oss\2.1.1.RELEASE\spring-cloud-alicloud-oss-2.1.1.RELEASE.jar;C:\Users\86175\.m2\repository\com\alibaba\cloud\spring-cloud-alicloud-context\2.1.1.RELEASE\spring-cloud-alicloud-context-2.1.1.RELEASE.jar;C:\Users\86175\.m2\repository\com\alibaba\cloud\alicloud-context\1.0.5\alicloud-context-1.0.5.jar;C:\Users\86175\.m2\repository\com\aliyun\oss\aliyun-sdk-oss\3.1.0\aliyun-sdk-oss-3.1.0.jar;C:\Users\86175\.m2\repository\org\apache\httpcomponents\httpclient\4.5.10\httpclient-4.5.10.jar;C:\Users\86175\.m2\repository\commons-codec\commons-codec\1.13\commons-codec-1.13.jar;C:\Users\86175\.m2\repository\org\jdom\jdom\1.1\jdom-1.1.jar;C:\Users\86175\.m2\repository\com\sun\jersey\jersey-json\1.9\jersey-json-1.9.jar;C:\Users\86175\.m2\repository\org\codehaus\jettison\jettison\1.1\jettison-1.1.jar;C:\Users\86175\.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;C:\Users\86175\.m2\repository\com\sun\xml\bind\jaxb-impl\2.2.3-1\jaxb-impl-2.2.3-1.jar;C:\Users\86175\.m2\repository\org\codehaus\jackson\jackson-core-asl\1.8.3\jackson-core-asl-1.8.3.jar;C:\Users\86175\.m2\repository\org\codehaus\jackson\jackson-mapper-asl\1.8.3\jackson-mapper-asl-1.8.3.jar;C:\Users\86175\.m2\repository\org\codehaus\jackson\jackson-jaxrs\1.8.3\jackson-jaxrs-1.8.3.jar;C:\Users\86175\.m2\repository\org\codehaus\jackson\jackson-xc\1.8.3\jackson-xc-1.8.3.jar;C:\Users\86175\.m2\repository\com\sun\jersey\jersey-core\1.9\jersey-core-1.9.jar;C:\Users\86175\.m2\repository\com\aliyun\aliyun-java-sdk-core\4.4.1\aliyun-java-sdk-core-4.4.1.jar;C:\Users\86175\.m2\repository\com\google\code\gson\gson\2.8.6\gson-2.8.6.jar;C:\Users\86175\.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;C:\Users\86175\.m2\repository\javax\xml\bind\jaxb-api\2.3.1\jaxb-api-2.3.1.jar;C:\Users\86175\.m2\repository\javax\activation\javax.activation-api\1.2.0\javax.activation-api-1.2.0.jar;C:\Users\86175\.m2\repository\org\jacoco\org.jacoco.agent\0.8.3\org.jacoco.agent-0.8.3-runtime.jar;C:\Users\86175\.m2\repository\org\ini4j\ini4j\0.5.4\ini4j-0.5.4.jar;C:\Users\86175\.m2\repository\com\aliyun\aliyun-java-sdk-ram\3.0.0\aliyun-java-sdk-ram-3.0.0.jar;C:\Users\86175\.m2\repository\com\aliyun\aliyun-java-sdk-sts\3.0.0\aliyun-java-sdk-sts-3.0.0.jar;C:\Users\86175\.m2\repository\com\aliyun\aliyun-java-sdk-ecs\4.2.0\aliyun-java-sdk-ecs-4.2.0.jar;C:\Users\86175\.m2\repository\org\springframework\boot\spring-boot-starter\2.2.1.RELEASE\spring-boot-starter-2.2.1.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\boot\spring-boot\2.2.1.RELEASE\spring-boot-2.2.1.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.2.1.RELEASE\spring-boot-autoconfigure-2.2.1.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.2.1.RELEASE\spring-boot-starter-logging-2.2.1.RELEASE.jar;C:\Users\86175\.m2\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;C:\Users\86175\.m2\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;C:\Users\86175\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.12.1\log4j-to-slf4j-2.12.1.jar;C:\Users\86175\.m2\repository\org\apache\logging\log4j\log4j-api\2.12.1\log4j-api-2.12.1.jar;C:\Users\86175\.m2\repository\org\slf4j\jul-to-slf4j\1.7.29\jul-to-slf4j-1.7.29.jar;C:\Users\86175\.m2\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;C:\Users\86175\.m2\repository\org\yaml\snakeyaml\1.25\snakeyaml-1.25.jar;C:\Users\86175\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.2.1.RELEASE\spring-boot-starter-web-2.2.1.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.2.1.RELEASE\spring-boot-starter-json-2.2.1.RELEASE.jar;C:\Users\86175\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.10.0\jackson-databind-2.10.0.jar;C:\Users\86175\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.10.0\jackson-annotations-2.10.0.jar;C:\Users\86175\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.10.0\jackson-core-2.10.0.jar;C:\Users\86175\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.10.0\jackson-datatype-jdk8-2.10.0.jar;C:\Users\86175\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.10.0\jackson-datatype-jsr310-2.10.0.jar;C:\Users\86175\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.10.0\jackson-module-parameter-names-2.10.0.jar;C:\Users\86175\.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\2.2.1.RELEASE\spring-boot-starter-tomcat-2.2.1.RELEASE.jar;C:\Users\86175\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.27\tomcat-embed-core-9.0.27.jar;C:\Users\86175\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\9.0.27\tomcat-embed-el-9.0.27.jar;C:\Users\86175\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.27\tomcat-embed-websocket-9.0.27.jar;C:\Users\86175\.m2\repository\org\springframework\boot\spring-boot-starter-validation\2.2.1.RELEASE\spring-boot-starter-validation-2.2.1.RELEASE.jar;C:\Users\86175\.m2\repository\jakarta\validation\jakarta.validation-api\2.0.1\jakarta.validation-api-2.0.1.jar;C:\Users\86175\.m2\repository\org\hibernate\validator\hibernate-validator\6.0.18.Final\hibernate-validator-6.0.18.Final.jar;C:\Users\86175\.m2\repository\org\jboss\logging\jboss-logging\3.4.1.Final\jboss-logging-3.4.1.Final.jar;C:\Users\86175\.m2\repository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;C:\Users\86175\.m2\repository\org\springframework\spring-web\5.2.1.RELEASE\spring-web-5.2.1.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\spring-beans\5.2.1.RELEASE\spring-beans-5.2.1.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\spring-webmvc\5.2.1.RELEASE\spring-webmvc-5.2.1.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\spring-aop\5.2.1.RELEASE\spring-aop-5.2.1.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\spring-context\5.2.1.RELEASE\spring-context-5.2.1.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\spring-expression\5.2.1.RELEASE\spring-expression-5.2.1.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\cloud\spring-cloud-starter-openfeign\2.2.4.RELEASE\spring-cloud-starter-openfeign-2.2.4.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\cloud\spring-cloud-starter\2.2.4.RELEASE\spring-cloud-starter-2.2.4.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\cloud\spring-cloud-context\2.2.4.RELEASE\spring-cloud-context-2.2.4.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\security\spring-security-rsa\1.0.9.RELEASE\spring-security-rsa-1.0.9.RELEASE.jar;C:\Users\86175\.m2\repository\org\bouncycastle\bcpkix-jdk15on\1.64\bcpkix-jdk15on-1.64.jar;C:\Users\86175\.m2\repository\org\bouncycastle\bcprov-jdk15on\1.64\bcprov-jdk15on-1.64.jar;C:\Users\86175\.m2\repository\org\springframework\cloud\spring-cloud-openfeign-core\2.2.4.RELEASE\spring-cloud-openfeign-core-2.2.4.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\cloud\spring-cloud-netflix-ribbon\2.2.4.RELEASE\spring-cloud-netflix-ribbon-2.2.4.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\cloud\spring-cloud-netflix-archaius\2.2.4.RELEASE\spring-cloud-netflix-archaius-2.2.4.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\boot\spring-boot-starter-aop\2.2.1.RELEASE\spring-boot-starter-aop-2.2.1.RELEASE.jar;C:\Users\86175\.m2\repository\org\aspectj\aspectjweaver\1.9.4\aspectjweaver-1.9.4.jar;C:\Users\86175\.m2\repository\io\github\openfeign\form\feign-form-spring\3.8.0\feign-form-spring-3.8.0.jar;C:\Users\86175\.m2\repository\io\github\openfeign\form\feign-form\3.8.0\feign-form-3.8.0.jar;C:\Users\86175\.m2\repository\commons-fileupload\commons-fileupload\1.4\commons-fileupload-1.4.jar;C:\Users\86175\.m2\repository\commons-io\commons-io\2.2\commons-io-2.2.jar;C:\Users\86175\.m2\repository\org\springframework\cloud\spring-cloud-commons\2.2.4.RELEASE\spring-cloud-commons-2.2.4.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\security\spring-security-crypto\5.2.1.RELEASE\spring-security-crypto-5.2.1.RELEASE.jar;C:\Users\86175\.m2\repository\io\github\openfeign\feign-core\10.10.1\feign-core-10.10.1.jar;C:\Users\86175\.m2\repository\io\github\openfeign\feign-slf4j\10.10.1\feign-slf4j-10.10.1.jar;C:\Users\86175\.m2\repository\org\slf4j\slf4j-api\1.7.29\slf4j-api-1.7.29.jar;C:\Users\86175\.m2\repository\io\github\openfeign\feign-hystrix\10.10.1\feign-hystrix-10.10.1.jar;C:\Users\86175\.m2\repository\com\netflix\archaius\archaius-core\0.7.6\archaius-core-0.7.6.jar;C:\Users\86175\.m2\repository\com\google\code\findbugs\jsr305\3.0.1\jsr305-3.0.1.jar;C:\Users\86175\.m2\repository\commons-configuration\commons-configuration\1.8\commons-configuration-1.8.jar;C:\Users\86175\.m2\repository\com\google\guava\guava\29.0-jre\guava-29.0-jre.jar;C:\Users\86175\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C:\Users\86175\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C:\Users\86175\.m2\repository\org\checkerframework\checker-qual\2.11.1\checker-qual-2.11.1.jar;C:\Users\86175\.m2\repository\com\google\errorprone\error_prone_annotations\2.3.4\error_prone_annotations-2.3.4.jar;C:\Users\86175\.m2\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C:\Users\86175\.m2\repository\com\netflix\hystrix\hystrix-core\1.5.18\hystrix-core-1.5.18.jar;C:\Users\86175\.m2\repository\io\reactivex\rxjava\1.3.8\rxjava-1.3.8.jar;C:\Users\86175\.m2\repository\org\hdrhistogram\HdrHistogram\2.1.9\HdrHistogram-2.1.9.jar;C:\Users\86175\.m2\repository\org\springframework\spring-core\5.2.1.RELEASE\spring-core-5.2.1.RELEASE.jar;C:\Users\86175\.m2\repository\org\springframework\spring-jcl\5.2.1.RELEASE\spring-jcl-5.2.1.RELEASE.jar com.atguigu.gulimall.GulimallThirdPartyApplication

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

2020-08-25 22:40:12.628 ERROR 10080 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Application failed to connect to Nacos server: ""

Action:

Please check your Nacos server config


Process finished with exit code 1

问题发生原因:springboot项目整合springcloud-alibaba-nacos-config时一旦导入配置中心来做配置管理时的jar时,就必须配置管理中心的地址,报以上错误就是因为没有在bootstrap.properties文件中配置相关地址:我的错误配置如下:

spring.application.name=gulimall-third-party
spring.cloud.nacos.config.namespace=d40460db-a157-4fd4-b9fa-3aa68d9c5fcb

解决办法:配置注册中心地址即可:

spring.application.name=gulimall-third-party
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
spring.cloud.nacos.config.namespace=d40460db-a157-4fd4-b9fa-3aa68d9c5fcb

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值