Azure Web作业文件不起作用(由于退出代码-532462766,作业失败)

时间:2019-01-15 07:13:27

标签: c# azure azure-webjobs

使用石英.net按计划运行的exe文件在本地计算机上运行没有问题,但是当将其加载到Azure Web作业中时,其执行以错误结束(由于退出代码-532462766,作业失败)。有什么问题吗?

[01/15/2019 07:00:44 > 909db9: SYS INFO] Run script 'CurrencyUpdate.exe' with script host - 'WindowsScriptHost'
[01/15/2019 07:00:44 > 909db9: SYS INFO] Status changed to Running
[01/15/2019 07:00:45 > 909db9: INFO] 1/15/2019 7:00:45 AM [INFO]  Quartz.Impl.StdSchedulerFactory - Default Quartz.NET properties loaded from embedded resource file
[01/15/2019 07:00:45 > 909db9: INFO] 1/15/2019 7:00:45 AM [INFO]  Quartz.Impl.StdSchedulerFactory - Using default implementation for object serializer
[01/15/2019 07:00:45 > 909db9: INFO] 1/15/2019 7:00:45 AM [INFO]  Quartz.Impl.StdSchedulerFactory - Using default implementation for ThreadExecutor
[01/15/2019 07:00:45 > 909db9: INFO] 1/15/2019 7:00:45 AM [INFO]  Quartz.Core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: Quartz.Core.SchedulerSignalerImpl
[01/15/2019 07:00:45 > 909db9: INFO] 1/15/2019 7:00:45 AM [INFO]  Quartz.Core.QuartzScheduler - Quartz Scheduler v.2.5.0.0 created.
[01/15/2019 07:00:45 > 909db9: INFO] 1/15/2019 7:00:45 AM [INFO]  Quartz.Simpl.RAMJobStore - RAMJobStore initialized.
[01/15/2019 07:00:45 > 909db9: INFO] 1/15/2019 7:00:45 AM [INFO]  Quartz.Core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.5.0.0) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'
[01/15/2019 07:00:45 > 909db9: INFO]   Scheduler class: 'Quartz.Core.QuartzScheduler' - running locally.
[01/15/2019 07:00:45 > 909db9: INFO]   NOT STARTED.
[01/15/2019 07:00:45 > 909db9: INFO]   Currently in standby mode.
[01/15/2019 07:00:45 > 909db9: INFO]   Number of jobs executed: 0
[01/15/2019 07:00:45 > 909db9: INFO]   Using thread pool 'Quartz.Simpl.SimpleThreadPool' - with 10 threads.
[01/15/2019 07:00:45 > 909db9: INFO]   Using job-store 'Quartz.Simpl.RAMJobStore' - which does not support persistence. and is not clustered.
[01/15/2019 07:00:45 > 909db9: INFO] 
[01/15/2019 07:00:45 > 909db9: INFO] 1/15/2019 7:00:45 AM [INFO]  Quartz.Impl.StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized
[01/15/2019 07:00:45 > 909db9: INFO] 1/15/2019 7:00:45 AM [INFO]  Quartz.Impl.StdSchedulerFactory - Quartz scheduler version: 2.5.0.0
[01/15/2019 07:00:45 > 909db9: INFO] 1/15/2019 7:00:45 AM [INFO]  Quartz.Core.QuartzScheduler - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
[01/15/2019 07:00:45 > 909db9: INFO] StartUpdate
[01/15/2019 07:00:46 > 909db9: INFO] EXMO UPDAte compltete
[01/15/2019 07:00:56 > 909db9: ERR ] 
[01/15/2019 07:00:56 > 909db9: ERR ] Unhandled Exception: System.Data.Entity.Infrastructure.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.Entity.Core.UpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.ArgumentException: Parameter value '12149703521483100.0000' is out of range.
[01/15/2019 07:00:56 > 909db9: ERR ]    at System.Data.SqlClient.TdsParser.TdsExecuteRPC(SqlCommand cmd, _SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc, Boolean sync, TaskCompletionSource`1 completion, Int32 startRpc, Int32 startParam)
[01/15/2019 07:00:56 > 909db9: ERR ]    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
[01/15/2019 07:00:56 > 909db9: ERR ]    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
[01/15/2019 07:00:56 > 909db9: ERR ]    at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
[01/15/2019 07:00:56 > 909db9: ERR ]    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
[01/15/2019 07:00:56 > 909db9: ERR ]    at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<NonQuery>b__0(DbCommand t, DbCommandInterceptionContext`1 c)
[01/15/2019 07:00:56 > 909db9: ERR ]    at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
[01/15/2019 07:00:56 > 909db9: ERR ]    at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.NonQuery(DbCommand command, DbCommandInterceptionContext interceptionContext)
[01/15/2019 07:00:56 > 909db9: ERR ]    at System.Data.Entity.Internal.InterceptableDbCommand.ExecuteNonQuery()
[01/15/2019 07:00:56 > 909db9: ERR ]    at System.Data.Entity.Core.Mapping.Update.Internal.DynamicUpdateCommand.Execute(Dictionary`2 identifierValues, List`1 generatedValues)
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update()
[01/15/2019 07:00:57 > 909db9: ERR ]    --- End of inner exception stack trace ---
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update()
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.<Update>b__2(UpdateTranslator ut)
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction)
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update()
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Data.Entity.Core.Objects.ObjectContext.<SaveChangesToStore>b__35()
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction)
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.<SaveChangesInternal>b__27()
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction)
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options)
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Data.Entity.Internal.InternalContext.SaveChanges()
[01/15/2019 07:00:57 > 909db9: ERR ]    --- End of inner exception stack trace ---
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Data.Entity.Internal.InternalContext.SaveChanges()
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Data.Entity.Internal.LazyInternalContext.SaveChanges()
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Data.Entity.DbContext.SaveChanges()
[01/15/2019 07:00:57 > 909db9: ERR ]    at CurrencyUpdate.Program.CurrencyUpdate.<Quartz-IJob-Execute>d__0.MoveNext() in C:\Users\Nexgen\source\repos\CurrencyUpdate\CurrencyUpdate\Program.cs:line 1891
[01/15/2019 07:00:57 > 909db9: ERR ] --- End of stack trace from previous location where exception was thrown ---
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_1(Object state)
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Threading.ThreadPoolWorkQueue.Dispatch()
[01/15/2019 07:00:57 > 909db9: ERR ]    at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
[01/15/2019 07:00:57 > 909db9: SYS ERR ] Job failed due to exit code -532462766

启动时,在本地计算机上,不会发生任何错误。通过Microsoft Visual Studo 2017进行发布。

1 个答案:

答案 0 :(得分:0)

根据评论,此错误并非特定于azure-webjobs。这是本地开发机器与运行Webjob的云实例之间的文化不匹配。

OP已解决此问题。