Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot 启动Spring启动应用程序时出错_Spring Boot_<img Src="//i.stack.imgur.com/A3TTx.png" Height="16" Width="18" Alt="" Class="sponsor Tag Img">spring Data Elasticsearch - Fatal编程技术网 spring-data-elasticsearch,Spring Boot,spring Data Elasticsearch" /> spring-data-elasticsearch,Spring Boot,spring Data Elasticsearch" />

Spring boot 启动Spring启动应用程序时出错

Spring boot 启动Spring启动应用程序时出错,spring-boot,spring-data-elasticsearch,Spring Boot,spring Data Elasticsearch,我有一个Spring引导应用程序,它使用elasticsearch实现持久性。当我启动应用程序时。我得到这个错误 2019-03-10 13:40:34.969 ERROR 6442 --- [ restartedMain] .d.e.r.s.AbstractElasticsearchRepository : failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableExcept

我有一个Spring引导应用程序,它使用elasticsearch实现持久性。当我启动应用程序时。我得到这个错误

2019-03-10 13:40:34.969 ERROR 6442 --- [  restartedMain] .d.e.r.s.AbstractElasticsearchRepository : failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{dwDmvmEpTaGofz678sLuFw}{localhost}{127.0.0.1:9300}, {#transport#-2}{3MRMgg73T1eBHFiozEJABw}{192.168.1.6}{192.168.1.6:9300}]
2019-03-10 13:40:35.176 DEBUG 6442 --- [  restartedMain] c.l.lociscore.services.LociScoreService  : --LociScoreService Intialized------
我使用的是Spring Boot版本2.1.3.0

这是我的配置

server.port=29090 server.address=localhost server.ssl.enabled=false

spring.data.elasticsearch.repositories.enabled=true

spring.data.elasticsearch.cluster-nodes=localhost:9300,192.168.1.6:9300
spring.data.elasticsearch.cluster-name= "elasticsearch"
spring.es.set.netty.runtime.available.processors = false
我正在使用docker运行弹性搜索。我用来启动ES的命令如下

docker run -p 9200:9200 -p 9300:9300 -e "http.host=0.0.0.0" -e "transport.host=0.0.0.0" -e "xpack.security.enabled=false" -e "cluster.name=loci-score" -d --name thesiselasticsearch -d --network mynetwork docker.elastic.co/elasticsearch/elasticsearch:6.4.3
我不明白为什么会发生错误。从我为SpringDataElasticSearch阅读的文档来看,我使用的版本是兼容的