在 Azure DevOps Server 升级期间无法删除弹性搜索服务
Unable to remove elastic search service during Azure DevOps Server upgrade
正在尝试将 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
不存在 .
无法从 bin 文件夹运行service -remove
。
相关日志:
[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] -----------------------------------------------------
那样的话,只需运行以管理员身份在cmd中输入命令即可
sc delete elasticsearch-service-x64
根据 microsoft documentation,sc delete
命令从注册表中删除服务,而不需要指定路径中的可执行文件。
执行此命令后,关闭所有 windows 引用 windows 服务并请求在 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
不存在 .
无法从 bin 文件夹运行service -remove
。
相关日志:
[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] -----------------------------------------------------
那样的话,只需运行以管理员身份在cmd中输入命令即可
sc delete elasticsearch-service-x64
根据 microsoft documentation,sc delete
命令从注册表中删除服务,而不需要指定路径中的可执行文件。
执行此命令后,关闭所有 windows 引用 windows 服务并请求在 Azure DevOps Server 2019 中进行新检查