admin管理员组文章数量:1384310
I am experiencing persistent issues with my Azure Function App (Shutdown_Function), which I am trying to deploy in my subscription.
Issue Description: I am creating an Azure Function with a Cosmos DB Trigger via the Azure Portal, but immediately after creation, I receive the following error:
❌ Error Message in the Function App:
"Error while loading. Ask questions and use troubleshooting tools to investigate these errors. Diagnose and solve problems. Encountered an error (InternalServerError) from host runtime."
Important: This happens immediately after the function is created, before I even deploy my code.
Steps Taken to Troubleshoot:
First Deployment Attempt via Azure CLI and Visual Studio Code → Unsuccessful Deployment via CLI failed. I then created a new Function App with its own Storage Account.
Added Environment Variables (Before Creating the Function):
COSMOS_DB_CONNECTION_STRING
IOT_HUB_CONNECTION_STRING
EVENT_GRID_ENDPOINT
EVENT_GRID_KEY
- Created the Function in Azure Portal
Function Type: Cosmos DB Trigger
Programming Model: V2
Job Type: Append to App
Function Name: shutdown_function
Container Name (Cosmos DB): DeviceStatus
Database Name: IoTDeviceData
Cosmos DB Connection: COSMOS_DB_CONNECTION_STRING
Function Creation in Azure Portal → Notification: "Successfully created shutdown_function" Despite this success message, I immediately receive the InternalServerError. No code has been deployed at this point.
Function Sometimes Disappears After Creation: In some cases, the function was initially created successfully, and the template was displayed.However, after a short time, the function disappeared.
What is causing the InternalServerError immediately after creation? Why does the function sometimes disappear shortly after creation?
See above. Deployed function in Visual Studio and in the portal ...
My script I want to deploy:
import logging
import json
import os
import azure.functions as func
from azure.iot.hub import IoTHubRegistryManager
from azure.eventgrid import EventGridPublisherClient
from azure.core.credentials import AzureKeyCredential
#
本文标签:
Issues with Azure Function App (ShutdownFunction) – InternalServerErrorStack Overflow
版权声明:本文标题:Issues with Azure Function App (Shutdown_Function) – InternalServerError - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人,
转载请联系作者并注明出处:http://www.betaflare.com/web/1744534989a2611257.html,
本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论