RavenDB Index Error With NServiceBus

2019-08-14 01:52发布

问题:

I am running NServiceBus 3.3 and I am getting this error:

Polling of timeouts failed.
There is no index named: RavenTimeoutPersistence/TimoutDataSortedByType

I run this worker as my Distributor. Like this:

NServiceBus.Host.exe 
    /install NServiceBus.Distributor NServiceBus.Production    
    /serviceName:BusDistributorService 
    /displayName:"Bus Distributor Service"

This answer indicates that I need to delete and recreate the index.

But I don't know anything about RavenDB besides the fact that NServiceBus uses it and it has never caused me issues before. I am hesitant to play around with my prod system when I have no experience doing this.

Can anyone give me a walk through on how to drop and recreate this index?

As a side note, does anyone know if this kind of error means that I lost messages?

回答1:

  1. Log-In to the machine that runs NServiceBus.
  2. Browse to http://localhost:8080/raven/studio.html
  3. Click on Databases in the upper right hand side.
  4. Select the database for your queue
  5. Select indexes (in the middle of the "toolbar")
  6. Click on the pencil icon next to the index you need to fix
  7. Screenshot/copy all this data out (should have Name, Maps and Fields)
  8. Click on the X in the upper right hand side (NOTE: This will delete the index.)
  9. Click on Indexes again (in the "toolbar")
  10. Select Create Index in the upper right hand side.
  11. Select Add Field from the upper right hand side.
  12. Reenter the information for the RanvenTimeoutPersistence/TimeoutDataSortedByTime.
  13. Select the save Icon from the upper right and side.