无法在 Azure DevOps Server 升级期间删除弹性搜索服务

joy*_*ym8 1 tfs visual-studio azure-devops-server-2019

尝试将 TFS 2018 升级到 DevOps Server 2019。卡在准备情况检查屏幕上。它要我删除 elasticsearch 服务。

安装程序卡在准备检查中

服务已停止。

并且服务属性中提到的路径,特别是搜索文件夹,不存在C:\Program Files\Microsoft Team Foundation Server 2018\Search\ES\elasticsearchv5\bin\elasticsearch-service-x64.exe //RS//elasticsearch-service-x64 不存在

无法service -remove从 bin 文件夹运行。

Elasticsearch 服务属性

命令提示符显示搜索文件夹不存在

相关日志:

[Info   @07:49:10.510] +-+-+-+-+-| Running Service Not Installed: Verifying the following Windows service is not installed: elasticsearch-service-x64 |+-+-+-+-+-
[Info   @07:49:10.511] 
[Info   @07:49:10.511] +-+-+-+-+-| Verifying the following Windows service is not installed: elasticsearch-service-x64 |+-+-+-+-+-
[Info   @07:49:10.511] Starting Node: VSEARCHSERVICENOTINSTALLED
[Info   @07:49:10.511] NodePath : VINPUTS/Conditional/Progress/Conditional/VSEARCHSERVICENOTINSTALLED
[Info   @07:49:10.511] Verifying that the following service is NOT installed: elasticsearch-service-x64. Machine: ..
[Info   @07:49:10.512] Node returned: Error
[Error  @07:49:10.512] The following Windows service is installed on your computer: elasticsearch-service-x64. Remove elasticsearch-service-x64 to continue. Read the troubleshooting guide (https://go.microsoft.com/fwlink/?linkid=828578) for more details.
[Info   @07:49:10.512] Completed Service Not Installed: Error
[Info   @07:49:10.512] -----------------------------------------------------
[Info   @07:49:10.512] 
[Info   @07:49:10.512] +-+-+-+-+-| Running VerifySearchIndexLocation: Verifying that the search index location path is valid. |+-+-+-+-+-
[Info   @07:49:10.512] 
[Info   @07:49:10.512] +-+-+-+-+-| Verifying that the search index location path is valid. |+-+-+-+-+-
[Info   @07:49:10.512] Starting Node: VSEARCHINDEXLOCATIONVERIFIER
[Info   @07:49:10.512] NodePath : VINPUTS/Conditional/Progress/Conditional/VSEARCHINDEXLOCATIONVERIFIER
[Info   @07:49:10.513] Node returned: Success
[Info   @07:49:10.513] Completed VerifySearchIndexLocation: Success
[Info   @07:49:10.513] -----------------------------------------------------
[Info   @07:49:10.513] 
[Info   @07:49:10.513] +-+-+-+-+-| Running Verify ElasticSearch port is available: Verifying that a port is available in range 9200-9299 |+-+-+-+-+-
[Info   @07:49:10.513] 
[Info   @07:49:10.513] +-+-+-+-+-| Verifying that a port is available in range 9200-9299 |+-+-+-+-+-
[Info   @07:49:10.513] Starting Node: VSEARCHESPORTAVAILABLE
[Info   @07:49:10.513] NodePath : VINPUTS/Conditional/Progress/Conditional/VSEARCHESPORTAVAILABLE
[Info   @07:49:10.514] Port: 9200 is available for configuring elasticsearch
[Info   @07:49:10.514] Node returned: Success
[Info   @07:49:10.514] Completed Verify ElasticSearch port is available: Success
[Info   @07:49:10.514] -----------------------------------------------------
[Info   @07:49:10.514] 
[Info   @07:49:10.514] +-+-+-+-+-| Running VerifySearchServiceAccount: Verifying that the search service account name and password is valid. |+-+-+-+-+-
[Info   @07:49:10.514] 
[Info   @07:49:10.515] +-+-+-+-+-| Verifying that the search service account name and password is valid. |+-+-+-+-+-
[Info   @07:49:10.515] Starting Node: VSEARCHACCOUNTVALID
[Info   @07:49:10.515] NodePath : VINPUTS/Conditional/Progress/Conditional/VSEARCHACCOUNTVALID
[Info   @07:49:10.515] Node returned: Success
[Info   @07:49:10.515] Completed VerifySearchServiceAccount: Success
[Info   @07:49:10.515] -----------------------------------------------------
Run Code Online (Sandbox Code Playgroud)

Pro*_*eus 5

在这种情况下,只需以管理员身份在cmd中运行命令即可 sc delete elasticsearch-service-x64

根据微软文档,该sc delete命令从注册表中删除该服务,而不需要指定路径中的可执行文件。

执行此命令后,关闭引用 Windows 服务的所有窗口,并请求在 Azure DevOps Server 2019 中进行新检查