Azure DevOps 2019 On-Prem - 创建 collection 时出错:"LeaseLostException on step Create Framework Security Namespaces"

Azure DevOps 2019 On-Prem - Error on creating collection : "LeaseLostException on step Create Framework Security Namespaces"

当我尝试从管理控制台在本地 Azure DevOps 上创建 collection 时遇到错误。

这似乎发生在 DevOps 管理 CreateCollection.Service.Analytics 部分时。我在 Google.

上找不到任何关于此问题的参考资料

我在向导中选择继承过程模型,当我启动安装时,几分钟后:

[15:15:32.793] Executing step: Enable analytics on-prem for new collections
[15:15:32.793]   Executing step: 'Enable analytics on-prem for new collections' AnalyticsCollection.EnableAnalyticsOnPrem (360 of 387)
[15:16:13.407]   [Warning] Impossible d'activer Analytics pour cette nouvelle collection. Vous pouvez y remédier en réactivant Analytics manuellement. Pour plus d'informations, consultez la documentation : https://go.microsoft.com/fwlink/?linkid=2093060.
[15:16:13.533]   [Warning] Analytics failed to enable for new collection due to: Le bail de AnalyticsStateService.SetFeatureState, dont le propriétaire est f24b9929-5d00-498c-9b4c-1e6d8c5f8f77, obtenu le 10/03/2020 14:15:33 par le processus abde3e12-0d37-4751-a1fe-23387f8c5268 a expiré le 10/03/2020 14:16:03
*** 
in english : 
Unable to enable Analytics for this new collection. You can fix it by reactivating Analytics manually (so later no ??? )
The lease for AnalyticsStateService.SetFeatureState, owned by f24b9929-5d00-498c-9b4c-1e6d8c5f8f77, obtained on 10/03/2020 14:15:33 by the process abde3e12-0d37-4751-a1fe-23387f8c5268 expired on 10 / 03/2020 14:16:03 
***
[15:16:13.540] Step passed (with warnings): Enable analytics on-prem for new collections. Execution time: 40 seconds.
[15:16:13.540]   [StepDuration] 40,7454734
[15:16:13.597]   [GroupDuration] 67,5660477
[15:16:13.597]   [OperationDuration] 67,56617
[15:16:13.597] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[15:16:13.597] ++ Executing - Operation: CreateCollection.Service.Analytics.Sdk, Group: CreateCollection.Service.Analytics.Sdk
[15:16:13.597] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[15:16:13.597] Step skipped: Queue Analytics Maintain Staging Schedules Job.
[15:16:13.600]   [GroupDuration] 0,0046515
[15:16:13.600]   [OperationDuration] 0,0046985
[15:16:13.600] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[15:16:13.600] ++ Executing - Operation: CreateCollection.Service.Notifications, Group: CreateCollection.Service.Notifications
[15:16:13.600] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[15:16:13.600] Executing step: Load service tokens
[15:16:13.600]   Executing step: 'Load service tokens' FrameworkTokens.ConfigureServiceTokens (362 of 387)
[15:16:13.603] Step passed: Load service tokens. Execution time: 3 milliseconds.
[15:16:13.603]   [StepDuration] 0,0002612
[15:16:13.603] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Executing step: Create Framework Security Namespaces
[15:16:13.603]   Executing step: 'Create Framework Security Namespaces' Security.CreateSecurityNamespaces (363 of 387)
[15:16:13.603]   There are 1 security namespaces to create/update.
[15:16:13.603]   Validating 'EventSubscription' security namespace.
[15:16:13.603]   Creating/updating security namespace(s).
[15:16:13.603]   [Error] Le bail de AnalyticsStateService.SetFeatureState, dont le propriétaire est f24b9929-5d00-498c-9b4c-1e6d8c5f8f77, obtenu le 10/03/2020 14:15:33 par le processus abde3e12-0d37-4751-a1fe-23387f8c5268 a expiré le 10/03/2020 14:16:03
*** 
in english : 
Same error but with stack trace
The lease for AnalyticsStateService.SetFeatureState, owned by f24b9929-5d00-498c-9b4c-1e6d8c5f8f77, obtained on 10/03/2020 14:15:33 by the process abde3e12-0d37-4751-a1fe-23387f8c5268 expired on 10 / 03/2020 14:16:03 
***
[15:16:13.633]   Microsoft.TeamFoundation.Framework.Server.LeaseLostException: Le bail de AnalyticsStateService.SetFeatureState, dont le propriétaire est f24b9929-5d00-498c-9b4c-1e6d8c5f8f77, obtenu le 10/03/2020 14:15:33 par le processus abde3e12-0d37-4751-a1fe-23387f8c5268 a expiré le 10/03/2020 14:16:03
[15:16:13.633]      à Microsoft.TeamFoundation.Framework.Server.VssRequestContext.CheckCanceled(Boolean throwIfShutdown)
[15:16:13.633]      à Microsoft.TeamFoundation.Framework.Server.VssRequestContext.get_ServiceProvider()
[15:16:13.633]      à Microsoft.TeamFoundation.Framework.Server.VssRequestContextExtensions.GetService[TService](IVssRequestContext context)
[15:16:13.633]      à Microsoft.VisualStudio.Services.Framework.SecurityStepPerformer.CreateOrUpdateSecurityNamespaces(IVssRequestContext requestContext, ServicingContext servicingContext, LocalNamespaceDescriptionStepData[] securityNamespaceDescriptions)
[15:16:13.633]      à Microsoft.TeamFoundation.Framework.Server.TeamFoundationStepPerformerBase.PerformHostStep(String servicingOperation, ServicingOperationTarget target, IServicingStep servicingStep, String stepData, ServicingContext servicingContext)
[15:16:13.633]      à Microsoft.TeamFoundation.Framework.Server.TeamFoundationStepPerformerBase.PerformStep(String servicingOperation, ServicingOperationTarget target, String stepType, String stepData, ServicingContext servicingContext)
[15:16:13.633]      à Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformServicingStep(ServicingStep step, ServicingContext servicingContext, ServicingStepGroup group, ServicingOperation servicingOperation, Int32 stepNumber, Int32 totalSteps)
[15:16:13.633] Step failed: Create Framework Security Namespaces. Execution time: 30 milliseconds.

这是我在 Azure DevOps 上从头开始创建的第一个 collection,但我已经从 tfs 2015 迁移了一个 collection,效果很好。我不想在 tfs2015 上创建我的 collection 只是为了将它迁移到 devops :(

报表没有配置,我知道以后真的要用的时候再配置。我没有安装 SSRS,但如果有必要,我会安装。

分析服务功能安装在我的 SQL 服务器实例上。 SQL服务器安装在同一台服务器上。

collection 的数据库已创建,但控制台中的状态为离线,我无法 re-execute 创建工作我遇到错误,我必须使用命令行将其删除。


编辑:

我用 xml 流程模型测试了一个创作,它正在运行。在设置页面中,我看到 Analytics 已激活。

编辑 2:感谢@PatrickLu-MSFT,一切顺利。 我在发帖之前已经尝试过重启服务器,但没有成功。

这次我尝试从 SQL 配置管理器重新启动所有 SQL 服务并重新创建 collection,但仍然失败,这还不够。

然后我再次使用服务重新启动服务:SQL服务器(MSSSQL服务器),然后按照帕特里克告诉我的那样重新启动服务器。它奏效了,我能够使用继承模型创建我的 collection!

根据您的描述,您的SQL服务可能有问题。

请尝试重新启动 SQL 服务器服务,如果挂断则尝试停止该服务。然后你可以尝试重新启动服务器并再次尝试创建一个新的集合。

如果这还不行,请检查事件视图中是否有一些信息。这可能有助于查明问题。