【问题标题】:TFS 2018, code search and work item search returns error: Unexpected error in search serviceTFS 2018,代码搜索和工作项搜索返回错误:搜索服务中出现意外错误
【发布时间】:2017-12-21 10:56:20
【问题描述】:

我已升级到 TFS 2018 PRE PROD 服务器,正在从 Prod 环境迁移 OLD TFS 2015 Update 3 数据库。

我在配置中添加了一个应用层服务器,所以我有两个应用层。我已经使用了辅助应用服务器并配置了搜索功能。

使用TFS 2018UI 完成配置。配置似乎没问题,因为没有错误。

现在,当我尝试搜索工作项或代码时,无论我搜索什么,都会收到以下错误:

处理您的请求时出现问题。出现意外错误 搜索服务。

我需要在搜索服务配置后做额外的配置吗?

更新:我可以在应用层事件日志中看到以下错误:

ExceptionType Microsoft.VisualStudio.Services.Search.Common.SearchPlatformException

消息 Microsoft.VisualStudio.Services.Search.Common.SearchPlatformException:ElasticSearch 响应无效 ---> System.Net.WebException:远程服务器返回错误:(404)未找到。在 System.Net.HttpWebRequest.GetResponse() 在 Elasticsearch.Net.HttpConnection.Request[TReturn](RequestData requestData) --- 内部异常堆栈跟踪结束 --- 在 Microsoft.VisualStudio.Services.Search.Platforms.SearchEngine。在 Microsoft.VisualStudio.Services.Search.Platforms.SearchEngine.Implementations.ElasticSearchPlatform.Search[T](IVssRequestContext requestContext, EntitySearchPlatformRequest request, EntityType entityType) 上的 Implementations.ElasticSearchPlatform.ValidateQueryResponse[T](IVssRequestContext requestContext, ISearchResponse1 queryResponse, IEnumerable1 requestIndices)在 Microsoft.VisualStudio.Services.Search.Query.CodeSearchQueryForwarder.ForwardSearchRequest(IVssRequestContext requestContext, SearchQuery searchQuery, IEnumerable`1 indexInfo, IExpression scopeFiltersExpression, String requestId, DocumentContractType contractType) 在 Microsoft.VisualStudio.Services.Search.WebServer.CodeSearchControllerBase.HandlePostCodeQueryRequest( IVssRequestContext requestContext, SearchQuery qu ery, Boolean isSecurityChecksEnabled, Boolean isCustomProjectSecurityCheckEnabled)

【问题讨论】:

    标签: elasticsearch tfs


    【解决方案1】:

    请检查elasticsearch-service-x64服务是否在配置搜索的服务器上运行。如果服务已停止,请启动它并再次访问搜索服务器。

    更多详情请参阅“Team Foundation Server 中的搜索疑难解答”下的“搜索停止工作且未显示任何结果”部分:

    https://www.visualstudio.com/en-us/docs/search/code/administration#troubleshoot-search-in-team-foundation-server

    【讨论】:

    • 董,感谢您的回复,我检查了服务似乎运行良好。搜索功能记录的错误在哪里?
    • 我注意到的一件事是,搜索 URL 自动配置为 localhost,除了配置它的服务器之外,我无法从任何其他机器访问。
    • 您可以在配置代码搜索/工作项搜索时键入搜索服务 url。尝试重新配置它。
    • 当我第一次配置并选择安装搜索服务时,它不允许我选择。但取消配置并尝试重新配置可以选择提供 URL。但是,即使我提供了不同的 URL,搜索引擎也总是会配置 localhost:9200,至少管理控制台中的搜索选项卡是这样显示的。
    • 错误应用程序名称:elasticsearch-service-x64.exe,版本:1.0.15.0,时间戳:0x51543b9d 错误模块名称:jvm.dll,版本:25.71.0.1,时间戳:0x59af5edd 异常代码: 0xc0000005 错误偏移量: 0x0000000000216bc8 错误进程 id: 0x1bbb8 我在事件日志中有这个错误。
    猜你喜欢
    • 2018-11-03
    • 2018-02-21
    • 2012-10-03
    • 2020-07-09
    • 1970-01-01
    • 1970-01-01
    • 2013-03-09
    • 2013-12-30
    • 1970-01-01
    相关资源
    最近更新 更多