Azure / Azure/Azure-Functions

Azure Functions Flex Consumption fails deployment and timer trigger execution when Virtual WAN VNet-to-Hub connection internet_security_enabled is set to 'true'

Open
#2,617 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
PowerShell
Stars
1.1k
Forks
215
Avg merge
4h 2m
Merged PRs (30d)
1

Description

### **Problem Description:**
We are experiencing comprehensive Azure Functions failures in a Virtual WAN (vWAN) environment when the VNet-to-Hub connection has internet_security_enabled = true enabled. The issue manifests in three critical failure modes: deployment failures, timer trigger execution failures, and SSL connection errors during runtime startup. Our Virtual WAN hub includes a secured firewall, so function app traffic is routed through it.

### **Environment Configuration**:

**Function App Type**: Flex Consumption (FC1) with Python 3.11 runtime

**Trigger Type:** Timer trigger for ExpressRoute health checks (every 1 minute)

**Network Setup:** VNet-integrated Function App connected to Virtual WAN Hub/Secured WVAN Firewall

**DNS Configuration:** VNet configured with firewall IP as custom DNS server, which acts as a DNS forwarder to private DNS resolver for both internal domain resolution and internet/Azure DNS queries

**VNet Integration:** Function App and Storage Account private endpoints deployed in the same VNet

Function subnet (with Microsoft.App/environments delegation)
Private endpoint subnet (hosting storage private endpoints)
Private Endpoints: Storage Account blob and queue services with private endpoints in the same VNet as Function App

**Cross-subscription Private DNS Zones:** Private DNS zones (privatelink.blob.core.windows.net, privatelink.queue.core.windows.net) in connectivity subscription, linked to Function App VNet via DNS Resolver in the same VWAN Network

**Storage Configuration:** Storage connection strings configured, private endpoints accessible within VNet
Region: UK South

**Failure Mode 1**

Deployment Failure: The deployment consistently fails during the Oryx build step with the error:

```
Http request to retrieve the SDKs available to download from 'https://oryx-cdn.microsoft.io' failed.
Please ensure that your network configuration allows traffic to required Oryx dependencies
```

**Failure Mode 2**

Timer Trigger Execution Failure: Even when deployment succeeds (through temporary workarounds), timer triggers completely stop executing when internet_security_enabled = true is re-enabled. This appears to be caused by the Function App's inability to communicate with Azure Storage coordination services for timer state management, despite having optimal same-VNet private endpoint configuration.

**Failure Mode 3**

SSL Connection Failures During Runtime Startup (Critical Evidence): The Function App GUI shows critical SSL connection errors that confirm the internet connectivity blocking issue:

```
Microsoft.Azure.WebJobs.Script: Error building configuration in an external startup class.
System.Net.Http: The SSL connection could not be established, see inner exception.
System.Net.Security: Received an unexpected EOF or 0 bytes from the transport stream.
```

Analysis of SSL Errors: This error pattern indicates that the Azure Functions runtime is attempting to establish SSL connections to external Azure services for configuration and startup processes, but these connections are being terminated or blocked by the Azure Firewall during SSL handshake when internet_security_enabled = true.

I have also try add these rules to my firewall, to resolve these issues but this hasn't seem to work( note Im using Python runtime in function app)

```
Network Rules: Azure service tags (AzureCloud.UKSouth, Storage.UKSouth, AzureMonitor, AzureActiveDirectory)

Application Rules: Extensive FQDN allowlist including:
oryx-cdn.microsoft.io, *.azurewebsites.net (deployment)
management.azure.com, *.core.windows.net (storage coordination)
login.microsoftonline.com, dc.applicationinsights.azure.com (runtime)
pypi.org, files.pythonhosted.org (Python dependencies)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.