question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Continuous job not showing Functions in Dashboard

See original GitHub issue

We have an Azure WebJob (3.x) running under an API App in Azure, all Core 2.1. It publishes fine, and runs, but doesn’t show any Functions or list the Function Invocations on the dashboard. Which is odd, because the console output for the job does show it detecting a function:

[10/17/2018 09:26:19 > fa7c81: SYS INFO] Run script 'run.cmd' with script host - 'WindowsScriptHost'
[10/17/2018 09:26:19 > fa7c81: SYS INFO] Status changed to Running
[10/17/2018 09:26:19 > fa7c81: INFO] 
[10/17/2018 09:26:19 > fa7c81: INFO] D:\local\Temp\jobs\continuous\SubmissionJob\43ucb4rv.ipc>dotnet SubmissionJob.dll  
[10/17/2018 09:26:21 > fa7c81: INFO] dbug: Microsoft.Extensions.Hosting.Internal.Host[1]
[10/17/2018 09:26:21 > fa7c81: INFO]       Hosting starting
[10/17/2018 09:26:21 > fa7c81: INFO] info: Microsoft.Azure.WebJobs.Hosting.JobHostService[0]
[10/17/2018 09:26:21 > fa7c81: INFO]       Starting JobHost
[10/17/2018 09:26:21 > fa7c81: INFO] info: Host.Startup[0]
[10/17/2018 09:26:21 > fa7c81: INFO]       Found the following functions:
[10/17/2018 09:26:21 > fa7c81: INFO]       SubmissionJob.Functions.ProcessQueueMessageAsync
[10/17/2018 09:26:21 > fa7c81: INFO]       
[10/17/2018 09:26:21 > fa7c81: INFO] Application started. Press Ctrl+C to shut down.
[10/17/2018 09:26:21 > fa7c81: INFO] Hosting environment: QA

The Program.cs Program class looks like this:

public static async Task Main(string[] args)
    {
        var builder = new HostBuilder()
            .UseEnvironment(Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"))
            .ConfigureWebJobs(b =>
            {
                b.AddAzureStorageCoreServices()
                    .AddAzureStorage()
                    .AddServiceBus()
                    .AddEventHubs();
            })
            .ConfigureAppConfiguration(b =>
            {
                // Adding command line as a configuration source
                b.AddCommandLine(args);
            })
            .ConfigureLogging((context, b) =>
            {
                b.SetMinimumLevel(LogLevel.Debug);
                b.AddConsole();

                // If this key exists in any config, use it to enable App Insights
                var appInsightsKey = context.Configuration["APPINSIGHTS_INSTRUMENTATIONKEY"];
                if (!string.IsNullOrEmpty(appInsightsKey))
                {
                    b.AddApplicationInsights(o => o.InstrumentationKey = appInsightsKey);
                }
            })
            .ConfigureServices((context, services) =>
            {
                services.AddAutoMapper();

                services.AddMemoryCache();

                services.AddDbContext<SubmissionsDbContext>(opts =>
                    opts.UseSqlServer(context.Configuration.GetConnectionString("DefaultConnection")));

                // cloud services
                services.AddTransient(s =>
                    CloudStorageAccount.Parse(
                        context.Configuration.GetConnectionString("AzureQueueConnectionString")));
                services.AddTransient<IBlobReadService, AzureBlobReadService>();
                services.AddSingleton<IBlobWriteService, AzureBlobWriteService>();
                services.AddSingleton<IQueueWriteService, AzureQueueWriteService>();

                // submission services
                services.AddScoped<ISubmissionStatusService, SubmissionStatusService>();

                services.AddSingleton<Functions, Functions>();

                // job activator, required in webjobs sdk 3+
                services.AddSingleton<IJobActivator>(new WebJobsActivator(services.BuildServiceProvider()));
            })
            .UseConsoleLifetime();;

        var host = builder.Build();
        using (host)
        {
            await host.RunAsync();
        }
    }

The Functions.cs has a method with the following signature: public async Task ProcessQueueMessageAsync([QueueTrigger("operations")] CloudQueueMessage incomingMessage, TextWriter log)

…scm.azurewebsites.net/azurejobs/#/jobs/continuous/SubmissionJob shows

Continuous WebJob Details SubmissionJob Running Run command: run.cmd

But there’s no list of function invocations below it, and the job remains permanently in a Running state. If I go to the ‘Functions’ link in Kudu, it says there are no functions/function invocations to display.

Any thoughts?

The bulk of this worked fine in Framework 4.7, though the app builder was clearly different.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:18 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
sehcheesecommented, Mar 29, 2019

@mathewc Since Azure Application Insights is the way this is supposed to be done in v3, how can I use Application Insights to see invocation by invocation results for a v3 WebJob like I used to in the Kudu dashboard?

3reactions
AlexandreArpincommented, Feb 18, 2019

Is there any news on whether this is gonna be addressed or not in a future release?

We’ve have some Webjobs configured to be manually triggered in the Dashboard but the new jobs no longer show up in the Kudu Dashboard.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Azure WebJobs (3.x) Continuous job not showing ...
The answer to this is twofold. You can write to the Kudu Dashboard with var builder = new HostBuilder() .ConfigureWebJobs(b => { b....
Read more >
Jobs do not appear on the dashboard
If you are not able to view any jobs in the job dashboard, it could indicate a few different issues with WP Job...
Read more >
Azure WebJobs (3.x) Continuous job not ... - appsloveworld.com
The console output will continue to show in Kudu Dashboard, but functions will not be detected and won't be displayed, nor their invocations....
Read more >
C# : Azure WebJobs (3.x) Continuous job not showing Functions ...
C# : Azure WebJobs (3.x) Continuous job not showing Functions in Dashboard To Access My Live Chat Page, On Google, Search for "hows...
Read more >
Run background tasks with WebJobs - Azure App Service
Learn how to use WebJobs to run background tasks in Azure App Service. Choose from various script formats and run them with CRON ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found