【发布时间】:2013-10-30 02:27:45
【问题描述】:
我正在使用 play 2 弹性搜索插件 (https://github.com/cleverage/play2-elasticsearch) 并且在开发模式下工作正常,但是当我运行 play dist 并打包应用程序时,在我运行它之后没有创建索引。
这是堆栈跟踪:
[错误] 应用程序 - ElasticSearch:启动 ElasticSearch 客户端时出错 org.elasticsearch.ElasticSearchIllegalStateException:获取节点锁失败,以下位置是否可写?:[data/play2-elasticsearch] 在 org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:123) ~[org.elasticsearch.elasticsearch-0.90.5.jar:na] 在 org.elasticsearch.node.internal.InternalNode.(InternalNode.java:139) ~[org.elasticsearch.elasticsearch-0.90.5.jar:na] 在 org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159) ~[org.elasticsearch.elasticsearch-0.90.5.jar:na] 在 org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166) ~[org.elasticsearch.elasticsearch-0.90.5.jar:na] 在 com.github.cleverage.elasticsearch.IndexClient.start(IndexClient.java:36) ~[com.clever-age.play2-elasticsearch-0.8-SNAPSHOT.jar:0.8-SNAPSHOT] 在 com.github.cleverage.elasticsearch.plugin.IndexPlugin.onStart(IndexPlugin.java:47) ~[com.clever-age.play2-elasticsearch-0.8-SNAPSHOT.jar:0.8-SNAPSHOT] 引起:java.io.IOException:未能获得锁定/Users/Nicolas/IdeaProjects/lavidaporloscolores/target/universal/stage/data/play2-elasticsearch/nodes/49 在 org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:102) ~[org.elasticsearch.elasticsearch-0.90.5.jar:na] 在 org.elasticsearch.node.internal.InternalNode.(InternalNode.java:139) ~[org.elasticsearch.elasticsearch-0.90.5.jar:na] 在 org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159) ~[org.elasticsearch.elasticsearch-0.90.5.jar:na] 在 org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166) ~[org.elasticsearch.elasticsearch-0.90.5.jar:na] 在 com.github.cleverage.elasticsearch.IndexClient.start(IndexClient.java:36) ~[com.clever-age.play2-elasticsearch-0.8-SNAPSHOT.jar:0.8-SNAPSHOT] 在 com.github.cleverage.elasticsearch.plugin.IndexPlugin.onStart(IndexPlugin.java:47) ~[com.clever-age.play2-elasticsearch-0.8-SNAPSHOT.jar:0.8-SNAPSHOT] 引起:java.io.IOException:无法创建目录:/Users/Nicolas/IdeaProjects/lavidaporloscolores/target/universal/stage/data/play2-elasticsearch/nodes/49 在 org.apache.lucene.store.NativeFSLock.obtain(NativeFSLockFactory.java:171) ~[org.apache.lucene.lucene-core-4.4.0.jar:4.4.0 1504776 - sarowe - 2013-07-19 02 :53:42] 在 org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:80) ~[org.elasticsearch.elasticsearch-0.90.5.jar:na] 在 org.elasticsearch.node.internal.InternalNode.(InternalNode.java:139) ~[org.elasticsearch.elasticsearch-0.90.5.jar:na] 在 org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159) ~[org.elasticsearch.elasticsearch-0.90.5.jar:na] 在 org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166) ~[org.elasticsearch.elasticsearch-0.90.5.jar:na] 在 com.github.cleverage.elasticsearch.IndexClient.start(IndexClient.java:36) ~[com.clever-age.play2-elasticsearch-0.8-SNAPSHOT.jar:0.8-SNAPSHOT] [错误] 应用程序 - ElasticSearch:索引准备期间发生意外异常。尚未创建和准备索引。 java.lang.NullPointerException:空 在 com.github.cleverage.elasticsearch.IndexService.existsIndex(IndexService.java:378) ~[com.clever-age.play2-elasticsearch-0.8-SNAPSHOT.jar:0.8-SNAPSHOT] 在 com.github.cleverage.elasticsearch.plugin.IndexPlugin.onStart(IndexPlugin.java:58) ~[com.clever-age.play2-elasticsearch-0.8-SNAPSHOT.jar:0.8-SNAPSHOT] 在 play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88) [com.typesafe.play.play_2.10-2.2.0.jar:2.2. 0] 在 play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88) [com.typesafe.play.play_2.10-2.2.0.jar:2.2. 0] 在 scala.collection.immutable.List.foreach(List.scala:318) [org.scala-lang.scala-library-2.10.2.jar:na] 在 play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:88) [com.typesafe.play.play_2.10-2.2.0.jar:2.2.0]
有什么想法吗?谢谢
【问题讨论】:
-
您能在问题中添加您使用的模块配置吗?
-
谢谢mguillermin,看看我的新帖子有答案。感谢您的宝贵时间
标签: playframework-2.0 elasticsearch