Open milesfrain opened 4 years ago
@soninaren Do you think we can skip this check if there's no internet connection?
Yes, we should skip bundle load check when there is no internet.
Yes, we should skip bundle load check when there is no internet.
When this change is available?
Is this being worked on?
Any update on this?
Hi, I am having a similar issue while trying to debug offline. But my error message is slightly different:
[2023-04-19T16:34:23.264Z] A host error has occurred during startup operation '885dde36-fb96-4440-a98b-d4499664b3b4'. [2023-04-19T16:34:23.272Z] System.Net.Http: No such host is known. (functionscdn.azureedge.net:443). System.Net.Sockets: No such host is known. Value cannot be null. (Parameter 'provider')
I understand that working on triggers like servicebus etc. would require an internet connection, but when I'm running azurite and want my function only to implement http endpoints and write to DevelopmentMode storage (also disabled appinsights logging), why would I require to be connected to internet? Any update on this?
Hi, this is something that is also on my radar.
I do not myself understand why we must be connected to the internet to debug a local function which makes use of local storage?
Any updates on this issue?
The Url "functionscdn.azureedge.net" is unreachable even with the internet access.
[2023-08-14T08:44:14.742Z] Error building configuration in an external startup class. [2023-08-14T08:44:14.743Z] Error building configuration in an external startup class. System.Net.Http: Network is unreachable (functionscdn.azureedge.net:443). System.Net.Sockets: Network is unreachable. [2023-08-14T08:44:14.777Z] A host error has occurred during startup operation '7d6327e8-4f64-4706-b6c0-32c52a2fa6ab'. [2023-08-14T08:44:14.778Z] Microsoft.Azure.WebJobs.Script: Error building configuration in an external startup class. System.Net.Http: Network is unreachable (functionscdn.azureedge.net:443). System.Net.Sockets: Network is unreachable. Value cannot be null. (Parameter 'provider') [2023-08-14T08:44:14.826Z] Host startup operation has been canceled
So for anyone who is looking for a solution to run their functions without Internet access:
I was required to remove extensionBundle
section from host.json
file. Why does this work?
It seems there is a code introduced in src/Azure.Functions.Cli/Actions/HostActions/Startup.cs that will check if extensionBundle
is defined and if it is, it will set environment variables to check for latest version.
private void SetBundlesEnvironmentVariables()
{
var bundleId = ExtensionBundleHelper.GetExtensionBundleOptions(_hostOptions).Id;
if (!string.IsNullOrEmpty(bundleId))
{
Environment.SetEnvironmentVariable("AzureFunctionsJobHost__extensionBundle__downloadPath", ExtensionBundleHelper.GetBundleDownloadPath(bundleId));
Environment.SetEnvironmentVariable("AzureFunctionsJobHost__extensionBundle__ensureLatest", "true");
}
}
That code was actually introduced as part of another issues:
// workaround for https://github.com/Azure/azure-functions-core-tools/issues/2097
SetBundlesEnvironmentVariables();
I am running javascript functions and I confirmed that this section is not required for Development Model 4 when deploying in Azure. So extensionBundle
section can be safely removed.
I am running javascript functions and I confirmed that this section is not required for Development Model 4 when deploying in Azure. So
extensionBundle
section can be safely removed.
Unfortunately, this workaround only works if you don't use extensions. I use durable functions and this problem is a real blocker
[2024-06-20T16:07:58.639Z] No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).
[2024-06-20T16:07:58.685Z] The 'aaa' function is in error: The binding type(s) 'queueTrigger' are not registered. Please ensure the type is correct and the binding extension is installed.
[2024-06-20T16:07:58.686Z] The 'bbb' function is in error: The binding type(s) 'activityTrigger' are not registered. Please ensure the type is correct and the binding extension is installed.
[2024-06-20T16:07:58.686Z] The 'ccc' function is in error: The binding type(s) 'orchestrationClient' are not registered. Please ensure the type is correct and the binding extension is installed.
[2024-06-20T16:07:58.686Z] The 'ddd' function is in error: The binding type(s) 'orchestrationTrigger' are not registered. Please ensure the type is correct and the binding extension is installed.
I am too experiencing this issue. The point of local development should not require internet checks.
I cannot run local Azure functions while offline.
Initial setup with internet connection
The above commands work fine. But then if I go offline and re-run
func host start
, I encounter this error:Version Info