Skip to content

ImageGallery Function App fails to start with "Unhealthy" status #1401

@ElasticEnergy

Description

@ElasticEnergy

Description

The sample function app fails to start correctly and remains in an "Unhealthy" state.

Steps to Reproduce

  1. Deploy/Run the sample Function App using aspire deploy.
  2. Observe the startup logs.
  3. The app shows as "Unhealthy".
2025-12-21T22:05:29.7798062Z stdout F {"EventType":"MS_FUNCTION_LOGS","Level":3,"SubscriptionId":"","AppName":"functions","FunctionName":"","EventName":"Unhealthy","Source":"Microsoft.Azure.WebJobs.Script.Diagnostics.HealthChecks.TelemetryHealthCheckPublisher","Details":"","Summary":"[Tag='azure.functions.readiness'] Process reporting unhealthy: Unhealthy. Health check entries are {'azure.functions.script_host.lifecycle':{'status':'Unhealthy','description':'Script host in error state: \\nSecret initialization from Blob storage failed due to missing both an Azure Storage connection string and a SAS connection uri. For Blob Storage, please provide at least one of these. If you intend to use files for secrets, add an App Setting key \\u0027AzureWebJobsSecretStorageType\\u0027 with value \\u0027Files\\u0027.'}}","HostVersion":"4.1045.200.4","EventTimeStamp":"2025-12-21T22:05:29.7796192Z","ExceptionType":"","ExceptionMessage":"","FunctionInvocationId":"","HostInstanceId":"","ActivityId":"","RuntimeSiteName":"","SlotName":""}

Investigation Findings

After investigating the environment variables, it appears that the app is configured to use an identity-based connection for storage, but the AzureWebJobsStorage__clientId setting is missing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions