在虚拟机之间不可见负载均衡器地址(虚拟地址) [英] Load Balancer address (virtual address) is not visible among the virtual machines

查看:76
本文介绍了在虚拟机之间不可见负载均衡器地址(虚拟地址)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Azure中创建了3个虚拟机.他们的私人地址是:

10.0.9.4,10.0.9.5,10.0.9.6

在网络接口中,我在同一虚拟网络(资源组)中创建了一个新的接口:

私有ip地址是10.0.9.7.它还具有别名lb.local和公用ip地址:51.145.138.62

我希望将此地址作为虚拟机10.0.9.4和10.0.9.5的负载平衡地址共享

我在以下行的/etc/hosts文件中的每台虚拟机中添加了

:

10.0.9.7 lb.oozie.local

我出于负载平衡的目的安装了HAProxy,但由于完全无法Ping此地址10.0.9.7而感到困惑. ,应该怎么做才能使我的虚拟机可以看到这些IP地址,并且可以拥有这些IP地址 并将其用于负载平衡目的?

我无法从网络接口lb.local ping通私有或公共IP地址

请告诉我这是否是使用带有私有和公共ip地址的网络接口来创建新资源作为负载平衡地址的正确方法?

我还尝试在具有私有IP(10.0.9.9)的同一虚拟网络中创建新的Load Balancer资源,并且还在具有不同主机名的/etc/hosts中尝试使用它,但是两个IP地址均无法访问.我尝试在端口80上使用telnet来访问它们

10.0.9.7磅.oozie.local
10.0.9.9 lb2.oozie.local

提前谢谢

解决方案

ping使用的ICMP通常被阻止.本指南应为您提供帮助:


Hi, I created 3 virtual machines in Azure. Their private addresses are:

10.0.9.4 , 10.0.9.5 , 10.0.9.6

In Network Interfaces I created one new inteface within the same virtual network (resource group):

Private ip address is 10.0.9.7. It also has alias lb.local and public ip address:51.145.138.62

I want this adress to be shared as Load Balancing address for virtual machines 10.0.9.4 and 10.0.9.5

I added in each virual machine in /etc/hosts file following row:

10.0.9.7 lb.oozie.local

I installed HAProxy for Load Balancing purposes but I am confused since I am not able to Ping this address 10.0.9.7 at all  , what should be done so that my virtual machines can see those IP addresses and so they can have those IP addresses and use them for load balancing purposes???

I am not able to ping either private or public IP address from network interface lb.local

Please tell me if this is correct approach to create new resource as Network Interface with private and public ip address which will be used as load balancing address?

I also tried to create new Load Balancer resource in same virtual network with Private IP (10.0.9.9) and I tried with it also in /etc/hosts with different host name but both ip addresses are not reachable. i tried with telnet on port 80 to reach them

10.0.9.7 lb.oozie.local
10.0.9.9 lb2.oozie.local

Thank you in advance

解决方案

ICMP that ping uses is usually blocked. This guide should help you:

https://blogs.msdn.microsoft.com/mast/2014/06/22/use-port-pings-instead-of-icmp-to-test-azure-vm-connectivity/

Thanks


这篇关于在虚拟机之间不可见负载均衡器地址(虚拟地址)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆