Specified value has invalid HTTP Header characters

217 views
Skip to first unread message

Brian Lowry

unread,
Oct 1, 2014, 3:12:24 PM10/1/14
to rav...@googlegroups.com
We're running the exact same code base on 3 different websites. This problem is only effecting one of them and I can't replicate the problem locally using the live data. Any experience with this or advice on how to troubleshoot it? We're using build 2910. 

[ArgumentException: Specified value has invalid HTTP Header characters.
Parameter name: name]
   System.Net.WebHeaderCollection.CheckBadChars(String name, Boolean isHeaderValue) +1082
   System.Net.WebHeaderCollection.IsRestricted(String headerName, Boolean response) +48
   Raven.Client.Connection.HttpJsonRequest.WriteMetadata(RavenJObject metadata) +374

[InvalidOperationException: Could not figure out how to treat header: @id]
   Raven.Client.Connection.HttpJsonRequest.WriteMetadata(RavenJObject metadata) +871
   Raven.Client.Connection.HttpJsonRequest..ctor(CreateHttpJsonRequestParams requestParams, HttpJsonRequestFactory factory) +750
   Raven.Client.Connection.HttpJsonRequestFactory.CreateHttpJsonRequest(CreateHttpJsonRequestParams createHttpJsonRequestParams) +98
   Raven.Client.Connection.ServerClient.DirectPut(RavenJObject metadata, String key, Etag etag, RavenJObject document, OperationMetadata operationMetadata) +459
   Raven.Client.Connection.<>c__DisplayClass13.<Put>b__12(OperationMetadata u) +45
   Raven.Client.Connection.ReplicationInformer.TryOperation(Func`2 operation, OperationMetadata operationMetadata, OperationMetadata primaryOperationMetadata, Boolean avoidThrowing, T& result, Boolean& wasTimeout) +852
   Raven.Client.Connection.ReplicationInformer.ExecuteWithReplication(String method, String primaryUrl, OperationCredentials primaryCredentials, Int32 currentRequest, Int32 currentReadStripingBase, Func`2 operation) +643
   Raven.Client.Connection.ServerClient.ExecuteWithReplication(String method, Func`2 operation) +158
   Raven.Client.Connection.ServerClient.TryResolveConflictOrCreateConcurrencyException(String key, RavenJObject conflictsDoc, Etag etag) +619
   Raven.Client.Connection.ServerClient.AssertNonConflictedDocumentAndCheckIfNeedToReload(RavenJObject docResult, Func`2 onConflictedQueryResult) +425
   Raven.Client.Connection.<>c__DisplayClass94`1.<RetryOperationBecauseOfConflict>b__93(Boolean current, RavenJObject docResult) +30
   System.Linq.Enumerable.Aggregate(IEnumerable`1 source, TAccumulate seed, Func`3 func) +162
   Raven.Client.Connection.ServerClient.RetryOperationBecauseOfConflict(IEnumerable`1 docResults, T currentResult, Func`1 nextTry, Func`2 onConflictedQueryResult) +163
   Raven.Client.Connection.ServerClient.DirectQuery(String index, IndexQuery query, OperationMetadata operationMetadata, String[] includes, Boolean metadataOnly, Boolean includeEntries) +1260
   Raven.Client.Connection.<>c__DisplayClass62.<Query>b__61(OperationMetadata u) +56
   Raven.Client.Connection.ReplicationInformer.TryOperation(Func`2 operation, OperationMetadata operationMetadata, OperationMetadata primaryOperationMetadata, Boolean avoidThrowing, T& result, Boolean& wasTimeout) +852
   Raven.Client.Connection.ReplicationInformer.ExecuteWithReplication(String method, String primaryUrl, OperationCredentials primaryCredentials, Int32 currentRequest, Int32 currentReadStripingBase, Func`2 operation) +643
   Raven.Client.Connection.ServerClient.ExecuteWithReplication(String method, Func`2 operation) +158
   Raven.Client.Document.AbstractDocumentQuery`2.ExecuteActualQuery() +298
   Raven.Client.Document.AbstractDocumentQuery`2.get_QueryResult() +21
   Raven.Client.Linq.RavenQueryProviderProcessor`1.ExecuteQuery() +512
   Raven.Client.Linq.RavenQueryInspector`1.GetEnumerator() +38
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +446
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +76
   UgSys.Admin.Web.Controllers.ContactsController.Index(Int32 page, Int32 pageSize, String term, String leadSource) in c:\TeamCity\buildAgent\work\6f56e06bc09ff990\Src\UgSys.Admin.Web\Controllers\ContactsController.cs:66
   lambda_method(Closure , ControllerBase , Object[] ) +266
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +217
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +39
   System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +12
   System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +139
   System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +112
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +452
   System.Web.Mvc.Async.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult) +15
   System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +32
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +231
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +111
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +19
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +51
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +111
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1271
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +2427
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +299

Oren Eini (Ayende Rahien)

unread,
Oct 2, 2014, 6:20:04 AM10/2/14
to ravendb
How did you get into this situation? Are you sending requests to RavenD directly?

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" 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/d/optout.

Brian Lowry

unread,
Oct 2, 2014, 5:35:04 PM10/2/14
to rav...@googlegroups.com
No we don't send to raven directly, this was all through the .net client api. 

We resolved this but have no idea why it was happening or what the problem was. 

We have master master replication setup. Our secondary had 2200+ conflicts on it. 

Our primary was what we trusted, and it seemed clean, so we killed our secondary wiped it and started over from scratch with replication.

Oren Eini (Ayende Rahien)

unread,
Oct 2, 2014, 11:40:08 PM10/2/14
to ravendb
I'm not sure how you could have gotten to such a state, the code explicitly removes such properties.

Reply all
Reply to author
Forward
0 new messages