在Nacos中,这有可能是什么原因呢?1. 表象:nacos 客户端连不上服务端(拿不到配置内容)
APPLICATION FAILED TO START
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (the profiles test are currently active).
2024-08-19 14:42:36 [Thread-11] WARN com.alibaba.nacos.common.http.HttpClientBeanHolder -[HttpClientBeanHolder] Start destroying common HttpClient
2024-08-19 14:42:36 [Thread-11] WARN com.alibaba.nacos.common.http.HttpClientBeanHolder -[HttpClientBeanHolder] Destruction of the end
2024-08-19 14:42:36 [Thread-28] WARN com.alibaba.nacos.common.notify.NotifyCenter -[NotifyCenter] Start destroying Publisher
$HOME/logs/nacos/remote.log:
2024-08-19 14:41:52.732 INFO [main :c.a.n.c.r.client] [RpcClientFactory] create a new rpc client of 63b64116-f778-4cee-b22f-0d427f07f3cc_config-0
2024-08-19 14:41:52.755 INFO [main :c.a.n.c.r.client] [63b64116-f778-4cee-b22f-0d427f07f3cc_config-0] Register server push request handler:com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$$Lambda$359/1489092624
2024-08-19 14:41:52.755 INFO [main :c.a.n.c.r.client] [63b64116-f778-4cee-b22f-0d427f07f3cc_config-0] Register server push request handler:com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$$Lambda$360/192881625
2024-08-19 14:41:52.756 INFO [main :c.a.n.c.r.client] [63b64116-f778-4cee-b22f-0d427f07f3cc_config-0] Registry connection listener to current client:com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$1
2024-08-19 14:41:52.756 INFO [main :c.a.n.c.r.client] [63b64116-f778-4cee-b22f-0d427f07f3cc_config-0] RpcClient init, ServerListFactory = com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$2
2024-08-19 14:41:52.765 INFO [main :c.a.n.c.r.client] [63b64116-f778-4cee-b22f-0d427f07f3cc_config-0] Try to connect to server on start up, server: {serverIp = 'localhost', server main port = 3333}
2024-08-19 14:41:52.791 INFO [main :c.a.n.c.r.c.g.GrpcClient] grpc client connection server:localhost ip,serverPort:4333,grpcTslConfig:{"sslProvider":"","enableTls":false,"mutualAuthEnable":false,"trustAll":false}
2024-08-19 14:41:56.223 ERROR [main :c.a.n.c.r.c.g.GrpcClient] Server check fail, please check server localhost ,port 4333 is available , error ={}
java.util.concurrent.TimeoutException: Waited 3000 milliseconds (plus 407320 nanoseconds delay) for com.alibaba.nacos.shaded.io.grpc.stub.ClientCalls$GrpcFuture@52aa2946[status=PENDING, info=[GrpcFuture{clientCall=PendingCall{realCall=ClientCallImpl{method=MethodDescriptor{fullMethodName=Request/request, type=UNARY, idempotent=false, safe=false, sampledToLocalTracing=true, requestMarshaller=com.alibaba.nacos.shaded.io.grpc.protobuf.lite.ProtoLiteUtils$MessageMarshaller@4de5031f, responseMarshaller=com.alibaba.nacos.shaded.io.grpc.protobuf.lite.ProtoLiteUtils$MessageMarshaller@67e2d983, schemaDescriptor=com.alibaba.nacos.api.grpc.auto.RequestGrpc$RequestMethodDescriptorSupplier@5d47c63f}}}}]]
at com.alibaba.nacos.shaded.com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:508) ~[nacos-client-2.2.3.jar!/:na]
at com.alibaba.nacos.common.remote.client.grpc.GrpcClient.serverCheck(GrpcClient.java:218) [nacos-client-2.2.3.jar!/:na]
at com.alibaba.nacos.common.remote.client.grpc.GrpcClient.connectToServer(GrpcClient.java:329) [nacos-client-2.2.3.jar!/:na]
at com.alibaba.nacos.common.remote.client.RpcClient.start(RpcClient.java:363) [nacos-client-2.2.3.jar!/:na]
at com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient.ensureRpcClient(ClientWorker.java:891) [nacos-client-2.2.3.jar!/:na]
at com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient.getOneRunningClient(ClientWorker.java:1038) [nacos-client-2.2.3.jar!/:na]
at com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient.queryConfig(ClientWorker.java:946) [nacos-client-2.2.3.jar!/:na]
at com.alibaba.nacos.client.config.impl.ClientWorker.getServerConfig(ClientWorker.java:403) [nacos-client-2.2.3.jar!/:na]
at com.alibaba.nacos.client.config.NacosConfigService.getConfigInner(NacosConfigService.java:184) [nacos-client-2.2.3.jar!/:na]
at com.alibaba.nacos.client.config.NacosConfigService.getConfig(NacosConfigService.java:96) [nacos-client-2.2.3.jar!/:na]
at com.alibaba.cloud.nacos.client.NacosPropertySourceBuilder.loadNacosData(NacosPropertySourceBuilder.java:85) [spring-cloud-starter-alibaba-nacos-config-2021.0.5.0.jar!/:2021.0.5.0]
at com.alibaba.cloud.nacos.client.NacosPropertySourceBuilder.build(NacosPropertySourceBuilder.java:73) [spring-cloud-starter-alibaba-nacos-config-2021.0.5.0.jar!/:2021.0.5.0]
at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadNacosPropertySource(NacosPropertySourceLocator.java:199) [spring-cloud-starter-alibaba-nacos-config-2021.0.5.0.jar!/:2021.0.5.0]
at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadNacosDataIfPresent(NacosPropertySourceLocator.java:186) [spring-cloud-starter-alibaba-nacos-config-2021.0.5.0.jar!/:2021.0.5.0]
at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadNacosConfiguration(NacosPropertySourceLocator.java:158) [spring-cloud-starter-alibaba-nacos-config-2021.0.5.0.jar!/:2021.0.5.0]
at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadSharedConfiguration(NacosPropertySourceLocator.java:116) [spring-cloud-starter-alibaba-nacos-config-2021.0.5.0.jar!/:2021.0.5.0]
at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.locate(NacosPropertySourceLocator.java:101) [spring-cloud-starter-alibaba-nacos-config-2021.0.5.0.jar!/:2021.0.5.0]
at org.springframework.cloud.bootstrap.config.PropertySourceLocator.locateCollection(PropertySourceLocator.java:51) [spring-cloud-context-3.1.6.jar!/:3.1.6]
at org.springframework.cloud.bootstrap.config.PropertySourceLocator.locateCollection(PropertySourceLocator.java:47) [spring-cloud-context-3.1.6.jar!/:3.1.6]
at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:95) [spring-cloud-context-3.1.6.jar!/:3.1.6]
at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:604) [spring-boot-2.7.12.jar!/:2.7.12]
at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:373) [spring-boot-2.7.12.jar!/:2.7.12]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:306) [spring-boot-2.7.12.jar!/:2.7.12]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) [spring-boot-2.7.12.jar!/:2.7.12]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) [spring-boot-2.7.12.jar!/:2.7.12]
at com.eshore.bim.Application.main(Application.java:21) [classes!/:0.5.0-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_272]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_272]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_272]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_272]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) [bim-data.jar:0.5.0-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) [bim-data.jar:0.5.0-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) [bim-data.jar:0.5.0-SNAPSHOT]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) [bim-data.jar:0.5.0-SNAPSHOT]
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。