Encryption Errors with Latest 2.0 Stable version (2360)

55 views
Skip to first unread message

Khalid Abuhakmeh

unread,
May 22, 2013, 8:53:25 AM5/22/13
to rav...@googlegroups.com
Hello,

I am running the latest version of RavenDB 2360 in IIS on a Windows Server 2012 box. 

The database has replication and encryption enabled. I took a dump from an existing database and imported it into this new database and I am getting the errors below.

To recreate:

1. Create new database with Encryption and Replication
2. Choose Desc (or other encryption, I tried with multiple)
3. Run smuggler and import the data

I created a database without encryption and it runs fine.


With 50 Errors (the encryption enabled DB) :


Without Encryption you have no errors:



Raven/DocumentsByEntityName System.AggregateException: One or more errors occurred. ---> System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length)
   at Raven.Bundles.Encryption.Streams.SeekableCryptoStream.Write(Byte[] buffer, Int32 bufferOffset, Int32 count) in c:\Builds\RavenDB-Stable\Raven.Database\Bundles\Encryption\Streams\SeekableCryptoStream.cs:line 160
   at Raven.Database.Indexing.LuceneCodecDirectory.CodecIndexOutput.FlushBuffer(Byte[] b, Int32 offset, Int32 len) in c:\Builds\RavenDB-Stable\Raven.Database\Indexing\LuceneCodecDirectory.cs:line 183
   at Lucene.Net.Store.BufferedIndexOutput.Flush() in c:\Work\lucene.net\src\core\Store\BufferedIndexOutput.cs:line 103
   at Lucene.Net.Store.BufferedIndexOutput.WriteBytes(Byte[] b, Int32 offset, Int32 length) in c:\Work\lucene.net\src\core\Store\BufferedIndexOutput.cs:line 92
   at Lucene.Net.Store.RAMOutputStream.WriteTo(IndexOutput out_Renamed) in c:\Work\lucene.net\src\core\Store\RAMOutputStream.cs:line 73
   at Lucene.Net.Index.StoredFieldsWriter.FinishDocument(PerDoc perDoc) in c:\Work\lucene.net\src\core\Index\StoredFieldsWriter.cs:line 192
   at Lucene.Net.Index.DocumentsWriter.WaitQueue.WriteDocument(DocWriter doc) in c:\Work\lucene.net\src\core\Index\DocumentsWriter.cs:line 1980
   at Lucene.Net.Index.DocumentsWriter.WaitQueue.Add(DocWriter doc) in c:\Work\lucene.net\src\core\Index\DocumentsWriter.cs:line 2004
   at Lucene.Net.Index.DocumentsWriter.FinishDocument(DocumentsWriterThreadState perThread, DocWriter docWriter) in c:\Work\lucene.net\src\core\Index\DocumentsWriter.cs:line 1458
   at Lucene.Net.Index.DocumentsWriter.UpdateDocument(Document doc, Analyzer analyzer, Term delTerm) in c:\Work\lucene.net\src\core\Index\DocumentsWriter.cs:line 1039
   at Lucene.Net.Index.IndexWriter.AddDocument(Document doc, Analyzer analyzer) in c:\Work\lucene.net\src\core\Index\IndexWriter.cs:line 2331
   at Raven.Database.Indexing.Index.AddDocumentToIndex(IndexWriter currentIndexWriter, Document luceneDoc, Analyzer analyzer) in c:\Builds\RavenDB-Stable\Raven.Database\Indexing\Index.cs:line 617
   at Raven.Database.Indexing.SimpleIndex.<>c__DisplayClass18.<>c__DisplayClass21.<IndexDocuments>b__11(IEnumerator`1 partition) in c:\Builds\RavenDB-Stable\Raven.Database\Indexing\SimpleIndex.cs:line 126
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Raven.Database.Indexing.DefaultBackgroundTaskExecuter.ExecuteAllInterleaved[T](WorkContext context, IList`1 result, Action`1 action) in c:\Builds\RavenDB-Stable\Raven.Database\Indexing\DefaultBackgroundTaskExecuter.cs:line 182
   at Raven.Database.Indexing.DefaultBackgroundTaskExecuter.ExecuteAllBuffered[T](WorkContext context, IList`1 source, Action`1 action) in c:\Builds\RavenDB-Stable\Raven.Database\Indexing\DefaultBackgroundTaskExecuter.cs:line 108
   at Raven.Database.Indexing.SimpleIndex.<>c__DisplayClass18.<IndexDocuments>b__a(IndexWriter indexWriter, Analyzer analyzer, IndexingWorkStats stats) in c:\Builds\RavenDB-Stable\Raven.Database\Indexing\SimpleIndex.cs:line 165
   at Raven.Database.Indexing.Index.Write(Func`4 action) in c:\Builds\RavenDB-Stable\Raven.Database\Indexing\Index.cs:line 343
---> (Inner Exception #0) System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length)
   at Raven.Bundles.Encryption.Streams.SeekableCryptoStream.Write(Byte[] buffer, Int32 bufferOffset, Int32 count) in c:\Builds\RavenDB-Stable\Raven.Database\Bundles\Encryption\Streams\SeekableCryptoStream.cs:line 160
   at Raven.Database.Indexing.LuceneCodecDirectory.CodecIndexOutput.FlushBuffer(Byte[] b, Int32 offset, Int32 len) in c:\Builds\RavenDB-Stable\Raven.Database\Indexing\LuceneCodecDirectory.cs:line 183
   at Lucene.Net.Store.BufferedIndexOutput.Flush() in c:\Work\lucene.net\src\core\Store\BufferedIndexOutput.cs:line 103
   at Lucene.Net.Store.BufferedIndexOutput.WriteBytes(Byte[] b, Int32 offset, Int32 length) in c:\Work\lucene.net\src\core\Store\BufferedIndexOutput.cs:line 92
   at Lucene.Net.Store.RAMOutputStream.WriteTo(IndexOutput out_Renamed) in c:\Work\lucene.net\src\core\Store\RAMOutputStream.cs:line 73
   at Lucene.Net.Index.StoredFieldsWriter.FinishDocument(PerDoc perDoc) in c:\Work\lucene.net\src\core\Index\StoredFieldsWriter.cs:line 192
   at Lucene.Net.Index.DocumentsWriter.WaitQueue.WriteDocument(DocWriter doc) in c:\Work\lucene.net\src\core\Index\DocumentsWriter.cs:line 1980
   at Lucene.Net.Index.DocumentsWriter.WaitQueue.Add(DocWriter doc) in c:\Work\lucene.net\src\core\Index\DocumentsWriter.cs:line 2004
   at Lucene.Net.Index.DocumentsWriter.FinishDocument(DocumentsWriterThreadState perThread, DocWriter docWriter) in c:\Work\lucene.net\src\core\Index\DocumentsWriter.cs:line 1458
   at Lucene.Net.Index.DocumentsWriter.UpdateDocument(Document doc, Analyzer analyzer, Term delTerm) in c:\Work\lucene.net\src\core\Index\DocumentsWriter.cs:line 1039
   at Lucene.Net.Index.IndexWriter.AddDocument(Document doc, Analyzer analyzer) in c:\Work\lucene.net\src\core\Index\IndexWriter.cs:line 2331
   at Raven.Database.Indexing.Index.AddDocumentToIndex(IndexWriter currentIndexWriter, Document luceneDoc, Analyzer analyzer) in c:\Builds\RavenDB-Stable\Raven.Database\Indexing\Index.cs:line 617
   at Raven.Database.Indexing.SimpleIndex.<>c__DisplayClass18.<>c__DisplayClass21.<IndexDocuments>b__11(IEnumerator`1 partition) in c:\Builds\RavenDB-Stable\Raven.Database\Indexing\SimpleIndex.cs:line 126
   at System.Threading.Tasks.Task.Execute()<---
5/22/2013 12:39:25 PM

Khalid Abuhakmeh

unread,
May 22, 2013, 3:56:10 PM5/22/13
to rav...@googlegroups.com
Anybody get a chance to look at this issue yet?

Oren Eini (Ayende Rahien)

unread,
May 23, 2013, 2:46:01 AM5/23/13
to ravendb
Can you try this with 2.5 ?


--
You received this message because you are subscribed to the Google Groups "ravendb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Oren Eini (Ayende Rahien)

unread,
May 23, 2013, 2:46:12 AM5/23/13
to ravendb
I am pretty sure that we already fixed that.

Khalid Abuhakmeh

unread,
May 23, 2013, 3:51:35 PM5/23/13
to rav...@googlegroups.com
Hello Oren,

I am trying to upgrade a production environment to the latest stabl(ish) build in Version 2.0. I can try it with 2.5, but any chance this fix could be pushed into Version 2.0?

Khalid Abuhakmeh

unread,
May 23, 2013, 4:07:52 PM5/23/13
to rav...@googlegroups.com
So I tried version 2.5 just for the heck of it, but i think the same thing is happening there too, but a bug in the UI management is keeping me from seeing what those errors actually are.

- Encryption enabled
- Replication enabled

Khalid Abuhakmeh

unread,
May 23, 2013, 5:29:19 PM5/23/13
to rav...@googlegroups.com
Another update. I deleted all the indexes, updated my client to match the 2.5 version and ran my app to propagate the indexes. That time the indexes built fine with no errors. There has always been something wonky with the index import (everytime I have used it).

So as I follow up question, should I use version 2.5 in production? Or Should I hold off?

Oren Eini (Ayende Rahien)

unread,
May 24, 2013, 1:26:06 AM5/24/13
to ravendb
If you can run it there, please do so.
We are going to release a stable 2.5 soon.

(Note: I am being selfish and have you be my guinea pig).
Reply all
Reply to author
Forward
0 new messages