Azure / Azure/azure-functions-host
Windows Function App using v4 Runtime isn't working in West US
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
#### Check for a solution in the Azure portal
For issues in production, please check for a solution to common issues in the Azure portal before opening a bug. In the Azure portal, navigate to your function app, select `Diagnose and solve problems` from the left, and view relevant dashboards before opening your issue.
#### Investigative information
Please provide the following:
- Timestamp: 2022-11-28T18:13:16.3643366Z
- Function App version: 4
- Function App name: -
- Function name(s) (as appropriate): -
- Invocation ID: 8ee6840f4651ddea (this is the ID when looking in the requests table in Application Insights logs)
- Region: West US
#### Repro steps
Provide the steps required to reproduce the problem:
1. Create function app with v4 runtime version in an P1v2 Windows app service plan that uses Java 11 in West US region (this configuration works as expected in East US).
2. Deploy some functions using the Publish Profile
3. Go to the Filesystem logs in the logstream and it will start to show the error attached in this issue.
#### Expected behavior
Provide a description of the expected behavior.
When going to the logs everything should be working and no errors should be displayed, instead the Runtime is unable to start with the attached error.
That error disappears when downgrading the function runtime version to 3.
#### Actual behavior
Any deployed functions return a HTTP 500 Internal Server Error response and the following error appears in the log stream.

#### Known workarounds
Donwgrade to v3 Runtime.
#### Related information
We are using the following Terraform code for the deployment (that is how we know the configuration is correct, cause when deploying to East US with the same code it all works as expected).
```terraform
resource "azurerm_service_plan" "transfer_files" {
name = "asp-${var.general_suffix}-windows"
location = var.location
resource_group_name = var.resource_group_name
os_type = "Windows"
sku_name = var.func_sku_name
tags = var.tags
}
resource "azurerm_function_app" "transfer_files_contingency" {
name = "func-transfer-files-contingency-${var.businessUnit}-${var.environment}"
location = var.location
resource_group_name = var.resource_group_name
app_service_plan_id = azurerm_service_plan.transfer_files.id
storage_account_name = var.storage_account_name
storage_account_access_key = var.storage_account_key
version = "~4"
enabled = true
https_only = true
lifecycle {
ignore_changes = [
tags
]
}
identity {
type = "UserAssigned"
identity_ids = [var.mi_object_id]
}
key_vault_reference_identity_id = var.mi_object_id
site_config {
vnet_route_all_enabled = true
always_on = true
http2_enabled = true
min_tls_version = "1.2"
ftps_state = "FtpsOnly"
java_version = 11
ip_restriction {
virtual_network_subnet_id = var.apim_subnet_id
priority = 130
name = "APIM Subnet"
}
ip_restriction {
virtual_network_subnet_id = var.function_subnet_id
priority = 150
name = "Same subnet"
}
ip_restriction {
virtual_network_subnet_id = var.app_services_subnet_id
priority = 151
name = "Functions subnet"
}
}
app_settings = merge(var.contingency_function_app_settings, {
"APPINSIGHTS_INSTRUMENTATIONKEY" = azurerm_application_insights.function.instrumentation_key
"APPLICATIONINSIGHTS_CONNECTION_STRING" = azurerm_application_insights.function.connection_string
"FUNCTIONS_WORKER_RUNTIME" = "java"
"NAME_QUEUE" = var.queue_name
"FAD_CONTAINER_NAME" = var.fad_container_name
"COS_FAD_TRANSFER_DB" = var.cosmos_fad_db_name
"CONNECTION_STRING_QUEUE" = "@Microsoft.KeyVault(SecretUri=${var.con_str_queue_secret})"
"FAD_CONECTION_STORAGE" = "@Microsoft.KeyVault(SecretUri=${var.fad_con_storage_secret})"
"COS_FAD_TRANSFER_CONNECTION_STRING" = "@Microsoft.KeyVault(SecretUri=${var.con_str_cosmos_secret})"
"COS_FAD_TRANSFER_KEY" = "@Microsoft.KeyVault(SecretUri=${var.cosmos_key_secret})"
})
}
resource "azurerm_app_service_virtual_network_swift_connection" "transfer_files_contingency" {
app_service_id = azurerm_function_app.transfer_files_contingency.id
subnet_id = var.function_subnet_id
}
```
Contributor guide
Assessment
This issue has not been assessed yet.