开始时NserviceBus.host错误RavenTimeoutPersistence(Raven

2019-09-19 15:22发布

当我尝试和开始我的服务之一,我得到这个错误: There is no index named: RavenTimeoutPersistence/TimeoutDataSortedByTime

堆栈跟踪:

未处理的异常:Magnum.StateMachine.StateMachineException:异常发生在Topshelf.Internal.ServiceControlle - [R 1[[NServiceBus.Hosting.Windows.WindowsHost, NServiceBus.Host, Version=3.2.0.0, Culture=neutral, PublicKeyToken=9fc3864 79f8a226c]] during state Initial while handling OnStart ---> System.Exception: Exception when starting endpoint, error h as been logged. Reason: There is no index named: RavenTimeoutPersistence/TimeoutDataSortedByTime ---> System.InvalidOper ationException: There is no index named: RavenTimeoutPersistence/TimeoutDataSortedByTime at Raven.Client.Connection.ServerClient.DirectQuery(String index, IndexQuery query, String operationUrl, String[] inc ludes) at Raven.Client.Connection.ServerClient.<>c__DisplayClass37.<Query>b__36(String u) at Raven.Client.Connection.ServerClient.TryOperation[T](Func 1[[NServiceBus.Hosting.Windows.WindowsHost, NServiceBus.Host, Version=3.2.0.0, Culture=neutral, PublicKeyToken=9fc3864 79f8a226c]] during state Initial while handling OnStart ---> System.Exception: Exception when starting endpoint, error h as been logged. Reason: There is no index named: RavenTimeoutPersistence/TimeoutDataSortedByTime ---> System.InvalidOper ationException: There is no index named: RavenTimeoutPersistence/TimeoutDataSortedByTime at Raven.Client.Connection.ServerClient.DirectQuery(String index, IndexQuery query, String operationUrl, String[] inc ludes) at Raven.Client.Connection.ServerClient.<>c__DisplayClass37.<Query>b__36(String u) at Raven.Client.Connection.ServerClient.TryOperation[T](Func 2操作,字符串operationUrl,布尔avoidThrowing, T&结果)
在Raven.Client.Connection.ServerClient.ExecuteWithReplication [T](字符串方法,函数功能2 operation) at Raven.Client.Connection.ServerClient.Query(String index, IndexQuery query, String[] includes) at Raven.Client.Document.AbstractDocumentQuery 2.ExecuteActualQuery()
在Raven.Client.Document.AbstractDocumentQuery 2.get_QueryResult()
at Raven.Client.Linq.RavenQueryProviderProcessor
2.get_QueryResult()
at Raven.Client.Linq.RavenQueryProviderProcessor
2.get_QueryResult()
at Raven.Client.Linq.RavenQueryProviderProcessor
1.ExecuteQueryTProjection在Raven.Client.Linq.RavenQueryProviderProcessor 1.Execute(Expression expression) at Raven.Client.Linq.RavenQueryProvider 1.Execute(表达式表达)在Raven.Client.Linq.RavenQueryProvider 1.System.Linq.IQueryProvider.Execute(Expression expression) at Raven.Client.Linq.RavenQueryInspector 1.GetEnumerator()在System.Collections.Generic.List 1.InsertRange(Int32 index, IEnumerable 1个集合)在NServiceBus.Timeout.Hosting .Windows.Persistence.RavenTimeoutPersistence.GetAll()在NServiceBus.Timeout.Core.TimeoutRunner.CacheExistingTimeouts()
在NServiceBus.Timeout.Core.TimeoutRunner.Run()在System.Collections.Generic.List 1.ForEach(Action 1个动作)在NServiceBus.Unicast.UnicastBus.NServiceBus.IStartableBus.Start(动作startupAction)在NServiceBus.Hosting.GenericHost 。开始(c)中:\ TeamCity的\ buildAgent \工作\ nsb.master_6 \ SRC \托管\ NServiceBus.Hostin克\ GenericHost.cs:线34

主机的配置是:

var container = new WindsorContainer();
container.Install(FromAssembly.This());

Configure.With()
    .DefiningEventsAs(t => t.Namespace != null && t.Namespace.StartsWith("Events"))
    .DefiningCommandsAs(t => t.Namespace != null && t.Namespace.StartsWith("Messages"))
    .CastleWindsorBuilder(container)
    .XmlSerializer()
    .MsmqTransport()
    .IsTransactional(true)
    .IsolationLevel(IsolationLevel.ReadUncommitted) 
    .UnicastBus()
    .RavenSagaPersister()
    .RavenSubscriptionStorage()
    .UseRavenTimeoutPersister()
    .RunTimeoutManager()
    .ForInstallationOn<NServiceBus.Installation.Environments.Windows>().Install();

我有这台机器说,是没有错误上运行的其他服务。 我试着重新启动ravendb服务。

运行Nservicebus 3.2.5

Answer 1:

这是因为丢失索引:RavenTimeoutPersistence / TimeoutDataSortedByTime

您需要创建它,或者NSB需要来创建它,我不知道在哪里这个指数是从哪里来的。



文章来源: RavenTimeoutPersistence error when starting NserviceBus.host