Ниже представлена конфигурация.
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.
Конфигурация прокси 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
$
Теперь я могу подключиться с клиента, выполнить команду cd, и она работает. но ls не работает.
[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>
Я вижу, что когда я делаю ls, для подключения требуется внутренний IP-адрес, который недоступен с клиентского сервера. Не уверен, почему он не принимает IP-адрес прокси-сервера HA.
Также я пробовал то же самое с активным подключением, но это тоже не сработало. На этот раз он взял IP его локального сервера.
[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>
Пожалуйста помоги.