我正在尝试将数据从 SQL 数据库导入到 Cosmos Db,但由于服务当前不可用,它会引发错误。我不知道为什么它会显示此错误。Azure Cosmos DB 模拟器也已开启。错误如下
$ Microsoft.Azure.Documents.ServiceUnavailableException:服务当前不可用。ActivityId:9b40c18a-28ed-4945-b356-abaac18a1139 ---> Microsoft.Azure.Documents.GoneException:请求的资源在服务器上不再可用。ActivityId: 9b40c18a-28ed-4945-b356-abaac18a1139 在 Microsoft.Azure.Documents.StoreReader.d__5.MoveNext() --- 堆栈跟踪从先前抛出异常的位置结束---在 System.Runtime.ExceptionServices.ExceptionDispatchInfo .Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Documents.QuorumReader.d__26.MoveNext() --- 从先前抛出异常的位置结束堆栈跟踪---在System.Runtime.CompilerServices 处的 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()。1.<>c__DisplayClassd
1.<b__c>d__f.MoveNext() --- 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)在 Microsoft.Azure.Documents.BackoffRetryUtility 1.<ExecuteRetry>d__16.MoveNext()
--- End of inner exception stack trace ---
at Microsoft.Azure.Documents.BackoffRetryUtility
1.d__16.MoveNext() --- 从先前抛出异常的位置结束堆栈跟踪 --- 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 System. Microsoft.Azure.Documents.BackoffRetryUtility 上的 Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)1.<ExecuteAsync>d__12
1.MoveNext() --- 从先前引发异常的位置结束堆栈跟踪 --- 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 的 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 Microsoft .Azure.Documents.ReplicatedResourceClient.d__7.MoveNext() --- 在 System.Runtime.CompilerServices.TaskAwaiter 的 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 处从先前引发异常的位置结束堆栈跟踪。 Microsoft.Azure.Documents.StoreClient.d__0.MoveNext() 处的 HandleNonSuccessAndDebuggerNotification(Task task) --- 从先前引发异常的位置结束堆栈跟踪 --- 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 System .Runtime.CompilerServices.TaskAwaiter。Microsoft.Azure.Documents.Client.DocumentClient.d__2e9.MoveNext() 处的 HandleNonSuccessAndDebuggerNotification(Task task) --- 从先前引发异常的位置结束堆栈跟踪 --- 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 Microsoft.Azure.Documents.Query.DocumentQueryClient.d__a.MoveNext() --- 堆栈跟踪从先前抛出异常的位置结束---在 System. Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.d__11。MoveNext() --- 从先前引发异常的位置结束堆栈跟踪 --- 在 Microsoft.Azure 的 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 的 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() .Documents.Query.DocumentQueryExecutionContextBase.d__e.MoveNext() --- 在 System.Runtime.CompilerServices.TaskAwaiter 的 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 处从先前引发异常的位置结束堆栈跟踪。 Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.d__3.MoveNext() 处的 HandleNonSuccessAndDebuggerNotification(Task task) --- 从先前引发异常的位置结束堆栈跟踪 --- 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在 System.Runtime。Microsoft.Azure.Documents.BackoffRetryUtility 上的 CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)1.<>c__DisplayClass2.<<ExecuteAsync>b__1>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.BackoffRetryUtility
1.d__16.MoveNext() --- 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 的 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 上的异常抛出位置结束堆栈跟踪在 Microsoft.Azure.Documents.BackoffRetryUtility 1.<ExecuteAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.<ExecuteWithRetryPolicy>d__1b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.<ExecuteInternalAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.<ExecuteNextAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.Linq.DocumentQuery
1.d__171.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DataTransfer.DocumentDb.Client.DocumentQueryExtensions.<FirstOrDefault>d__0
1.MoveNext() in f:_Bld\12470\6357\Sources_repo\DocumentDb\Microsoft.DataTransfer.DocumentDb\Client\DocumentQueryExtensions.cs:line 0 --- 堆栈跟踪从上一个引发异常的位置结束---在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 Microsoft.DataTransfer.DocumentDb.Client.DocumentDbClient.d__26.MoveNext() 在 f:_Bld\12470\6357\ Sources_repo\DocumentDb\Microsoft.DataTransfer.DocumentDb\Client\DocumentDbClient.cs:第 185 行 --- 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 处从引发异常的先前位置结束堆栈跟踪。 Microsoft.DataTransfer 上的 Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)。DocumentDb.Client.DocumentDbClient.d__2.MoveNext() in f:_Bld\12470\6357\Sources_repo\DocumentDb\Microsoft.DataTransfer.DocumentDb\Client\DocumentDbClient.cs:line 46 --- 堆栈跟踪从先前位置结束异常被抛出 --- 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 Microsoft.DataTransfer.DocumentDb.Sink.Parallel.DocumentDbParallelSinkAdapter.d__0.MoveNext() 的 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() f:_Bld\12470\6357\Sources_repo\DocumentDb\Microsoft.DataTransfer.DocumentDb\Sink\Parallel\DocumentDbParallelSinkAdapter.cs:line 0 --- 在 System.Runtime 处从先前引发异常的位置结束堆栈跟踪。 System.Runtime.CompilerServices.TaskAwaiter 处的 ExceptionServices.ExceptionDispatchInfo.Throw()。HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.DataTransfer.DocumentDb.Sink.Parallel.DocumentDbParallelSinkAdapterInternalFactory.d__0.MoveNext() in f:_Bld\12470\6357\Sources_repo\DocumentDb\Microsoft.DataTransfer.DocumentDb\Sink\Parallel\DocumentDbParallelSinkAdapterInternalFactory.cs:第 30 行 --- 从先前引发异常的位置结束堆栈跟踪 --- 在 Microsoft.DataTransfer 的 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 的 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()。 Core.Service.DataTransferService.d__9.MoveNext() in f:_Bld\12470\6357\Sources_repo\Core\Microsoft.DataTransfer.Core\Service\DataTransferService.cs:line 70 --- 堆栈跟踪从先前位置结束异常被抛出 --- 在 System.Runtime。ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.DataTransfer.WpfHost.Steps.Import.ImportStep.d__8.MoveNext() in f:_Bld\12470\6357\Sources_repo\ Wpf\Microsoft.DataTransfer.WpfHost\Steps\Import\ImportStep.cs:第 73 行