【发布时间】:2018-04-28 20:54:31
【问题描述】:
我有一个在 azure 上运行的连续网络作业,在 8 小时前进行大规模部署后,在某些情况下该状态从未完成,而在其他情况下则完成了该作业。 我已经启用了我能找到的所有日志记录,并且已经花费了好几个小时试图找出问题所在。
我似乎能够找到的唯一日志错误信息来自 job_log,其中指出:
[11/15/2017 14:46:23 > e553e5: ERR ] 未处理的异常:Microsoft.WindowsAzure.Storage.StorageException:远程服务器返回错误:(404) 未找到。 ---> System.Net.WebException:远程服务器返回错误:(404)未找到。 [11/15/2017 14:46:23 > e553e5: ERR ] 在 Microsoft.WindowsAzure.Storage.Shared.Protocol.HttpResponseParsers.ProcessExpectedStatusCodeNoException[T](HttpStatusCode expectedStatusCode, HttpStatusCode actualStatusCode, T retVal, StorageCommandBase
1 cmd, Exception ex) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\Common\Shared\Protocol\HttpResponseParsers.Common.cs:line 50 [11/15/2017 14:46:23 > e553e5: ERR ] at Microsoft.WindowsAzure.Storage.Blob.CloudBlob.<DeleteBlobImpl>b__33(RESTCommand1 cmd, c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlob.cs: 3349 中的 HttpWebResponse resp,异常 ex,OperationContext ctx) [11/15/2017 14:46:23 > e553e5: ERR ] 在 Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndGetResponse[T](IAsyncResult getResponseResult) 在 c:\Program Files (x86)\Jenkins\workspace \release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:第 299 行 [11/15/2017 14:46:23 > e553e5: ERR ] --- 内部异常堆栈跟踪结束 --- [11/15/2017 14:46:23 > e553e5: ERR ] 在 Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndExecuteAsync[T](IAsyncResult 结果) 在 c:\Program Files (x86)\Jenkins\workspace \release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:第 50 行 [11/15/2017 14:46:23 > e553e5: ERR ] 在 Microsoft.WindowsAzure.Storage.Blob.CloudBlob.EndDelete(IAsyncResult asyncResult) 在 c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ ClassLibraryCommon\Blob\CloudBlob.cs:第 1729 行 [11/15/2017 14:46:23 > e553e5: ERR ] 在 Microsoft.WindowsAzure.Storage.Core.Util.AsyncExtensions.c__DisplayClass4.b__3(IAsyncResult ar) 在 c:\Program Files (x86)\Jenkins\工作区\release_dotnet_master\Lib\ClassLibraryCommon\Core\Util\AsyncExtensions.cs:第 114 行 [2017 年 11 月 15 日 14:46:23 > e553e5: ERR ] --- 从之前抛出异常的位置结束堆栈跟踪--- [11/15/2017 14:46:23 > e553e5: ERR ] 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务) [11/15/2017 14:46:23 > e553e5: ERR ] 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务) [11/15/2017 14:46:23 > e553e5: ERR ] 在 Microsoft.Azure.WebJobs.Host.Protocols.PersistentQueueWriter1.<DeleteAsync>d__6.MoveNext() [11/15/2017 14:46:23 > e553e5: ERR ] --- End of stack trace from previous location where exception was thrown --- [11/15/2017 14:46:23 > e553e5: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) [11/15/2017 14:46:23 > e553e5: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [11/15/2017 14:46:23 > e553e5: ERR ] at Microsoft.Azure.WebJobs.Host.Loggers.CompositeFunctionInstanceLogger.<DeleteLogFunctionStartedAsync>d__e.MoveNext() [11/15/2017 14:46:23 > e553e5: ERR ] --- End of stack trace from previous location where exception was thrown --- [11/15/2017 14:46:23 > e553e5: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) [11/15/2017 14:46:23 > e553e5: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [11/15/2017 14:46:23 > e553e5: ERR ] at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<TryExecuteAsync>d__1.MoveNext() [11/15/2017 14:46:23 > e553e5: ERR ] --- End of stack trace from previous location where exception was thrown --- [11/15/2017 14:46:23 > e553e5: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) [11/15/2017 14:46:23 > e553e5: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [11/15/2017 14:46:23 > e553e5: ERR ] at Microsoft.Azure.WebJobs.Host.Executors.TriggeredFunctionExecutor1.d__0.MoveNext() [2017 年 11 月 15 日 14:46:23 > e553e5: ERR ] --- 从之前抛出异常的位置结束堆栈跟踪--- [11/15/2017 14:46:23 > e553e5: ERR ] 在 Microsoft.Azure.WebJobs.Host.Timers.BackgroundExceptionDispatcher.c__DisplayClass1.b__0() [11/15/2017 14:46:23 > e553e5: ERR ] 在 System.Threading.ThreadHelper.ThreadStart_Context(对象状态) [11/15/2017 14:46:23 > e553e5: ERR ] 在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext,ContextCallback 回调,对象状态,布尔值 preserveSyncCtx) [11/15/2017 14:46:23 > e553e5: ERR ] 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback 回调,对象状态,布尔值 preserveSyncCtx) [11/15/2017 14:46:23 > e553e5: ERR ] 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback 回调,对象状态) [11/15/2017 14:46:23 > e553e5: ERR ] 在 System.Threading.ThreadHelper.ThreadStart()
谁能给我一些关于如何调试它的想法,因为我没有想法。
我的 webjobs 主页面如下所示:
static void Main()
{
var host = new JobHost();
var config = new JobHostConfiguration();
config.Queues.MaxPollingInterval = new TimeSpan(0,0,0,30);
config.Queues.MaxDequeueCount = 3;
// The following code ensures that the WebJob will be running continuously
host.RunAndBlock();
}
并且 processqueuemessage 看起来像:
public static void ProcessQueueMessage([QueueTrigger("importqueue")] string msg)
{
try
{
WorkerWebJobCore wwjc = new WorkerWebJobCore();
wwjc.RunCore(msg, TableStorageAccessResources.ImportQueue,
TableStorageAccessResources.TableStorageDataOneId,
TableStorageAccessResources.TableStorageDataOnePassword);
}
catch (Exception e)
{
CommunicatorLog.Log.LogError("WebJobWorker","WebJobWorker","Error in processing queue message","ERRWJWF01");
}
}
所以我对所有事情都有所了解,因此我不明白它是如何失败的?
提前致谢。
【问题讨论】:
标签: c# azure azure-webjobs continuous webjob