尝试创建索引时出现以下错误:
{"error":"IndexCreationException[[myindex] failed to create index]; nested: NoClassDefFoundError[Could not initialize class org.elasticsearch.index.codec.postingsformat.PostingFormats]; ","status":500}
当我这样做时
curl http://localhost:9200
我明白了:
{
"ok" : true,
"status" : 200,
"name" : "Shamrock",
"version" : {
"number" : "0.90.5",
"build_hash" : "c8714e8e0620b62638f660f6144831792b9dedee",
"build_timestamp" : "2013-09-17T12:50:20Z",
"build_snapshot" : false,
"lucene_version" : "4.4"
},
"tagline" : "You Know, for Search"
}
当我这样做时
java -version
我得到了
java version "1.7.0_13"
Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
当我这样做时
echo "$JAVA_HOME"
我得到了
/usr/local/jdk
这是elasticsearch.log
[2013-09-19 22:27:04,637][INFO ][node ] [Iron Lad] {0.90.0.Beta1}[15738]: initializing ...
[2013-09-19 22:27:04,646][INFO ][plugins ] [Iron Lad] loaded [], sites []
[2013-09-19 22:27:07,170][INFO ][node ] [Iron Lad] {0.90.0.Beta1}[15738]: initialized
[2013-09-19 22:27:07,170][INFO ][node ] [Iron Lad] {0.90.0.Beta1}[15738]: starting ...
[2013-09-19 22:27:07,333][INFO ][transport ] [Iron Lad] bound_address {inet[/0.0.0.0:9301]}, publish_address {inet[/66.66.66.66:9301]}
[2013-09-19 22:27:10,407][INFO ][cluster.service ] [Iron Lad] new_master [Iron Lad][Nl9geV2WQICQRPCjZbGg5w][inet[/66.66.66.66:9301]], reason: zen-disco-join (elected_as_master)
[2013-09-19 22:27:10,434][INFO ][discovery ] [Iron Lad] elasticsearch/Nl9geV2WQICQRPCjZbGg5w
[2013-09-19 22:27:10,495][INFO ][http ] [Iron Lad] bound_address {inet[/0.0.0.0:9201]}, publish_address {inet[/66.66.66.66:9201]}
[2013-09-19 22:27:10,495][INFO ][node ] [Iron Lad] {0.90.0.Beta1}[15738]: started
[2013-09-19 22:27:10,501][INFO ][gateway ] [Iron Lad] recovered [0] indices into cluster_state
[2013-09-19 22:29:32,668][INFO ][node ] [Iron Lad] {0.90.0.Beta1}[15738]: stopping ...
[2013-09-19 22:29:32,703][INFO ][node ] [Iron Lad] {0.90.0.Beta1}[15738]: stopped
[2013-09-19 22:29:32,704][INFO ][node ] [Iron Lad] {0.90.0.Beta1}[15738]: closing ...
[2013-09-19 22:29:32,733][INFO ][node ] [Iron Lad] {0.90.0.Beta1}[15738]: closed
[2013-09-19 22:29:34,985][INFO ][node ] [Worthington, Warren III] {0.90.0.Beta1}[16047]: initializing ...
[2013-09-19 22:29:34,991][INFO ][plugins ] [Worthington, Warren III] loaded [], sites []
[2013-09-19 22:29:37,492][INFO ][node ] [Worthington, Warren III] {0.90.0.Beta1}[16047]: initialized
[2013-09-19 22:29:37,492][INFO ][node ] [Worthington, Warren III] {0.90.0.Beta1}[16047]: starting ...
[2013-09-19 22:29:37,576][INFO ][transport ] [Worthington, Warren III] bound_address {inet[/0.0.0.0:9301]}, publish_address {inet[/66.66.66.66:9301]}
[2013-09-19 22:29:40,613][INFO ][cluster.service ] [Worthington, Warren III] new_master [Worthington, Warren III][-VnBhd4JTKe3Vg0PGqGKcg][inet[/66.66.66.66:9301]], reason: zen-disco-join (elected_as_master)
[2013-09-19 22:29:40,655][INFO ][discovery ] [Worthington, Warren III] elasticsearch/-VnBhd4JTKe3Vg0PGqGKcg
[2013-09-19 22:29:40,717][INFO ][http ] [Worthington, Warren III] bound_address {inet[/0.0.0.0:9201]}, publish_address {inet[/66.66.66.66:9201]}
[2013-09-19 22:29:40,717][INFO ][node ] [Worthington, Warren III] {0.90.0.Beta1}[16047]: started
[2013-09-19 22:29:40,721][INFO ][gateway ] [Worthington, Warren III] recovered [0] indices into cluster_state
非常感谢任何想法或想法。
答案 0 :(得分:3)
我发现有多个弹性搜索节点在运行。我最终停止了所有这些,然后使用/etc/init.d/elasticsearch start启动了一个。
请记住,您需要按照以下说明安装init.d脚本:
http://www.elasticsearch.org/guide/reference/setup/installation/