弹性:无法解析配置路径

时间:2015-09-30 13:21:02

标签: elasticsearch

我正在用这个问题撞击屏幕。我试图为索引配置停用词。这适用于我的本地系统,即Ubuntu系统。

使用Elastic 1.7.2

curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Postman-Token: 34bbe264-ad79-de46-d5cd-293c5a9a1584" -d '{
  "settings": {
    "analysis": {
      "analyzer": {
        "my_english": {
          "type":           "english",
          "stopwords_path": "stopwords/stopwords_en.txt" 
        }
      }
    }
  }
}' 'http://10.40.1.55:9200/my_index'

这是使用Java API导致的跟踪(cURL和Java都会产生错误)

Caused by: org.elasticsearch.env.FailedToResolveConfigException: Failed to resolve config path [/stopwords/stopwords_en.txt], tried file path [/stopwords/stopwords_en.txt], path file [/etc/elasticsearch/stopwords/stopwords_en.txt], and classpath
        at org.elasticsearch.env.Environment.resolveConfig(Environment.java:213)
        at org.elasticsearch.index.analysis.Analysis.getWordList(Analysis.java:230)
        at org.elasticsearch.index.analysis.Analysis.parseWords(Analysis.java:165)
        at org.elasticsearch.index.analysis.Analysis.parseStopWords(Analysis.java:185)
        at org.elasticsearch.index.analysis.Analysis.parseStopWords(Analysis.java:181)
        at org.elasticsearch.index.analysis.StandardAnalyzerProvider.<init>(StandardAnalyzerProvider.java:53)
        at sun.reflect.GeneratedConstructorAccessor135.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:54)
        at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)
        at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
        at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
        at org.elasticsearch.common.inject.InjectorImpl$5$1.call(InjectorImpl.java:781)
        at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:837)
        at org.elasticsearch.common.inject.InjectorImpl$5.get(InjectorImpl.java:777)
        at org.elasticsearch.common.inject.assistedinject.FactoryProvider2.invoke(FactoryProvider2.java:221)
        at com.sun.proxy.$Proxy18.create(Unknown Source)

/ etc / elasticsearch的权限是敞开的。

drwxrwxrwx   3 root root  4096 Sep 30 15:03 ./
drwxr-xr-x 111 root root  4096 Sep 18 16:01 ../
-rwxrwxrwx   1 root root 13476 Apr 27 10:07 elasticsearch.yml*
-rwxrwxrwx   1 root root  2054 Sep 14 11:51 logging.yml*
-rwxr--r--   1 root root  4588 Sep 30 15:03 stopwords_en.txt*

elasticsearch.log

中没有任何内容

非常感谢任何见解。

1 个答案:

答案 0 :(得分:0)

这是集群的结果,而我不知道。有人在同一网络上为另一个项目安装了Elastic。

日志表明它找到了主人

[2015-09-30 15:34:30,498][INFO ][cluster.service          ] [Bedlam II] detected_master [Abominatrix][CIhwAycJTzufgmB4cw0utQ][p-v00284][inet[/10.40.1.54:9300]], added {[Abominatrix][CIhwAycJTzufgmB4cw0utQ][p-v00284][inet[/10.40.1.54:9300]],}, reason: zen-disco-receive(from master [[Abominatrix][CIhwAycJTzufgmB4cw0utQ][p-v00284][inet[/10.40.1.54:9300]]])
[2015-09-30 15:34:30,642][INFO ][http                     ] [Bedlam II] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/10.40.1.55:9200]}