添加负载均衡器时Cloud Service ReservedIP映射错误

时间:2017-08-09 15:07:03

标签: azure azure-cloud-services internal-load-balancer

我有以下定义的

<Sites>
  <Site name="Internal" physicalDirectory="location">
    <Bindings>
      <Binding name="HttpIn100" endpointName="HttpInLB" />
      <Binding name="HttpIn101" endpointName="HttpInLB" hostHeader="someheader" />
      <Binding name="HttpIn102" endpointName="HttpInLB" hostHeader="someheader" />
      <Binding name="HttpIn103" endpointName="HttpInLB" hostHeader="someheader" />
    </Bindings>
  </Site>
</Sites>

这是终点

<Endpoints>
      <InputEndpoint name="HttpInLB" protocol="http" port="80" loadBalancer="LB" />
    </Endpoints>

然后在我的cscfg文件中我有

 <NetworkConfiguration>
<VirtualNetworkSite name="Development" />
<AddressAssignments>
  <InstanceAddress roleName="SiteName">
    <Subnets>
      <Subnet name="DMZ-subnet" />
    </Subnets>
  </InstanceAddress>
  <ReservedIPs>
    <ReservedIP name="ipname"/>
  </ReservedIPs>
</AddressAssignments>
<LoadBalancers>
  <LoadBalancer name="LB">
    <FrontendIPConfiguration type="private" subnet="DMZ-subnet" staticVirtualNetworkIPAddress="00.0.00.001" />
  </LoadBalancer>
</LoadBalancers>

当我发布时,我得到以下错误

ReservedIP&#39; ipname&#39;未映射到端点。服务定义必须包含至少一个映射到ReservedIP的端点。

感谢有人可以帮助我。

非常感谢

1 个答案:

答案 0 :(得分:0)

只有包含外部端点的服务才支持ReservedIP。您可以做的是添加外部端点并使用Network Security Groups阻止它。

例如,将以下端点添加到Endpoints标记。然后你可以使用NSG阻止端口。

<InputEndpoint name="Endpoint1" protocol="http" port="8078" />