I have a simple HAProxy config; frontend on port 21, backend to one ftp-server. the ftp-server is in passive mode, therefore once a control connection is established the data connection is handled by the backend server.
Now the problem: if I use port 21 in the frontend it is not working. If I use port 23 it is working. There is nothing else listening on port 21 (netstat -tulpn | grep :21)
here is my haproxy config I have replaced my server IP with
global
log 127.0.0.1 local0 debug
chroot /var/lib/haproxy
# user haproxy
# group haproxy
maxconn 2000
defaults
log global
mode tcp
option tcplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
frontend haproxy_in
bind *:21
default_backend haproxy_ftp
backend haproxy_ftp
balance roundrobin
mode tcp
server ftp1 <serverip>:21 check
status: active (running)
syslog from restart:
Dec 16 08:28:40 hostname systemd[1]: Stopping HAProxy Load Balancer...
Dec 16 08:28:40 hostname haproxy-systemd-wrapper[21314]: haproxy-systemd-wrapper: SIGTERM -> 21316.
Dec 16 08:28:40 hostname haproxy-systemd-wrapper[21314]: haproxy-systemd-wrapper: exit, haproxy RC=143
Dec 16 08:28:40 hostname systemd[1]: haproxy.service: main process exited, code=exited, status=143/n/a
Dec 16 08:28:40 hostname systemd[1]: Unit haproxy.service entered failed state.
Dec 16 08:28:40 hostname systemd[1]: Starting HAProxy Load Balancer...
Dec 16 08:28:40 hostname systemd[1]: Started HAProxy Load Balancer.
Dec 16 08:28:40 hostname haproxy-systemd-wrapper[22090]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds