I am facing an error when I try to create a collection on Azure DevOps On premises from the administration console.
It seems to happen when DevOps manages the CreateCollection.Service.Analytics
part. I can't find any reference to this problem on Google.
I choose the Inheritance process model in the wizard and when I launch the installation, after a few minutes :
[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.
It is the first collection that I created from scratch on Azure DevOps, but I already have a migrated collection from tfs 2015 which works very well. I don't want to create my collection on tfs2015 only to migrate it to devops :(
The reports are not configured, I understand that I can configure them later when I really want to use them. I did not install SSRS but if it is necessary I would do it.
The Analytics service feature is installed on my instance of SQL Server. SQL Server is installed on the same server.
The database for the collection was created but the state in the console is Offline and I cannot re-execute the creation work I have an error, I have to delete it with command line.
Edit:
I tested a creation with the xml process model and it's working. In the settings page I see Analytics is activated.
Edit 2: Thanks to @PatrickLu-MSFT, that's work. I had already tried to restart the server before posting but without success.
This time I tried to restart all SQL services from SQL Configuration Manager and recreate the collection, but it still failed, it was not enough.
Then I used Services to restart the service again: SQL Server (MSSSQLSERVER) and I reboot the server as Patrick told me. And it worked, I was able to create my collection with inheritance model!