Share via


Azure WebJob fails with exit code 532462766

Question

Friday, October 30, 2015 6:53 AM

Hi

I have a scheduled webjob. Most of the times it runs successfully. But once in 10 ten times, it fails.

below are the logs that i get. I am using App Insights for logging exceptions.

[> 8a1006: SYS INFO] Status changed to Initializing
[> 8a1006: SYS INFO] Run script 'Something.WebJob.exe' with script host - 'WindowsScriptHost'
[> 8a1006: SYS INFO] Status changed to Running
[> 8a1006: INFO] Starting someIndexLoader...Finished someIndexLoader.
[> 8a1006: INFO] Starting someotherIndexLoader...Finished someIndexLoader.
[> 8a1006: ERR ] 
[> 8a1006: ERR ] Unhandled Exception: System.TypeInitializationException: The type initializer for 'myapp.Common.Logger' threw an exception. > System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. > System.InvalidOperationException: Type 'Microsoft.ApplicationInsights.Extensibility.RuntimeTelemetry.RemoteDependencyModule, Microsoft.ApplicationInsights.Extensibility.RuntimeTelemetry' could not be loaded.
[> 8a1006: ERR ]    at Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryConfigurationFactory.CreateInstance(Type interfaceType, String typeName)
[> 8a1006: ERR ]    at Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryConfigurationFactory.LoadInstance(XElement definition, Type expectedType, Object instance)
[> 8a1006: ERR ]    at Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryConfigurationFactory.LoadInstances[T](XElement definition, ICollection`1 instances)
[> 8a1006: ERR ]     End of inner exception stack trace 
[> 8a1006: ERR ]    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
[> 8a1006: ERR ]    at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
[> 8a1006: ERR ]    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
[> 8a1006: ERR ]    at Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryConfigurationFactory.LoadInstance(XElement definition, Type expectedType, Object instance)
[> 8a1006: ERR ]    at Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryConfigurationFactory.LoadProperties(XElement instanceDefinition, Object instance)
[> 8a1006: ERR ]    at Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryConfigurationFactory.LoadInstance(XElement definition, Type expectedType, Object instance)
[> 8a1006: ERR ]    at Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryConfigurationFactory.LoadFromXml(TelemetryConfiguration configuration, XDocument xml)
[> 8a1006: ERR ]    at Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryConfigurationFactory.Initialize(TelemetryConfiguration configuration)
[ > 8a1006: ERR ]    at Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration.get_Active()
[ > 8a1006: ERR ]    at Microsoft.ApplicationInsights.TelemetryClient..ctor()
[ > 8a1006: ERR ]    at myapp.Common.Logger..cctor() in d:\abc\swap\myapp.Common\Logger.cs:line 17
[> 8a1006: ERR ]     End of inner exception stack trace 
[ > 8a1006: ERR ]    at CneCrmSearch.Common.Logger.LogException(Exception exception, IDictionary`2 properties)
[ > 8a1006: ERR ]    at myapp.Common.IndexLoaders.someIndexLoader.LoadIndex(Boolean dropAndCreateIndex) in d:\abc\swap\myapp.Common\IndexLoaders\someIndexLoader.cs:line 241
[> 8a1006: ERR ]    at myapp.WebJob.Program.Main() in d:\abc\swap\myapp.WebJob\Program.cs:line 28
[ > 8a1006: INFO] Starting some2IndexLoader...
[ > 8a1006: SYS INFO] Status changed to Failed
[ > 8a1006: SYS ERR ] Job failed due to exit code -532462766

Thanks in Advance!

Regards,

priyanka

All replies (3)

Friday, October 30, 2015 5:00 PM âś…Answered

It looks like you have a broken configuration file.

You either can install Application Insights on the clear application and compare configuration files. Or you can try to uninstall Application Insights nugets, make sure you have no ApplicationInsights configuration file anywhere in the project. Then reinstall all back.

Anastasia


Friday, October 30, 2015 1:06 PM | 1 vote

Seems the issue relates to something blowing up in App Insights, so moving to that forum where they may be better able to help.


Tuesday, November 3, 2015 4:22 AM

Thanks Anastasia!