Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set-AzureRmNetworkInterface fails #2042

Closed
zhongyi-zhang opened this issue Apr 1, 2016 · 2 comments
Closed

Set-AzureRmNetworkInterface fails #2042

zhongyi-zhang opened this issue Apr 1, 2016 · 2 comments
Labels
Network Service Attention This issue is responsible by Azure service team.

Comments

@zhongyi-zhang
Copy link

Our CloudFoundry customers want load balancers to balance both public ip addresses and private ip addresses.

So we created two load balancers, public and internal.

After the NICs were successfully added to the backend address pool of the public LB,
we used following commands to add a NIC to the internal LB:

$lb = Get-AzureRmLoadBalancer -ResourceGroupName "zhongyicf" -Name "haproxylb2"
$nic1 = Get-AzureRmNetworkInterface -ResourceGroupName zhongyicf -Name "q5n5pznfvep6acfdefaultsa-3b1329fe-84cc-4d2a-b978-2783d6a1339c"
$nic1.IpConfigurations[0].LoadBalancerBackendAddressPools.Add($lb.BackendAddressPools[0]);
$nic1 | Set-AzureRmNetworkInterface

Then got following error messages:

Set-AzureRmNetworkInterface : Load balancer rules /subscriptions/4be8920b-2978-43d7-ab14-04d8549c1d05/resourceGroups/zhongyicf/providers/Microsoft.Ne
twork/loadBalancers/haproxylb/loadBalancingRules/lbruletcp22 and /subscriptions/4be8920b-2978-43d7-ab14-04d8549c1d05/resourceGroups/zhongyicf/provide
rs/Microsoft.Network/loadBalancers/haproxylb2/loadBalancingRules/lbruletcp22 use the same backend port (22) and protocol (Tcp), and must not be used 
with the same backend ip (/subscriptions/4be8920b-2978-43d7-ab14-04d8549c1d05/resourceGroups/zhongyicf/providers/Microsoft.Network/networkInterfaces/
q5n5pznfvep6acfdefaultsa-3b1329fe-84cc-4d2a-b978-2783d6a1339c/ipConfigurations/ipconfig1).
At line:4 char:9
+ $nic1 | Set-AzureRmNetworkInterface
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Set-AzureRmNetworkInterface], CloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Network.SetAzureNetworkInterfaceCommand

According to the messages, though ignore the rules issue, "must not be used
with the same backend ip" issue still can't be solved.

Is it a bug in Powershell, we can't do that, or just I didn't use right commands?

Thanks

@AbelHu
Copy link
Member

AbelHu commented Apr 7, 2016

Ping

@markjbrown
Copy link
Contributor

You cannot use the same backend IP for both Load balancers.

lbruletcp22 use the same backend port (22) and protocol (Tcp), and must not be used with the same backend ip

Create a different backend port. This is a service limitation. If you create a unique one for each it will work fine.

@bsiegel bsiegel added the Service Attention This issue is responsible by Azure service team. label Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Network Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

6 participants