无法在TFS 2017.1上启动ElasticSerach

时间:2017-04-27 06:36:51

标签: elasticsearch tfs

目前我无法在Windows Server 2012上的TFS 2017.1上启动ElasticSerach 2.4.1

日志文件说访问被拒绝,但文件夹" E:\ TfsData \ Search \ IndexStore"拥有775项权利

elasticsearch-service-x64-stderr.xxxx-xx-xx.log

2017-04-27 07:20:56 Commons Daemon procrun stderr initialized
Exception in thread "main" tion: Unable to access 'path.data' (E:\TfsData\Search\IndexStore)
Likely root cause: java.nio.file.AccessDeniedException: E:\TfsData\Search\IndexStore
    at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:90)
    at sun.nio.fs.WindowsLinkSupport.getRealPath(WindowsLinkSupport.java:259)
    at sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:836)
    at sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:44)
    at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:333)
    at org.elasticsearch.bootstrap.Security.addPath(Security.java:314)
    at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:256)
    at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:212)
    at org.elasticsearch.bootstrap.Security.configure(Security.java:118)
    at org.elasticsearch.bootstrap.Bootstrap.setupSecurity(Bootstrap.java:212)
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:183)
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Refer to the log for complete error details.

TFS_Serach_TFS.log

[ERROR][bootstrap] Exception
java.lang.IllegalStateException: Unable to access 'path.data' (E:\TfsData\Search\IndexStore)
    at org.elasticsearch.bootstrap.Security.addPath(Security.java:316)
    at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:256)
    at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:212)
    at org.elasticsearch.bootstrap.Security.configure(Security.java:118)
    at org.elasticsearch.bootstrap.Bootstrap.setupSecurity(Bootstrap.java:212)
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:183)
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Caused by: java.nio.file.AccessDeniedException: E:\TfsData\Search\IndexStore
    at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:90)
    at sun.nio.fs.WindowsLinkSupport.getRealPath(WindowsLinkSupport.java:259)
    at sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:836)
    at sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:44)
    at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:333)
    at org.elasticsearch.bootstrap.Security.addPath(Security.java:314)
    ... 7 more

我对ElasticSerach(elasticsearch.yml)的配置

{
    "cluster.name": "TFS_Search_${COMPUTERNAME}",
    "node.name": "${COMPUTERNAME}",
    "index.number_of_replicas": 0,
    "path.data": "${SEARCH_ES_INDEX_PATH}",
    "http.port": 9200,
    "discovery.zen.ping.multicast.enabled": false,
    "network.host": "127.0.0.1"
}

每个人都有一个想法,我该如何解决这些问题。

编辑: 服务器日志,当我尝试启动Elasticsearch服务时

'AccountFaultInJob' failed with error : Microsoft.VisualStudio.Services.Search.Common.SearchPlatformException: ES Exception: Unknown Exception Err: [Nest.GetAliasesResponse]. Raw response:

1 个答案:

答案 0 :(得分:0)

长时间解决问题后

有一些问题

  1. 搜索索引的文件夹具有所有必需的访问权限,但是在Windows下,该驱动器具有单独的访问权限,因此搜索服务的帐户需要对该驱动器具有访问权限。

  2. 端口8000和 9200 已绑定到TFS,我从IIS中删除了对端口9200的绑定。您可以在IIS-Manger-> TFS->网站

  3. 下找到绑定
  4. ElasticSearch服务始终在安装中使用端口 9201 ,在我从IIS中删除端口绑定并重新安装ElasticSearch之后,它使用端口9200。

  5. 一切正常之后,我已经通过PowerShell脚本开始了完整的重新索引。这将需要几个小时。在完成索引编制之前,代码搜索页面将始终显示错误。

TFS管理员的重要URL:

希望它可以为您提供帮助

相关问题