I'm having a problem creating indexes on RavenDB 3.5
When you create more than 3 indexes, the application simply dies, getting
Unable to connect to the remote server. Status Code: ConnectFailure
The index creation code is straightforward:
private static void CreateIndexes(IDocumentStore documentStore) { new PurchaseOrder_QueryByExternalReference().Execute(documentStore); new SupplierDocument_QueryBySupplierName().Execute(documentStore); new ProductDocument_QueryByProductIdAndName().Execute(documentStore); new PurchaseOrderLine_QueryableIndex().Execute(documentStore); new PurchaseOrderLine_ForPurchaseOrderIndex().Execute(documentStore); }
But the same thing happens if
IndexCreation.CreateIndexes (typeof (MyIndexClass). Build, save);
Method called
. This happens with any 3 indexes from the list in any order.
The full stack trace is as follows:
exception {"The task was canceled."} Data: {System.Collections.ListDictionaryInternal} Etag: null HResult: -2146233088 HelpLink: null InnerException: null Message: "The task was canceled." Answer: {StatusCode: 503, ReasonPhrase: "Service unavailable", Version: 1.1, Contents :, Headers: {}} ResponseString: "Unable to connect to the remote server Status code: ConnectFailure" Source: "Raven.Client.Lightweight" StackTrace : "in Raven.Client.Connection.Implementation.HttpJsonRequest. <> c__DisplayClass36_0. <b__0> d.MoveNext () in C: \ Builds \ RavenDB-Stable-3.5 \ Raven.Client.Lightweight \ Connection \ Implementation \ HttpJsonRequest.cs : line 258 --- The end of the stack trace from the previous place where the exception was thrown --- in System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (task task) in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification R (Task task) .Client.Connection.Implementation. HttpJsonRequest.d__38 1.MoveNext() in C:\\Builds\\RavenDB-Stable-3.5\\Raven.Client.Lightweight\\Connection\\Implementation\\HttpJsonRequest.cs:line 312 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Raven.Client.Connection.Implementation.HttpJsonRequest.<ReadResponseJsonAsync>d__35.MoveNext() in C:\\Builds\\RavenDB-Stable-3.5\\Raven.Client.Lightweight\\Connection\\Implementation\\HttpJsonRequest.cs:line 221 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Raven.Client.Connection.Async.AsyncServerClient.<>c__DisplayClass69_0.<<GetIndexAsync>b__0>d.MoveNext() in C:\\Builds\\RavenDB-Stable-3.5\\Raven.Client.Lightweight\\Connection\\Async\\AsyncServerClient.cs:line 726 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Raven.Client.Connection.ReplicationInformerBase 1.MoveNext() in C:\\Builds\\RavenDB-Stable-3.5\\Raven.Client.Lightweight\\Connection\\Implementation\\HttpJsonRequest.cs:line 312 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Raven.Client.Connection.Implementation.HttpJsonRequest.<ReadResponseJsonAsync>d__35.MoveNext() in C:\\Builds\\RavenDB-Stable-3.5\\Raven.Client.Lightweight\\Connection\\Implementation\\HttpJsonRequest.cs:line 221 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Raven.Client.Connection.Async.AsyncServerClient.<>c__DisplayClass69_0.<<GetIndexAsync>b__0>d.MoveNext() in C:\\Builds\\RavenDB-Stable-3.5\\Raven.Client.Lightweight\\Connection\\Async\\AsyncServerClient.cs:line 726 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Raven.Client.Connection.ReplicationInformerBase 1.d__34 1.MoveNext() in C:\\Builds\\RavenDB-Stable-3.5\\Raven.Client.Lightweight\\Connection\\ReplicationInformerBase.cs:line 417 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Raven.Client.Connection.ReplicationInformerBase 1.d__33 1.MoveNext() in C:\\Builds\\RavenDB-Stable-3.5\\Raven.Client.Lightweight\\Connection\\ReplicationInformerBase.cs:line 316 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Raven.Client.Connection.Async.AsyncServerClient.<ExecuteWithReplication>d__164 1.MoveNext() in C:\\Builds\\RavenDB-Stable-3.5\\Raven.Client.Lightweight\\Connection\\ReplicationInformerBase.cs:line 316 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Raven.Client.Connection.Async.AsyncServerClient.<ExecuteWithReplication>d__164 1.MoveNext () in C: \ Builds \ RavenDB-Stable-3.5 \ Raven.Client.Lightweight \ Connection \ Async \ AsyncServerClient.cs: line 0 - - The end of the stack trace from the previous place where the exception was thrown --- in System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (task task) in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (Task task) in Raven.til.tours.tours.Utaven.Utilities.Utrances.Utaven.Utilities.Utilities.Utcies.Utilities.Utilities.Utilities.Utilities .AsyncHelpers. <> c__DisplayClass1_1 1.<<RunSync>b__0>d.MoveNext() in C:\\Builds\\RavenDB-Stable-3.5\\Raven.Abstractions\\Util\\AsyncHelpers.cs:line 75 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Raven.Abstractions.Util.AsyncHelpers.RunSync[T](Func 1 task) in C: \ Builds \ RavenDB- Stable-3.5 \ Raven.Abstractions \ Util \ AsyncHelpers.cs: line 89 in Raven.Client.Connection.ServerClient.GetIndex (line name) in C: \ Builds \ RavenDB-Stable-3.5 \ Raven.Client.Lightweight \ Connection \ ServerClient.cs: line 222 \ in Raven.Client.Indexes.AbstractIndexCreationTask.Execute (IDatabaseCommands databaseCommands, DocumentConvention documentConvention) in C: \ Builds \ RavenDB-Stable-3.5 \ Raven.Client.Lightweight \ Indexes \ AbstractIndexCreationTaskTask in Raven.Client.DocumentStoreBase.ExecuteIndex (AbstractIndexCreationTask indexCreationTask) in C: \ Builds \ RavenDB-Stable-3.5 \ Raven .Client.Lightweight \ DocumentStoreBase.cs: line 102 in Raven.Client.Indexes.AbstractIndexCreationTask.Execute (IDocumentStore repository) in C: \ Builds \ RavenDB-Stable-3.5 \ Raven.Client.Lightweight \ Indexes \ AbstractIndexCreationTask.cs: 221 in Persistence.Database.Adapter.RavenDb.RavenDbDocumentStoreFactory.CreateIndexes (IDocumentStore documentStore) in \ my \ route \ Persistence.Database.Adapter \ RavenDb \ RavenDbDocumentStoreFactory.cs: line 50 in Persistence.Database.AdapterRoreDocumentForeDocumentForeDocumentForebocument DocumentocumentStore documentStore) in \ my \ route \ Persistence.Database.Adapter \ RavenDb \ RavenDbDocumentStoreFactory.cs: line 38 in Persistence.Database.Adapter.RavenDb.RavenDbDocumentStoreFactory.Create (String ravenDbLocation, String ravenDbDatabase Pers. In my. Database.Adapter \ RavenDb \ RavenDbDocumentStoreFactory.cs: line 22 in Persistence.Database.Adapter.PersistenceAdapter. <.ctor> b__8_0 () in \ my \ route \ Persistence.Database.Adapter \ PersistenceAdapter.cs: line 53 in Persistence.Database.Adapter.PersistenceAdapter.RegisterRavenDbUtilities () in \ my \ route \ Persistence.Database.Adapter \ PersistenceAdapter .cs: ββline 175 in Persistence.Database.Adapter.PersistenceAdapter.RegisterRavenLogic () in \ my \ route \ Persistence.Database.Adapter \ PersistenceAdapter.cs: line 86 in Persistence.Database.Adapter.PersistenceAdapter.Initialize () in \ my \ route \ Persistence.Database.Adapter \ PersistenceAdapter.cs: line 74 in My-Program.ConfigurePersistentAdapter (Settings) in \ my \ route \ MessageQueueListener \ MessageQueueListenerService.cs: line 153 in My-Program.AddBootstrapperExtension () in \ my \ route \ net-stock-purchase-service.MessageQueueListener \ MessageQueueListenerService.cs: line 118 in My-Program.Startup () in \ my \ route \ net-stock-purchase-service.MessageQueueListener \ MessageQueueListenerService.cs: string 78 "StatusCode: ServiceUnavailable TargetSite: {Void MoveNext ()}
source share