java.lang.IllegalStateException:从不支持的版本收到的消息:[2.0 .0]最小兼容版本是:[5.0.0]

java.lang.IllegalStateException:从不支持的版本收到的消息:[2.0 .0]最小兼容版本是:[5.0.0],第1张

概述我正在尝试做this sample tutorial,以便熟悉elasticsearch.但是运行项目会在intellij中出现这个错误:org.elasticsearch.transport.NodeDisconnectedException: [][127.0.0.1:9300][cluster:monitor/nodes/liveness] disco

我正在尝试做this sample tutorial,以便熟悉elasticsearch.但是运行项目会在intellij中出现这个错误:

org.elasticsearch.transport.NodedisconnectedException: [][127.0.0.1:9300][cluster:monitor/nodes/liveness] disconnected2017-08-22 13:32:10.489 ERROR 6372 --- [           main] .d.e.r.s.AbstractElasticsearchRepository : Failed to load elasticsearch nodes : org.elasticsearch.clIEnt.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{127.0.0.1}{127.0.0.1:9300}]2017-08-22 13:32:10.669  INFO 6372 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup--ElasticSearch-->clIEnt.type = transportcluster.name = mkyong-clustername = Mahkizmonetwork.server = falsenode.clIEnt = truetransport.Ping_schedule = 5s<--ElasticSearch--2017-08-22 13:32:10.751  INFO 6372 --- [           main] utoConfigurationReportLoggingInitializer : Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'deBUG' enabled.2017-08-22 13:32:10.755 ERROR 6372 --- [           main] o.s.boot.SpringApplication               : Application startup Failedjava.lang.IllegalStateException: Failed to execute CommandlineRunner    at org.springframework.boot.SpringApplication.callrunner(SpringApplication.java:779) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]    at org.springframework.boot.SpringApplication.callrunners(SpringApplication.java:760) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]    at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:747) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]    at com.mkyong.Application.main(Application.java:26) [classes/:na]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_92]    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_92]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_92]    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_92]    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [IDea_rt.jar:na]Caused by: org.elasticsearch.clIEnt.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{127.0.0.1}{127.0.0.1:9300}]    at org.elasticsearch.clIEnt.transport.TransportClIEntNodesService.ensureNodesAreAvailable(TransportClIEntNodesService.java:326) ~[elasticsearch-2.4.4.jar:2.4.4]    at org.elasticsearch.clIEnt.transport.TransportClIEntNodesService.execute(TransportClIEntNodesService.java:223) ~[elasticsearch-2.4.4.jar:2.4.4]    at org.elasticsearch.clIEnt.transport.support.TransportProxyClIEnt.execute(TransportProxyClIEnt.java:55) ~[elasticsearch-2.4.4.jar:2.4.4]    at org.elasticsearch.clIEnt.transport.TransportClIEnt.doExecute(TransportClIEnt.java:295) ~[elasticsearch-2.4.4.jar:2.4.4]    at org.elasticsearch.clIEnt.support.AbstractClIEnt.execute(AbstractClIEnt.java:359) ~[elasticsearch-2.4.4.jar:2.4.4]    at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:86) ~[elasticsearch-2.4.4.jar:2.4.4]    at org.elasticsearch.act

并在elasticsearch.bat中它给出了这个错误:

java.lang.IllegalStateException: Received message from unsupported version: [2.0.0] minimal compatible version is: [5.0.0]        at org.elasticsearch.transport.TcpTransport.messageReceived(TcpTransport.java:1379) ~[elasticsearch-5.5.2.jar:5.5.2]        at org.elasticsearch.transport.netty4.Netty4MessageChannelHandler.channelRead(Netty4MessageChannelHandler.java:74) ~[transport-netty4-5.5.2.jar:5.5.2]        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.11.Final.jar:4.1.11.Final]        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.11.Final.jar:4.1.11.Final]        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-transport-4.1.11.Final.jar:4.1.11.Final]        at io.netty.handler.codec.BytetoMessageDecoder.fireChannelRead(BytetoMessageDecoder.java:310) [netty-codec-4.1.11.Final.jar:4.1.11.Final]

我搜索过,据说春季启动和elasticsearch版本之间可能存在冲突.但是在该教程的pom文件中没有指定d性搜索版本:

是版本冲突的问题,我该如何解决?最佳答案看看我的Github repository.它适用于Elasticsearch版本2.4.6的实例.

不幸的是,Spring Boot Starter Data Elasticsearch不支持Elasticsearch 5.x版,他们正在研究它,但您可以使用我的存储库只是改变模型属性并使用您自己的方法更新存储库.

您的错误是因为您正在使用Elasticsearch 5.x的实例,并且您需要2.x版本.

总结

以上是内存溢出为你收集整理的java.lang.IllegalStateException:从不支持的版本收到的消息:[2.0 .0]最小兼容版本是:[5.0.0]全部内容,希望文章能够帮你解决java.lang.IllegalStateException:从不支持的版本收到的消息:[2.0 .0]最小兼容版本是:[5.0.0]所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1268607.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-08
下一篇 2022-06-08

发表评论

登录后才能评论

评论列表(0条)