Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    HAProxy health checks

    Scheduled Pinned Locked Moved pfSense Packages
    5 Posts 2 Posters 3.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      Pentangle
      last edited by

      Why is it that the only HAProxy back-end health check that works is the HTTP one?

      I've spent AGES trying to configure another loadbalancer for the SMTP/S service on a pair of spamfilters and no matter what I do I can't get HAProxy to see the services as UP.  The only way I can get the loadbalancer to work is to turn OFF the health checks (which is not exactly an ideal scenario).

      Any ideas?

      1 Reply Last reply Reply Quote 0
      • P
        PiBa
        last edited by

        Hi Pentangle,

        The 'Basic' healthcheck should work, its better than nothing, but only checks for a open tcp port..

        As for smtp healthcheck, what happens if your run "telnet serverip 25"? It should show some 2xx code.

        Regards,
        PiBa-NL

        1 Reply Last reply Reply Quote 0
        • P
          PiBa
          last edited by

          Also what does the stats page show when you hover over the lastchk result?

          1 Reply Last reply Reply Quote 0
          • P
            Pentangle
            last edited by

            Hi PiBa,

            Sorry for the delay.

            Thanks for mentioning the basic health check - i'd totally missed that one out when trying the checks that should have been relevant.  The basic one passes, so it's better than "none"!

            As regards the telnet emailserverip 25, it comes back with a 220 code.

            However, if I try the HELO or EHLO check I get "Socket Error: Connection reset by peer".

            Thanks,
            Mike.

            1 Reply Last reply Reply Quote 0
            • P
              PiBa
              last edited by

              Hi Mike,

              Ok so i suppose lastchk result on stats page also shows something similar to connection closed or something..?

              Together with the basic check you might try and configure something like this in the advanced settings:

              option tcp-check
              tcp-check expect string 220
              

              Im not sure if that will work.. Maybe you could try a few variations with it.. See the docs here:
              http://cbonte.github.io/haproxy-dconv/snapshot/configuration-1.6.html#4.2-tcp-check%20expect

              Regards PiBa-NL

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.