gpt4 book ai didi

elasticsearch - 无法在 TFS 2017.1 上启动 ElasticSearch

转载 作者:行者123 更新时间:2023-12-03 00:07:47 25 4
gpt4 key购买 nike

目前我无法在 Windows Server 2012 上的 TFS 2017.1 上启动 ElasticSearch 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

我对 ElasticSearch 的配置 (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:

最佳答案

经过很长时间我已经解决了这个问题

有一些问题

  • 搜索索引的文件夹具有所有需要的访问权限,但在 windows 下驱动器具有单独的访问权限,因此搜索服务的帐户需要访问驱动器的权限。
  • 端口 8000 和 9200 已绑定(bind)到 TFS,我从 IIS 中删除了与端口 9200 的绑定(bind)。您可以在 IIS-Manger -> TFS -> Sites
  • 下找到绑定(bind)。
  • ElasticSearch 服务一直使用端口 9201 在安装时,我从 IIS 中删除端口绑定(bind)并重新安装 ElasticSearch 后,它使用端口 9200。
  • 一切正常后,我通过 PowerShell 脚本开始了完整的重新索引。这将需要几个小时。代码搜索页面将始终在索引完成之前显示错误。

  • TFS 管理员的重要 URL:
  • 在 TFS -> ES 索引 -> http://localhost:9200/_cat/shards?v
  • 在 TFS -> ES 状态 -> http://localhost:9200/_cat/health?v
  • TFS 状态、作业等 -> http://[Server]:8080/tfs/_oi/
    (您需要完整的 TFS 管理员权限)

  • 希望它可以帮助你

    关于elasticsearch - 无法在 TFS 2017.1 上启动 ElasticSearch,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43650292/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com