Я использую .Net Core 2.2 для своего веб-проекта.Я получил тестовые примеры, которые я выполняю, используя dotnet vstest как часть конвейера CI в докере Linux.Иногда выполнение завершается неудачно со стеком ниже:
Сообщение об ошибке:
> OneTimeSetUp: Autofac.Core.DependencyResolutionException : An error
> occurred during the activation of a particular registration. See the
> inner exception for details. Registration: Activator = MvcRouteHandler
> (ReflectionActivator), Services =
> [Microsoft.AspNetCore.Mvc.Internal.MvcRouteHandler], Lifetime =
> Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership =
> OwnedByLifetimeScope ---> An error occurred during the activation of a
> particular registration. See the inner exception for details.
> Registration: Activator = ActionInvokerFactory (ReflectionActivator),
> Services =
> [Microsoft.AspNetCore.Mvc.Infrastructure.IActionInvokerFactory],
> Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared,
> Ownership = OwnedByLifetimeScope ---> An error occurred during the
> activation of a particular registration. See the inner exception for
> details. Registration: Activator = IActionInvokerProvider[]
> (DelegateActivator), Services =
> [System.Collections.Generic.IEnumerable`1[[Microsoft.AspNetCore.Mvc.Abstractions.IActionInvokerProvider,
> Microsoft.AspNetCore.Mvc.Abstractions, Version=2.2.0.0,
> Culture=neutral, PublicKeyToken=adb9793829ddae60]]], Lifetime =
> Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership
> = ExternallyOwned ---> An error occurred during the activation of a particular registration. See the inner exception for details.
> Registration: Activator = ControllerActionInvokerProvider
> (ReflectionActivator), Services =
> [Microsoft.AspNetCore.Mvc.Abstractions.IActionInvokerProvider],
> Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None,
> Ownership = OwnedByLifetimeScope ---> An error occurred during the
> activation of a particular registration. See the inner exception for
> details. Registration: Activator = ControllerActionInvokerCache
> (ReflectionActivator), Services =
> [Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvokerCache],
> Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared,
> Ownership = OwnedByLifetimeScope ---> An error occurred during the
> activation of a particular registration. See the inner exception for
> details. Registration: Activator =
> DefaultActionDescriptorCollectionProvider (ReflectionActivator),
> Services =
> [Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorCollectionProvider],
> Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared,
> Ownership = OwnedByLifetimeScope ---> An exception was thrown while
> invoking the constructor 'Void
> .ctor(System.Collections.Generic.IEnumerable`1[Microsoft.AspNetCore.Mvc.Abstractions.IActionDescriptorProvider],
> System.Collections.Generic.IEnumerable`1[Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorChangeProvider])'
> on type 'DefaultActionDescriptorCollectionProvider'. ---> The
> configured user limit (128) on the number of inotify instances has
> been reached. (See inner exception for details.) (See inner exception
> for details.) (See inner exception for details.) (See inner exception
> for details.) (See inner exception for details.) (See inner exception
> for details.) (See inner exception for details.) ---->
> Autofac.Core.DependencyResolutionException : An error occurred during
> the activation of a particular registration. See the inner exception
> for details. Registration: Activator = ActionInvokerFactory
> (ReflectionActivator), Services =
> [Microsoft.AspNetCore.Mvc.Infrastructure.IActionInvokerFactory],
> Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared,
> Ownership = OwnedByLifetimeScope ---> An error occurred during the
> activation of a particular registration. See the inner exception for
> details. Registration: Activator = IActionInvokerProvider[]
> (DelegateActivator), Services =
> [System.Collections.Generic.IEnumerable`1[[Microsoft.AspNetCore.Mvc.Abstractions.IActionInvokerProvider,
> Microsoft.AspNetCore.Mvc.Abstractions, Version=2.2.0.0,
> Culture=neutral, PublicKeyToken=adb9793829ddae60]]], Lifetime =
> Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership
> = ExternallyOwned ---> An error occurred during the activation of a particular registration. See the inner exception for details.
> Registration: Activator = ControllerActionInvokerProvider
> (ReflectionActivator), Services =
> [Microsoft.AspNetCore.Mvc.Abstractions.IActionInvokerProvider],
> Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None,
> Ownership = OwnedByLifetimeScope ---> An error occurred during the
> activation of a particular registration. See the inner exception for
> details. Registration: Activator = ControllerActionInvokerCache
> (ReflectionActivator), Services =
> [Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvokerCache],
> Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared,
> Ownership = OwnedByLifetimeScope ---> An error occurred during the
> activation of a particular registration. See the inner exception for
> details. Registration: Activator =
> DefaultActionDescriptorCollectionProvider (ReflectionActivator),
> Services =
> [Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorCollectionProvider],
> Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared,
> Ownership = OwnedByLifetimeScope ---> An exception was thrown while
> invoking the constructor 'Void
> .ctor(System.Collections.Generic.IEnumerable`1[Microsoft.AspNetCore.Mvc.Abstractions.IActionDescriptorProvider],
> System.Collections.Generic.IEnumerable`1[Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorChangeProvider])'
> on type 'DefaultActionDescriptorCollectionProvider'. ---> The
> configured user limit (128) on the number of inotify instances has
> been reached. (See inner exception for details.) (See inner exception
> for details.) (See inner exception for details.) (See inner exception
> for details.) (See inner exception for details.) (See inner exception
> for details.) ----> Autofac.Core.DependencyResolutionException : An
> error occurred during the activation of a particular registration. See
> the inner exception for details. Registration: Activator =
> IActionInvokerProvider[] (DelegateActivator), Services =
> [System.Collections.Generic.IEnumerable`1[[Microsoft.AspNetCore.Mvc.Abstractions.IActionInvokerProvider,
> Microsoft.AspNetCore.Mvc.Abstractions, Version=2.2.0.0,
> Culture=neutral, PublicKeyToken=adb9793829ddae60]]], Lifetime =
> Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership
> = ExternallyOwned ---> An error occurred during the activation of a particular registration. See the inner exception for details.
> Registration: Activator = ControllerActionInvokerProvider
> (ReflectionActivator), Services =
> [Microsoft.AspNetCore.Mvc.Abstractions.IActionInvokerProvider],
> Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None,
> Ownership = OwnedByLifetimeScope ---> An error occurred during the
> activation of a particular registration. See the inner exception for
> details. Registration: Activator = ControllerActionInvokerCache
> (ReflectionActivator), Services =
> [Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvokerCache],
> Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared,
> Ownership = OwnedByLifetimeScope ---> An error occurred during the
> activation of a particular registration. See the inner exception for
> details. Registration: Activator =
> DefaultActionDescriptorCollectionProvider (ReflectionActivator),
> Services =
> [Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorCollectionProvider],
> Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared,
> Ownership = OwnedByLifetimeScope ---> An exception was thrown while
> invoking the constructor 'Void
> .ctor(System.Collections.Generic.IEnumerable`1[Microsoft.AspNetCore.Mvc.Abstractions.IActionDescriptorProvider],
> System.Collections.Generic.IEnumerable`1[Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorChangeProvider])'
> on type 'DefaultActionDescriptorCollectionProvider'. ---> The
> configured user limit (128) on the number of inotify instances has
> been reached. (See inner exception for details.) (See inner exception
> for details.) (See inner exception for details.) (See inner exception
> for details.) (See inner exception for details.) ---->
> Autofac.Core.DependencyResolutionException : An error occurred during
> the activation of a particular registration. See the inner exception
> for details. Registration: Activator = ControllerActionInvokerProvider
> (ReflectionActivator), Services =
> [Microsoft.AspNetCore.Mvc.Abstractions.IActionInvokerProvider],
> Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None,
> Ownership = OwnedByLifetimeScope ---> An error occurred during the
> activation of a particular registration. See the inner exception for
> details. Registration: Activator = ControllerActionInvokerCache
> (ReflectionActivator), Services =
> [Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvokerCache],
> Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared,
> Ownership = OwnedByLifetimeScope ---> An error occurred during the
> activation of a particular registration. See the inner exception for
> details. Registration: Activator =
> DefaultActionDescriptorCollectionProvider (ReflectionActivator),
> Services =
> [Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorCollectionProvider],
> Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared,
> Ownership = OwnedByLifetimeScope ---> An exception was thrown while
> invoking the constructor 'Void
> .ctor(System.Collections.Generic.IEnumerable`1[Microsoft.AspNetCore.Mvc.Abstractions.IActionDescriptorProvider],
> System.Collections.Generic.IEnumerable`1[Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorChangeProvider])'
> on type 'DefaultActionDescriptorCollectionProvider'. ---> The
> configured user limit (128) on the number of inotify instances has
> been reached. (See inner exception for details.) (See inner exception
> for details.) (See inner exception for details.) (See inner exception
> for details.) ----> Autofac.Core.DependencyResolutionException : An
> error occurred during the activation of a particular registration. See
> the inner exception for details. Registration: Activator =
> ControllerActionInvokerCache (ReflectionActivator), Services =
> [Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvokerCache],
> Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared,
> Ownership = OwnedByLifetimeScope ---> An error occurred during the
> activation of a particular registration. See the inner exception for
> details. Registration: Activator =
> DefaultActionDescriptorCollectionProvider (ReflectionActivator),
> Services =
> [Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorCollectionProvider],
> Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared,
> Ownership = OwnedByLifetimeScope ---> An exception was thrown while
> invoking the constructor 'Void
> .ctor(System.Collections.Generic.IEnumerable`1[Microsoft.AspNetCore.Mvc.Abstractions.IActionDescriptorProvider],
> System.Collections.Generic.IEnumerable`1[Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorChangeProvider])'
> on type 'DefaultActionDescriptorCollectionProvider'. ---> The
> configured user limit (128) on the number of inotify instances has
> been reached. (See inner exception for details.) (See inner exception
> for details.) (See inner exception for details.) ---->
> Autofac.Core.DependencyResolutionException : An error occurred during
> the activation of a particular registration. See the inner exception
> for details. Registration: Activator =
> DefaultActionDescriptorCollectionProvider (ReflectionActivator),
> Services =
> [Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorCollectionProvider],
> Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared,
> Ownership = OwnedByLifetimeScope ---> An exception was thrown while
> invoking the constructor 'Void
> .ctor(System.Collections.Generic.IEnumerable`1[Microsoft.AspNetCore.Mvc.Abstractions.IActionDescriptorProvider],
> System.Collections.Generic.IEnumerable`1[Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorChangeProvider])'
> on type 'DefaultActionDescriptorCollectionProvider'. ---> The
> configured user limit (128) on the number of inotify instances has
> been reached. (See inner exception for details.) (See inner exception
> for details.) ----> Autofac.Core.DependencyResolutionException : An
> exception was thrown while invoking the constructor 'Void
> .ctor(System.Collections.Generic.IEnumerable`1[Microsoft.AspNetCore.Mvc.Abstractions.IActionDescriptorProvider],
> System.Collections.Generic.IEnumerable`1[Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorChangeProvider])'
> on type 'DefaultActionDescriptorCollectionProvider'. ---> The
> configured user limit (128) on the number of inotify instances has
> been reached. (See inner exception for details.) ---->
> System.IO.IOException : The configured user limit (128) on the number
> of inotify instances has been reached.
Я посмотрел похожий пост
Ошибка при чтении файла JSON вЯдро dotnet "достигнут сконфигурированный лимит пользователя (128) на количество экземпляров inotify"
, но я не использую файл JSON в моем методе запуска.Просто интересно, что происходит не так.