Reputation: 1
getting the below error when running in one particular Azure env. I tested in two other envs also its working fine there. Checked the azure storage connection string for that env ,it seems to be in correct format.
Can Someone please help!
Unhandled exception.
Microsoft.Azure.WebJobs.Host.Listeners.FunctionListenerException: The listener for function 'SchedulerFunctions.RunEpTask' was unable to start.
---> System.FormatException:
Settings must be of the form "name=value". at Microsoft.Azure.Storage.CloudStorageAccount.<>c.
<Parse>b__97_0(String err) at
Microsoft.Azure.Storage.CloudStorageAccount.ParseStringIntoSettings(String connectionString, Action`1 error) at
Microsoft.Azure.Storage.CloudStorageAccount.ParseImpl(String connectionString, CloudStorageAccount& accountInformation, Action`1 error) at Microsoft.Azure.Storage.CloudStorageAccount.Parse(String connectionString) at
Microsoft.Azure.WebJobs.Extensions.Timers.StorageScheduleMonitor.get_TimerStatusDirectory() in C:\azure-webjobs-sdk-extensions\src\WebJobs.Extensions\Extensions\Timers\Scheduling\StorageScheduleMonitor.cs:line 77 at
Microsoft.Azure.WebJobs.Extensions.Timers.StorageScheduleMonitor.GetStatusBlobReference(String timerName) in C:\azure-webjobs-sdk-extensions\src\WebJobs.Extensions\Extensions\Timers\Scheduling\StorageScheduleMonitor.cs:line 144 at
Microsoft.Azure.WebJobs.Extensions.Timers.StorageScheduleMonitor.GetStatusAsync(String timerName) in C:\azure-webjobs-sdk-extensions\src\WebJobs.Extensions\Extensions\Timers\Scheduling\StorageScheduleMonitor.cs:line 93 at
Microsoft.Azure.WebJobs.Extensions.Timers.Listeners.TimerListener.StartAsync(CancellationToken cancellationToken) in C:\azure-webjobs-sdk-extensions\src\WebJobs.Extensions\Extensions\Timers\Listener\TimerListener.cs:line 99 at
Microsoft.Azure.WebJobs.Host.Listeners.SingletonListener.StartAsync(CancellationToken cancellationToken) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Singleton\SingletonListener.cs:line 70 at
Microsoft.Azure.WebJobs.Host.Listeners.FunctionListener.StartAsync(CancellationToken cancellationToken, Boolean allowRetry) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Listeners\FunctionListener.cs:line 68 --- End of inner exception stack trace --- at
Microsoft.Azure.WebJobs.Host.RecoverableException.TryRecover(ILogger logger) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Exceptions\RecoverableException.cs:line 81 at Microsoft.Azure.WebJobs.Host.Listeners.FunctionListener.StartAsync(CancellationToken cancellationToken, Boolean allowRetry) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Listeners\FunctionListener.cs:line 79 at
Microsoft.Azure.WebJobs.Host.Listeners.FunctionListener.StartAsync(CancellationToken cancellationToken) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Listeners\FunctionListener.cs:line 61 at Microsoft.Azure.WebJobs.Host.Listeners.CompositeListener.StartAsync(CancellationToken cancellationToken) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Listeners\CompositeListener.cs:line 39 at Microsoft.Azure.WebJobs.Host.Listeners.ListenerFactoryListener.StartAsyncCore(CancellationToken cancellationToken) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Listeners\ListenerFactoryListener.cs:line 47 at
Microsoft.Azure.WebJobs.Host.Listeners.ShutdownListener.StartAsync(CancellationToken cancellationToken) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Listeners\ShutdownListener.cs:line 29 at Microsoft.Azure.WebJobs.JobHost.StartAsyncCore(CancellationToken cancellationToken) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\JobHost.cs:line 101 at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at
Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Deloitte.Audit.Workflow.NotificationService.Program.Main() in F:\Vsts\agent-15\_work\48\s\WebApi\src\Deloitte.Audit.Workflow.NotificationService\Program.cs:line 21 at Deloitte.Audit.Workflow.NotificationService.Program.<Main>()
getting the below error when running in one particular Azure env. I tested in two other envs also its working fine there. Checked the azure storage connection string for that env ,it seems to be in correct format.
Can Someone please help!
Upvotes: 0
Views: 1821
Reputation: 7377
Settings must be of the form "name=value". at Microsoft.Azure.Storage.CloudStorageAccount when running Azure webjob timer trigger
You haven't added the Storage Account Connection String in appsettings.json
file.
Connection string
.Add a new file appsettings.json
and add the below line
AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=StorageAccName;AccountKey=****==;EndpointSuffix=core.windows.net"
Thanks @christiandersen and Coding Canvas for the explanation.
For the Web Job to run the timer-trigger we need to set it as a Scheduled Jobs
.
settings.json
must contain the below settings.{
"schedule":"0 */15 * * * *",
"is_singleton":true
}
This setting is to specify the CRON expression/ time span which specifies the web job to trigger.
Upvotes: 0