嗨朋友我已经安装了弹性搜索1.4.5
,我正在使用spring boot 1.2.5
。使用此设置一切正常。我的pom文件中包含elasticsearch的依赖关系是:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
现在我们知道elasticsearch已升级,最新版本为2.x系列。
我在启动弹簧启动应用程序后立即安装了elasticsearch 2.3.1
,它给了我警告
[2016-04-25 11:48:27,263][WARN ][transport.netty ] [Katie Power] exception caught on transport layer [[id: 0x70aad8aa, /127.0.0.1:41327 => /127.0.0.1:9300]], closing connection
java.lang.IllegalStateException: Message not fully read (request) for requestId [6], action [cluster/nodes/info], readerIndex [39] vs expected [57]; resetting
at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:121)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:75)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[2016-04-25 11:48:49,630][WARN ][cluster.routing.allocation.decider] [Katie Power] high disk watermark [90%] exceeded on [-jqppXgpTx2f6iNLg520Gg][Katie Power][/home/mohdqasim/Downloads/elasticsearch-2.3.1/data/qasimelasticsearch/nodes/0] free: 317.2mb[1.7%], shards will be relocated away from this node
[2016-04-25 11:49:19,631][WARN ][cluster.routing.allocation.decider] [Katie Power] high disk watermark [90%] exceeded on [-jqppXgpTx2f6iNLg520Gg][Katie Power][/home/mohdqasim/Downloads/elasticsearch-2.3.1/data/qasimelasticsearch/nodes/0] free: 317.2mb[1.7%], shards will be relocated away from this node
我的elasticserch没有使用我在我的应用程序中定义的索引进行更新。
我在google上搜索了很长时间但是找不到它的解决方案。 请帮帮我一下吧!
答案 0 :(得分:3)
那是因为Spring Boot目前适用于spring-boot-starter-data-elasticsearch
1.3.3-RELEASE,还没有支持ES 2.x的2.0.0-RELEASE。
由于你有Spring Boot 1.2.5,它是一个更老的版本,不支持ES 2.x
答案 1 :(得分:0)
Spring启动版1.4.0.BUILD-SNAPSHOT
现在支持ES 2.x.按此安装:http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/html/build-tool-plugins-gradle-plugin.html