Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to 3.0 SDK has issues Dashboard has error: "HostNotRunning" #2460

Closed
srinayani opened this issue Mar 24, 2020 · 2 comments
Closed

Upgrade to 3.0 SDK has issues Dashboard has error: "HostNotRunning" #2460

srinayani opened this issue Mar 24, 2020 · 2 comments

Comments

@srinayani
Copy link

srinayani commented Mar 24, 2020

Please provide a succinct description of the issue.

Repro steps

Provide the steps required to reproduce the problem

  1. After upgrading to webjob 3.0 SDK, WebJob dashboard has error "Host is not running; requests will be queued but not execute until the host is started."
    Host is initiliazed and running continuously and no error. It uses host.RunAsync().Wait(); and is waiting for dashboard to queue but when i go to the Functions, there is "Host Not Running error"
    image

  2. Detailed code at: . https://gist.github.com/srinayani/b3ba79856e4b845e52f71ea4bcf7effc
    In my investigation: I see that the if we clear the Azure-Webjobs-* queues from the storage account manually, and restart the AppService then Dashboard tried to show for messages but this doesn't work well. There seems to be some problem with Dashboard communicating with the hosts where we have Webjob running. The goal is to be able to trigger QueeTrigger Functions as shows in code snippet.
    dashboard logs in the storage account has no HostInstanceId set, Sample below:
    "Id": "02ba1d09-d7e2-4ee7-bec5-8958f39c1633",
    "HostInstanceId": "00000000-0000-0000-0000-000000000000",
    "FunctionId": "azure-webjobs-host-machine-ch01eap000004e8_Microsoft.Advertising.ClientCenter.JobProcessor.Jobs.AnBUtilityJobProcessor.Azu

Also, there is not HeartBeats under azure-webjobs-hosts, in the new SDK is this expected to have HeartBeats folder?

How can i get the HostId specified?
Is this AddAzureStorageCoreServices() required?
I cannot find it in Microsoft.Azure.WebJobs Version 3.0.13; or Microsoft.Azure.Webjobs.Extensions.Storage version3.0.6
I have used IWebJobsBuilder.UseHostId() to use a specific HostId. Would this cause any issue in the new SDK?
When WebJob2.x hostId was being set as below using th.
var config = new JobHostConfiguration(AzureStorageConnectionString);
config.HostId // Set the hostID fo the config.
Is UseHostId() equivalent of this in new 3.0 sdk?

Expected behavior

Where can I find AddAzureStorageCoreServices() and since Host is initialized succesfully even without this, why is the dashboard still saying that host is not running?

CodeSnippet I am using to upgrade to new SDK:
https://gist.github.com/srinayani/b3ba79856e4b845e52f71ea4bcf7effc

@v-anvari
Copy link

v-anvari commented Mar 5, 2021

Hi @srinayani , AddAzureStorageCoreServices makes sure that your WebJob is hooked to a storage account for persisting data, creating logs.

Installing the latest packages from Microsoft.Azure.WebJobs.Extensions/ will solve the error of not finding the "AddAzureStorageCoreServices".

webjobs-sdk-get-started

Let us know if this helps, Thank you

@v-anvari
Copy link

v-anvari commented Mar 9, 2021

Closing the issue as the required information is provided. Please feel to reach back to us in case of any query related to this issue.

@v-anvari v-anvari closed this as completed Mar 9, 2021
@v-anvari v-anvari removed their assignment Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants