asd7160

AWS EC2 想用负载均衡器监控一个 HTTP 主机是否工作正常,但一直搞不定

  •  
  •   asd7160 · Jun 11, 2021 · 2956 views
    This topic created in 1840 days ago, the information mentioned may be changed or developed.

    在 AWS 上弄了一个免费的 EC2 实例玩,部署的是 windows server 2019 和 Tomcat8.5

    Tomcat 上做了一个非常简单的 webapp,只有一个静态的网页 index.html,http 协议,8080 端口。

    安全组和 windows 的防火墙里都把 8080 打开了,并且测试过浏览器也能正常访问这个静态网页。

    现在想用负载均衡器监控这个 http 服务是否工作正常,侦听器也设置好了 HTTP 8080,但实例一直无法被监听器 ping 通。明明用浏览器可以打开,实在想不通问题出在哪里。请各位大佬指教。

    负载均衡器的监听器设置如下: https://imgtu.com/i/2WEaSe https://imgtu.com/i/2WEdQH

    index.html 放在 webapp/test/index.html,浏览器的访问方式是 http://IP 地址:8080/test

    麻烦大家帮忙看看问题所在,非常感谢!

    6 replies    2021-06-11 15:15:35 +08:00
    lxfxf
        1
    lxfxf  
       Jun 11, 2021
    Interal 地址的问题?以及 EC2 的 security group 设置了 8080 的 ingress 吗?
    asd7160
        2
    asd7160  
    OP
       Jun 11, 2021
    @lxfxf

    安全组的入站规则里把 8080 都打开了,否则也不可能用浏览器能正常访问。

    地址那个具体是怎么回事呢?没有理解,能否再详细赐教呢?谢谢
    wei745359223
        3
    wei745359223  
       Jun 11, 2021
    设置成这样试试。http://IP 地址:8080/test/
    wei745359223
        4
    wei745359223  
       Jun 11, 2021
    健康检查的路径 /test/index.html
    lxfxf
        5
    lxfxf  
       Jun 11, 2021
    @asd7160 EC2 有一个 private IP, 让 ELB 用这个 private IP 访问看看
    yutian2211
        6
    yutian2211  
       Jun 11, 2021
    如果是 ELB 的话,4L 正解
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2481 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 16:07 · PVG 00:07 · LAX 09:07 · JFK 12:07
    ♥ Do have faith in what you're doing.