Unable to forward request to backend servers

Environment
HAProxy = One Node (version 2.4.22-3.el9, community edition)
OS = RHEL9
IP = 10.100.51.94

Backend Server = Two Nodes
OS = RHEL 8
Node01 IP = 10.100.51.68
Node02 IP = 10.100.51.70

Firewalld = disabled
SELINUX = disabled

HAPROXY configuration

defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000

#---------------------------------------------------------------------

main frontend which proxys to the backends

#---------------------------------------------------------------------
#frontend main

bind *:5000

acl url_static path_beg -i /static /images /javascript /stylesheets

acl url_static path_end -i .jpg .gif .png .css .js

use_backend static if url_static

#: default_backend app

frontend iris_core01
bind 10.100.51.94:4444
default_backend core01

backend core01

mode tcp

    balance roundrobin
    server core01 10.100.51.68:22
    server core02 10.100.51.70:22

frontend iris_core
bind 10.100.51.94:3333
default_backend core

backend core
mode http
balance roundrobin
server core01 10.100.51.68:6655
server core02 10.100.51.70:6655

QUERY
When I telnet to haproxy from a machine(10.100.51.114) thru these commands (telnet 10.100.51.94 3333 and telnet 10.100.51.94 4444) , I can see the connection request on haproxy machine but the request are not then forwarding to the backend machines

You have a http backend, and you are sending non-http traffic to it.
Try using a tcp backend perhaps.


TCP works but the http is not working

It might be good if you explain the full story of what it is you are trying to achieve, and what the (web) infrastructure looks like.

That way, whoever reads your message has some idea of what you are doing and we can give some decent advise.

We have very simple setup. Two backend servers are behind haproxy machine. Both backend servers have web based application running.

We tested on both machines, TCP based SSH connection working fine and doing roundrobin. However http mode is not working on same machine

Thanks to all contributors. My issue is resolved for http request as well. Following are the recommendations

1- Add check in the section of backend servers. This will show logs while systemctl status haproxy command

2- Make sure to check http connection with curl (curl -v IP:PORT) instead of telnet (curl should not return error like HTTP/1.1 500 Internal Server Error )

3- You may configure httpd/Apache application with basic website on backend servers to check connectivity between client, haproxy and backend servers OR via nc -l 80 (the nc or natcat started listening on mentioned port i.e., 80 without installing any application