2014-10-30 181 views
1

我正面临着Elasticsearch的问题。 我无法得到结果。我在日志文件检查我得到了以下错误:Elasticsearch服务器由于java.io.IOException而中断

ERROR: 
2014-10-30 08:52:46,971][DEBUG][action.search.type  ] [Lianda] [135] Failed to execute fetch phase 
[Error: Runtime.getRuntime().exec("cd").getInputStream(): Cannot run program "cd": java.io.IOException: error=2, No such file or directory] 
[Near : {... w InputStreamReader(Runtime.getRuntime().exec("cd" ....}] 

下面是我使用的版本:

  • 弹性搜索版本:0.90.5
  • Java版本:1.6.0_33 64位
  • 插件安装:语音

奇怪的是,每当我得到这个错误,我重启elasti c搜索服务器及其作品。

所以我认为有些东西会越来越重。

回答

2

基于看到Runtime.getRuntime().exec()调用,它可能与版本1.2之前的弹性搜索默认值中的动态脚本漏洞有关。请参阅scripting security上的此文档。

如果这是问题的根源,则可以在当前版本中进行修复(或升级到更新版本)。从上面的链接:

If you are running an Elasticsearch node prior to the 1.2.x release, you can make this change on your system by putting the following setting into elasticsearch.yml:

script.disable_dynamic: true 

Then restart each node in your cluster. Dynamic scripting will now be disabled. If you are running Elasticsearch 1.2.x or later, dynamic scripting is already disabled by default.