2

When I try & start one of my services I get this error: There is no index named: RavenTimeoutPersistence/TimeoutDataSortedByTime

Stacktrace:

Unhandled Exception: Magnum.StateMachine.StateMachineException: Exception occurred in Topshelf.Internal.ServiceControlle r1[[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](Func2 operation, String operationUrl, Boolean avoidThrowing, T& result)
at Raven.Client.Connection.ServerClient.ExecuteWithReplication[T](String method, Func2 operation) at Raven.Client.Connection.ServerClient.Query(String index, IndexQuery query, String[] includes) at Raven.Client.Document.AbstractDocumentQuery2.ExecuteActualQuery()
at Raven.Client.Document.AbstractDocumentQuery2.get_QueryResult()
at Raven.Client.Linq.RavenQueryProviderProcessor
1.ExecuteQueryTProjection at Raven.Client.Linq.RavenQueryProviderProcessor1.Execute(Expression expression) at Raven.Client.Linq.RavenQueryProvider1.Execute(Expression expression) at Raven.Client.Linq.RavenQueryProvider1.System.Linq.IQueryProvider.Execute(Expression expression) at Raven.Client.Linq.RavenQueryInspector1.GetEnumerator() at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at NServiceBus.Timeout.Hosting.Windows.Persistence.RavenTimeoutPersistence.GetAll() at NServiceBus.Timeout.Core.TimeoutRunner.CacheExistingTimeouts()
at NServiceBus.Timeout.Core.TimeoutRunner.Run() at System.Collections.Generic.List1.ForEach(Action1 action) at NServiceBus.Unicast.UnicastBus.NServiceBus.IStartableBus.Start(Action startupAction) at NServiceBus.Hosting.GenericHost.Start() in c:\TeamCity\buildAgent\work\nsb.master_6\src\hosting\NServiceBus.Hostin g\GenericHost.cs:line 34

Configuration of the host is:

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();

I have other services on this machine that are running without error. I've tried restarting the ravendb service.

Running Nservicebus 3.2.5

Glenn Slaven
  • 33,720
  • 26
  • 113
  • 165

1 Answers1

2

You are missing an index: RavenTimeoutPersistence/TimeoutDataSortedByTime

You need to create it, or NSB needs to create it, I am not sure where this index came from.

Ayende Rahien
  • 22,925
  • 1
  • 36
  • 41
  • It came from NserviceBus, the timeout persister created it. I had a look in raven & the index was there. – Glenn Slaven Jul 17 '12 at 22:58
  • So I deleted it & recreated it & it started working. Looks like the index got corrupted somehow – Glenn Slaven Jul 17 '12 at 22:58
  • Yes, nsb should autocreate the index, curious on how it got corrupted? Was it a timing issue? Did you try to restart the endpoint more than once? – Andreas Öhlund Jul 18 '12 at 11:39
  • I tried restarting and reinstalling the service. I restarted the raven service & got so frustrated I even restarted the box! Nothing worked, I had to go through & recreate the same index for 5 of the 7 service endpoints we have running. – Glenn Slaven Jul 19 '12 at 01:57
  • The only thing that happened before it was the box hit 100% RAM usage, it was being over utilised. The ravendb service stopped and after I restarted it was when the errors started. I assume that was the cause – Glenn Slaven Jul 19 '12 at 02:00
  • 1
    @AndreasÖhlund - I have no experience with RavenDB and I am getting this error. (I assumed that NServiceBus encapuslated RavenDB away from me) An explanation of how to recreate it would be nice. – Vaccano Sep 19 '13 at 14:53
  • I posted a question requesting a walkthrough of this process here: http://stackoverflow.com/q/18898283/16241 If you are feeling kind, please consider answering it :) – Vaccano Sep 19 '13 at 15:03