问题
I'm receiving the following error when trying to manually increase the number of instances above 10 on an Azure Scale set.
Failed to update autoscale configuration for 'XXXX'.{ "error": { "details": [], "code": "InboundNatPoolFrontendPortRangeSmallerThanRequestedPorts", "message": "The frontend port range for the inboundNATpool /subscriptions/xxxx/resourceGroups/xxxx/providers/Microsoft.Network/loadBalancers/LB-xxx/inboundNatPools/DebuggerListenerNatPool-4vhwwa8stp is smaller than the requested number of ports 15 in VM scale set /subscriptions/xxx/resourceGroups/xxxx/providers/Microsoft.Compute/virtualMachineScaleSets/XXXX." } }
The default number of instances is 3 and any number up to 10 works as expected. The subscription has plenty of available cores.
Looking at the referenced load balancer in Azure portal, I cannot see any settings that are obviously linked to this error message. The LB has a setting 'SKU' that has a value of 'Basic' which i guess may be an issue? (although reading up on this would indicate the limit there is 100)
There are no google results for the code 'InboundNatPoolFrontendPortRangeSmallerThanRequestedPorts' and searching for parts of the error message didn't give any meaningful results.
Any pointers appreciated
回答1:
Keep in mind that if you have overprovisioning on, you will temporarily get more VMs than you asked for (documentation here). So you'll need to have enough NAT rules to accomidate the extra VMs. You should never need more than 2 times as many NAT rules as VMs (so if your VM max is 10, you should never need more than 20 NAT rules in the pool).
回答2:
"InboundNatPoolFrontendPortRangeSmallerThanRequestedPorts"
This error message means, your load balancer NAT pool is smaller than the requested number of ports 15 in VM scale set.
Here a example VMSS NAT pool:
"variables": {
"natStartPort": 50000,
"natEndPort": 50119,
"natBackendPort": 3389,}
"inboundNatPools": [
{
"name": "[variables('natPoolName')]",
"properties": {
"frontendIPConfiguration": {
"id": "[variables('frontEndIPConfigID')]"
},
"protocol": "tcp",
"frontendPortRangeStart": "[variables('natStartPort')]",
"frontendPortRangeEnd": "[variables('natEndPort')]",
"backendPort": "[variables('natBackendPort')]"
}
}
],
Please check your NAT pool range.
About edit inbound NAT pool in VMSS loadbalancer, we can use CLI 2.0 to edit it:
az network lb inbound-nat-pool create --backend-port
--frontend-port-range-end
--frontend-port-range-start
--lb-name
--name
--protocol {All, Tcp, Udp}
--resource-group
Here a similar case about edit VMSS NAT pool, please refer to it.
回答3:
Make sure that
- your IP-Address-Range in the Subnet is large enough
- you also add an "Inbound NAT rule" to the load balancer if you manually scale via PowerShell or CLI
回答4:
In my case, I had a load balance with an inbound NAT pool called EtwListenerNatPool-qs8az5dmgu which has a range of only 15 ports, restricting us to scaling to only 15 instances. To fix this, I ran the following commands in the Azure CLI (your name may be different, you can view the pools in the portal):
az login
az network lb inbound-nat-pool create --backend-port 810 --frontend-port-range-end 860 --frontend-port-range-start 810 --lb-name <lbName> --name EtwListenerNatPool-qs8az5dmgu --protocol Tcp --resource-group <resourceGroup>
来源:https://stackoverflow.com/questions/47240074/failed-to-update-autoscale-configuration-azure-scale-set