Abaixo está a configuração.
Client is a linux server IP: 10.204.21.143. This server is only reachable to HA Proxy server.
HA Proxy Server IP: 10.204.24.71 (Its a Solaris 11.3 Server)
Back end Server where the FTP Server is running : 10.212.22.31 This server is only reachable to HA Proxy Server only and not to Client Server.
Configuração de proxy HA:
$ cat haproxy.cfg
global
maxconn 15000
pidfile dmshaproxy.pid
daemon
stats socket dmshaproxy.sock mode 0600 level admin
spread-checks 5
defaults
mode tcp
retries 3
maxconn 15000
contimeout 5s
clitimeout 300s
srvtimeout 300s
option contstats
listen FTP 10.204.24.71:2121
server ftp-serv00 10.212.22.31:21 check inter 20s
$
Agora posso me conectar a partir do cliente, executar o comando cd e ele funciona. mas o ls não funciona.
[root@qa-lt143 ~]# ftp 10.204.24.71 2121
Connected to 10.204.24.71 (10.204.24.71).
220 ::ffff:10.212.22.31 FTP server ready
Name (10.204.24.71:root): oracle
331 Password required for oracle
Password:
230 User oracle logged in
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd RMAN_BKP
250 CWD command successful
ftp> pwd
257 "/export/home/oracle/RMAN_BKP" is the current directory
ftp> ls
227 Entering Passive Mode (10,212,22,31,137,99). <--- This IP is of backend server. but it should be of HA-Proxy Server. Not sure why its taking the backend server.
ftp: connect: Connection timed out
ftp>
Eu vejo que quando eu faço ls toma o ip de back-end para conectar o que não é alcançável a partir do servidor do cliente. Não sei por que não está usando o IP do servidor HA-Proxy.
Também tentei o mesmo com a conexão ativa e também não funcionou. Desta vez, levou o IP do seu servidor local.
[root@qa-lt143 ~]# ftp -A 10.204.24.71 2121
Connected to 10.204.24.71 (10.204.24.71).
220 ::ffff:10.212.22.31 FTP server ready
Name (10.204.24.71:root): oracle
331 Password required for oracle
Password:
230 User oracle logged in
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd RMAN_BKP
250 CWD command successful
ftp> pwd
257 "/export/home/oracle/RMAN_BKP" is the current directory
ftp> ls
500 Illegal PORT command
ftp: bind: Address already in use
ftp> debug
Debugging on (debug=1).
ftp> ls
---> PORT 10,204,21,143,180,120
500 Illegal PORT command
ftp>
Por favor, ajude.
Tags ftp load-balancing haproxy