Unable to add machines; indexing errors in RavenDB

This morning I tried to add a new machine to my Octopus portal. After entering all the information I clicked Create, the page refreshed, and the machine wasn’t there. I tried several times with varying information and the same result.

I went into the RavenDB management studio and saw that documents had been created for all the machines. In the logs I saw two error messages (below) being logged every minute, starting at the time that I first tried to add the new machine. I deleted all the documents for the machines that I added, but these errors are still getting logged.

@@@
Warn 9/9/2013 2:30:11 PM Failed to index documents for index: Auto/Tasks/ByNameAndQueueTimeSortByQueueTime System.IO.IOException: read past EOF … Raven.Database.Indexing.AbstractIndexingExecuter
@@@
@@@
Warn 9/9/2013 2:30:10 PM Failed to index documents for index: Raven/DocumentsByEntityName System.IO.IOException: read past EOF … Raven.Database.Indexing.AbstractIndexingExecuter
@@@

The full exception is the same for both errors:
@@@
System.IO.IOException: read past EOF
at Lucene.Net.Store.BufferedIndexInput.Refill() in c:\Work\lucene.net\src\core\Store\BufferedIndexInput.cs:line 179
at Lucene.Net.Store.BufferedIndexInput.ReadByte() in c:\Work\lucene.net\src\core\Store\BufferedIndexInput.cs:line 42
at Lucene.Net.Store.ChecksumIndexInput.ReadByte() in c:\Work\lucene.net\src\core\Store\CheckSumIndexInput.cs:line 42
at Lucene.Net.Store.IndexInput.ReadInt() in c:\Work\lucene.net\src\core\Store\IndexInput.cs:line 77
at Lucene.Net.Index.SegmentInfos.Read(Directory directory, String segmentFileName) in c:\Work\lucene.net\src\core\Index\SegmentInfos.cs:line 280
at Lucene.Net.Index.IndexFileDeleter…ctor(Directory directory, IndexDeletionPolicy policy, SegmentInfos segmentInfos, StreamWriter infoStream, DocumentsWriter docWriter, HashSet1 synced) in c:\Work\lucene.net\src\core\Index\IndexFileDeleter.cs:line 202 at Lucene.Net.Index.IndexWriter.Init(Directory d, Analyzer a, Boolean create, IndexDeletionPolicy deletionPolicy, Int32 maxFieldLength, IndexingChain indexingChain, IndexCommit commit) in c:\Work\lucene.net\src\core\Index\IndexWriter.cs:line 1305 at Lucene.Net.Index.IndexWriter.Init(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, Int32 maxFieldLength, IndexingChain indexingChain, IndexCommit commit) in c:\Work\lucene.net\src\core\Index\IndexWriter.cs:line 1203 at Lucene.Net.Index.IndexWriter..ctor(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, MaxFieldLength mfl) in c:\Work\lucene.net\src\core\Index\IndexWriter.cs:line 5441 at Raven.Database.Indexing.Index.CreateIndexWriter() in c:\Builds\RavenDB-Stable\Raven.Database\Indexing\Index.cs:line 409 at Raven.Database.Indexing.Index.Write(Func4 action) in c:\Builds\RavenDB-Stable\Raven.Database\Indexing\Index.cs:line 333
at Raven.Database.Indexing.SimpleIndex.IndexDocuments(AbstractViewGenerator viewGenerator, IndexingBatch batch, IStorageActionsAccessor actions, DateTime minimumTimestamp) in c:\Builds\RavenDB-Stable\Raven.Database\Indexing\SimpleIndex.cs:line 167
at Raven.Database.Indexing.IndexStorage.Index(String index, AbstractViewGenerator viewGenerator, IndexingBatch batch, WorkContext context, IStorageActionsAccessor actions, DateTime minimumTimestamp) in c:\Builds\RavenDB-Stable\Raven.Database\Indexing\IndexStorage.cs:line 492
at Raven.Database.Indexing.IndexingExecuter.IndexDocuments(IStorageActionsAccessor actions, String index, IndexingBatch batch) in c:\Builds\RavenDB-Stable\Raven.Database\Indexing\IndexingExecuter.cs:line 412
@@@

I was able to (apparently) resolve this by deleting both indexes. Afterwards I was able to add the machine through the portal. I expected the Raven/DocumentsByEntityName index to be recreated automatically but it was not, so I recreated it manually. The auto index has not yet been recreated.

I’d really like to know what caused this and how to avoid it in the future. Thanks!