Raven Server Unexpected BsonType value

230 views
Skip to first unread message

Apostol Apostolov

unread,
Jun 28, 2013, 5:42:10 AM6/28/13
to rav...@googlegroups.com
Hello!

We were running 2 raven servers in replication in AllowReadsFromSecondariesAndWritesToSecondaries. Yestarday one of the servers began throwing the error below. Now when I try to open one of the documents in the server or try to open a "collection" in the management studio - the 
same exception occurs.

I noticed that the database that produces the error is missing it's replication configuration. the build of the server is #2261.

Any suggestions how to resolve the issue?


Server Error:
-----------------------------------------
/docs/Orders-2061817-2?noCache=1583532639
System.ArgumentOutOfRangeException: Unexpected BsonType value: -19
Parameter name: type
   at Raven.Imports.Newtonsoft.Json.Bson.BsonReader.ReadType(BsonType type) in c:\Builds\RavenDB-Stable\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Bson\BsonReader.cs:line 597
   at Raven.Imports.Newtonsoft.Json.Bson.BsonReader.ReadNormal() in c:\Builds\RavenDB-Stable\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Bson\BsonReader.cs:line 424
   at Raven.Imports.Newtonsoft.Json.Bson.BsonReader.ReadInternal() in c:\Builds\RavenDB-Stable\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Bson\BsonReader.cs:line 258
   at Raven.Json.Linq.RavenJObject.Load(JsonReader reader) in c:\Builds\RavenDB-Stable\Raven.Abstractions\Json\Linq\RavenJObject.cs:line 242
   at Raven.Storage.Esent.StorageActions.DocumentStorageActions.ReadDocumentData(String key, Guid existingEtag, RavenJObject metadata) in c:\Builds\RavenDB-Stable\Raven.Database\Storage\Esent\StorageActions\Documents.cs:line 177
   at Raven.Storage.Esent.StorageActions.DocumentStorageActions.<DocumentByKey>b__1(JsonDocumentMetadata metadata, Func`4 createDocument) in c:\Builds\RavenDB-Stable\Raven.Database\Storage\Esent\StorageActions\Documents.cs:line 40
   at Raven.Storage.Esent.StorageActions.DocumentStorageActions.DocumentByKeyInternal[T](String key, TransactionInformation transactionInformation, Func`3 createResult) in c:\Builds\RavenDB-Stable\Raven.Database\Storage\Esent\StorageActions\Documents.cs:line 112
   at Raven.Storage.Esent.StorageActions.DocumentStorageActions.DocumentByKey(String key, TransactionInformation transactionInformation) in c:\Builds\RavenDB-Stable\Raven.Database\Storage\Esent\StorageActions\Documents.cs:line 37
   at Raven.Database.DocumentDatabase.<>c__DisplayClass32.<Get>b__31(IStorageActionsAccessor actions) in c:\Builds\RavenDB-Stable\Raven.Database\DocumentDatabase.cs:line 629
   at Raven.Storage.Esent.TransactionalStorage.ExecuteBatch(Action`1 action) in c:\Builds\RavenDB-Stable\Raven.Database\Storage\Esent\TransactionalStorage.cs:line 558
   at Raven.Storage.Esent.TransactionalStorage.Batch(Action`1 action) in c:\Builds\RavenDB-Stable\Raven.Database\Storage\Esent\TransactionalStorage.cs:line 516
   at Raven.Database.DocumentDatabase.Get(String key, TransactionInformation transactionInformation) in c:\Builds\RavenDB-Stable\Raven.Database\DocumentDatabase.cs:line 632
   at Raven.Database.Server.Responders.Document.GetDocumentDirectly(IHttpContext context, String docId) in c:\Builds\RavenDB-Stable\Raven.Database\Server\Responders\Document.cs:line 155
   at Raven.Database.Server.Responders.Document.Respond(IHttpContext context) in c:\Builds\RavenDB-Stable\Raven.Database\Server\Responders\Document.cs:line 43
   at Raven.Database.Server.HttpServer.DispatchRequest(IHttpContext ctx) in c:\Builds\RavenDB-Stable\Raven.Database\Server\HttpServer.cs:line 856
   at Raven.Database.Server.HttpServer.HandleActualRequest(IHttpContext ctx) in c:\Builds\RavenDB-Stable\Raven.Database\Server\HttpServer.cs:line 601
-----------------------------------------




   at Raven.Studio.Infrastructure.InvocationExtensions.Catch(Task parent, Func`2 func)
   at Raven.Studio.Models.EditableDocumentModel.LoadModelParameters(String parameters)
   at Raven.Studio.Infrastructure.PageViewModel.LoadModel(String state)
   at Raven.Studio.Infrastructure.PageView.OnNavigatedTo(NavigationEventArgs e)
   at System.Windows.Navigation.NavigationService.RaiseNavigated(Object content, Uri uri, Page existingContentPage, Page newContentPage)
   at System.Windows.Navigation.NavigationService.CompleteNavigation(DependencyObject content)
   at System.Windows.Navigation.NavigationService.ContentLoader_BeginLoad_Callback(IAsyncResult result)
   at System.Windows.Navigation.PageResourceContentLoader.BeginLoad_OnUIThread(AsyncCallback userCallback, PageResourceContentLoaderAsyncResult result)
   at System.Windows.Navigation.PageResourceContentLoader.<>c__DisplayClass4.<BeginLoad>b__0(Object args)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.Dispatch(DispatcherPriority priority)
   at System.Windows.Threading.Dispatcher.OnInvoke(Object context)
   at System.Windows.Hosting.CallbackCookie.Invoke(Object[] args)
   at System.Windows.RuntimeHost.ManagedHost.InvokeDelegate(IntPtr pHandle, Int32 nParamCount, ScriptParam[] pParams, ScriptParam& pResult)



Client side exception:
System.Net.WebException: The remote server returned an error: NotFound.
   at System.Net.Browser.ClientHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Func`2.Invoke(T arg)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise)

Oren Eini (Ayende Rahien)

unread,
Jun 28, 2013, 5:43:52 AM6/28/13
to ravendb
Are you using compression or encryption?


--
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.
 
 

Apostol Apostolov

unread,
Jun 28, 2013, 5:48:49 AM6/28/13
to rav...@googlegroups.com
the server that throws the error is missing the "Raven/ActiveBundles" key in the configuration. 

the other one has "Raven/ActiveBundles": "PeriodicBackup;Compression;Replication", so I think the both of them should be using these 3 bundles. 

I'm not sure why the server with the error is missing this configuration

Oren Eini (Ayende Rahien)

unread,
Jun 28, 2013, 5:55:44 AM6/28/13
to ravendb
It might have been removed at some point, which isn't supported. Try adding those, and see if this resolve the problem.

Apostol Apostolov

unread,
Jun 28, 2013, 6:17:19 AM6/28/13
to rav...@googlegroups.com
I added the config and now it's ok. do you have any idea how it could have disappeared?

Oren Eini (Ayende Rahien)

unread,
Jun 28, 2013, 6:17:54 AM6/28/13
to ravendb
Something edited that db doc.
Reply all
Reply to author
Forward
0 new messages