LINUX.ORG.RU
решено ФорумAdmin

vsftpd закачка виснет на 65%


0

1

Странная штука, может из-за пассивного режима. В общем закачка виснет на 65% когда качаю с офиса, сервер стоит в инете, когда качаю из дома то все нормально, хоть на работу не ходи :-) Клиент lftp, сервер vsftpd. lftp skipterm0001@62.109.20.90:~/skipterm0001> get 19.08.2011-08.13.39-CmdClientData.command 4394!!! байта перемещены за 302!!! секунды (15б/с)

Вот лог:

Mon Aug 22 09:30:44 2011 [pid 7745] [term0001] FTP response: Client "xxx.xx.xx.xxx", "331 Please specify the password."
Mon Aug 22 09:30:44 2011 [pid 7745] [term0001] FTP command: Client "xxx.xx.xx.xxx", "PASS <password>"
Mon Aug 22 09:30:44 2011 [pid 7744] [term0001] OK LOGIN: Client "xxx.xx.xx.xxx"
Mon Aug 22 09:30:44 2011 [pid 7755] [term0001] FTP response: Client "xxx.xx.xx.xxx", "230 Login successful."
Mon Aug 22 09:30:44 2011 [pid 7755] [term0001] FTP command: Client "xxx.xx.xx.xxx", "TYPE I"
Mon Aug 22 09:30:44 2011 [pid 7755] [term0001] FTP response: Client "xxx.xx.xx.xxx7", "200 Switching to Binary mode."
Mon Aug 22 09:30:44 2011 [pid 7755] [term0001] FTP command: Client "xxx.xx.xx.xxx", "CWD skipterm0001"
Mon Aug 22 09:30:44 2011 [pid 7755] [term0001] FTP response: Client "xxx.xx.xx.xxx", "250 Directory successfully changed."
Mon Aug 22 09:30:44 2011 [pid 7755] [term0001] FTP command: Client "xxx.xx.xx.xxx", "MDTM 19.08.2011-08.13.08-CmdClientData.command"
Mon Aug 22 09:30:44 2011 [pid 7755] [term0001] FTP response: Client "xxx.xx.xx.xxx", "213 20110819081308"
Mon Aug 22 09:30:44 2011 [pid 7755] [term0001] FTP command: Client "xxx.xx.xx.xxx", "SIZE 19.08.2011-08.13.08-CmdClientData.command"
Mon Aug 22 09:30:44 2011 [pid 7755] [term0001] FTP response: Client "xxx.xx.xx.xxx", "213 4394"
Mon Aug 22 09:30:45 2011 [pid 7755] [term0001] FTP command: Client "xxx.xx.xx.xxx", "PASV"
Mon Aug 22 09:30:45 2011 [pid 7755] [term0001] FTP response: Client "213.88.21.247", "227 Entering Passive Mode (62,109,20,90,248,96)."
Mon Aug 22 09:30:45 2011 [pid 7755] [term0001] FTP command: Client "xxx.xx.xx.xxx", "RETR 19.08.2011-08.13.08-CmdClientData.command"
Mon Aug 22 09:30:45 2011 [pid 7755] [term0001] FTP response: Client "xxx.xx.xx.xxx", "150 Opening BINARY mode data connection for 19.08.2011-08.13.08-CmdClientData.command (4394 bytes)."
В логе типа все окей.

Вот конфиг vsftp:

listen=YES
listen_address=xx.xxx.xx.xx
anonymous_enable=NO
local_enable=YES
virtual_use_local_privs=YES
write_enable=YES
guest_enable=YES
user_sub_token=$USER
local_root=/srv/ftp
hide_ids=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
local_umask=022
anon_umask=0000
chown_upload_mode=0777
file_open_mode=0777
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd

log_ftp_protocol=YES

Посоветуйте как отловить проблему, почему из офиса я с любого компа так долго не могу скачать файл? Соединение с инетом проводное толщина мегабит/сек.

★★★★★

Ответ на: комментарий от post-factum

Добавил опцию pasv_enable=NO все заработало хорошо, но все таки работать без пассивного режима не хотелось бы, предлагаешь поиграть с MTU? а на каком интерфейсе серверном или клиентском?

splinter ★★★★★
() автор топика
Ответ на: комментарий от post-factum

блин, после того как выключил пассивный режим программа работающая через фтп вообще не может к нему приконнектится:

Mon Aug 22 10:24:26 2011 [pid 28626] CONNECT: Client "xxx.xx.xx.xxx"
Mon Aug 22 10:24:26 2011 [pid 28626] FTP response: Client "xxx.xx.xx.xxx", "220 (vsFTPd 2.2.2)"
Mon Aug 22 10:24:26 2011 [pid 28626] FTP command: Client "xxx.xx.xx.xxx", "USER term0001"
Mon Aug 22 10:24:26 2011 [pid 28626] [term0001] FTP response: Client "xxx.xx.xx.xxx", "331 Please specify the password."
Mon Aug 22 10:24:26 2011 [pid 28626] [term0001] FTP command: Client "xxx.xx.xx.xxx", "PASS <password>"
Mon Aug 22 10:24:26 2011 [pid 28625] [term0001] OK LOGIN: Client "xxx.xx.xx.xxx"
Mon Aug 22 10:24:26 2011 [pid 28627] [term0001] FTP response: Client "xxx.xx.xx.xxx", "230 Login successful."
Mon Aug 22 10:24:26 2011 [pid 28627] [term0001] FTP command: Client "xxx.xx.xx.xxx", "FEAT"
Mon Aug 22 10:24:26 2011 [pid 28627] [term0001] FTP response: Client "xxx.xx.xx.xxx", "211-Features:"
Mon Aug 22 10:24:26 2011 [pid 28627] [term0001] FTP response: Client "xxx.xx.xx.xxx", " EPRT??"
Mon Aug 22 10:24:26 2011 [pid 28627] [term0001] FTP response: Client "xxx.xx.xx.xxx", " MDTM??"
Mon Aug 22 10:24:26 2011 [pid 28627] [term0001] FTP response: Client "xxx.xx.xx.xxx", " REST STREAM??"
Mon Aug 22 10:24:26 2011 [pid 28627] [term0001] FTP response: Client "xxx.xx.xx.xxx", " SIZE??"
Mon Aug 22 10:24:26 2011 [pid 28627] [term0001] FTP response: Client "xxx.xx.xx.xxx", " TVFS??"
Mon Aug 22 10:24:26 2011 [pid 28627] [term0001] FTP response: Client "xxx.xx.xx.xxx", " UTF8??"
Mon Aug 22 10:24:26 2011 [pid 28627] [term0001] FTP response: Client "xxx.xx.xx.xxx", "211 End"
Mon Aug 22 10:24:26 2011 [pid 28627] [term0001] FTP command: Client "xxx.xx.xx.xxx", "OPTS UTF8 ON"
Mon Aug 22 10:24:26 2011 [pid 28627] [term0001] FTP response: Client "xxx.xx.xx.xxx", "200 Always in UTF8 mode."
Mon Aug 22 10:24:26 2011 [pid 28627] [term0001] FTP command: Client "xxx.xx.xx.xxx", "CWD term0001"
Mon Aug 22 10:24:26 2011 [pid 28627] [term0001] FTP response: Client "xxx.xx.xx.xxx", "250 Directory successfully changed."
Mon Aug 22 10:24:26 2011 [pid 28627] [term0001] FTP command: Client "xxx.xx.xx.xxx", "TYPE A"
Mon Aug 22 10:24:26 2011 [pid 28627] [term0001] FTP response: Client "xxx.xx.xx.xxx", "200 Switching to ASCII mode."
Mon Aug 22 10:24:27 2011 [pid 28627] [term0001] FTP command: Client "xxx.xx.xx.xxx", "PASV"
Mon Aug 22 10:24:27 2011 [pid 28627] [term0001] FTP response: Client "xxx.xx.xx.xxx", "550 Permission denied."
Mon Aug 22 10:24:27 2011 [pid 28627] [term0001] FTP command: Client "xxx.xx.xx.xxx", "QUIT"
Mon Aug 22 10:24:27 2011 [pid 28627] [term0001] FTP response: Client "xxx.xx.xx.xxx", "221 Goodbye."
Mon Aug 22 10:24:53 2011 [pid 30412] CONNECT: Client "xxx.xx.xx.xxx"
Mon Aug 22 10:24:53 2011 [pid 30412] FTP response: Client "xxx.xx.xx.xxx", "220 (vsFTPd 2.2.2)"
Mon Aug 22 10:24:54 2011 [pid 30412] FTP command: Client "xxx.xx.xx.xxx", "USER term0001"
Mon Aug 22 10:24:54 2011 [pid 30412] [term0001] FTP response: Client "xxx.xx.xx.xxx", "331 Please specify the password."
Mon Aug 22 10:24:54 2011 [pid 30412] [term0001] FTP command: Client "xxx.xx.xx.xxx", "PASS <password>"
Mon Aug 22 10:24:54 2011 [pid 30410] [term0001] OK LOGIN: Client "xxx.xx.xx.xxx"
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP response: Client "xxx.xx.xx.xxx", "230 Login successful."
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP command: Client "xxx.xx.xx.xxx", "FEAT"
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP response: Client "xxx.xx.xx.xxx", "211-Features:"
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP response: Client "xxx.xx.xx.xxx", " EPRT??"
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP response: Client "xxx.xx.xx.xxx", " MDTM??"
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP response: Client "xxx.xx.xx.xxx", " REST STREAM??"
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP response: Client "xxx.xx.xx.xxx", " SIZE??"
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP response: Client "xxx.xx.xx.xxx", " TVFS??"
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP response: Client "xxx.xx.xx.xxx", " UTF8??"
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP response: Client "xxx.xx.xx.xxx", "211 End"
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP command: Client "xxx.xx.xx.xxx", "OPTS UTF8 ON"
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP response: Client "xxx.xx.xx.xxx", "200 Always in UTF8 mode."
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP command: Client "xxx.xx.xx.xxx", "CWD /incoming"
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP response: Client "xxx.xx.xx.xxx", "250 Directory successfully changed."
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP command: Client "xxx.xx.xx.xxx", "TYPE I"
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP response: Client "xxx.xx.xx.xxx", "200 Switching to Binary mode."
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP command: Client "xxx.xx.xx.xxx", "PASV"
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP response: Client "xxx.xx.xx.xxx", "550 Permission denied."
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP command: Client "xxx.xx.xx.xxx", "QUIT"
Mon Aug 22 10:24:54 2011 [pid 30423] [term0001] FTP response: Client "xxx.xx.xx.xxx", "221 Goodbye."
Пароль и учетка точно правильные.

splinter ★★★★★
() автор топика
Ответ на: комментарий от splinter

Кстати, если проблема не с MTU, то может быть сервер находится за каким-нибудь роутером? Может поможет какой-нибудь conntrack_ftp да FTP_NAT?

AnDoR ★★★★★
()
Ответ на: комментарий от AnDoR

Я так понимаю, что у вас всё печально и протокол заменить нельзя?

К сожалению нет, это прихоть разработчика.

то может быть сервер находится за каким-нибудь роутером?

Это VDS, демон крутится на виртуальном адресе:

venet0:0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:хх.хх.хх.хх  P-t-P:хх.хх.хх.хх  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

splinter ★★★★★
() автор топика
Ответ на: комментарий от splinter

> У меня в офисе ситоит 320 дир, говорю ж с дома все нормально закачивает.

Только не говори, что у тебя офис подключен через какой-нибудь pppoe.

AnDoR ★★★★★
()
Ответ на: комментарий от splinter

Насколько мне известно, в 320 dir по-умолчанию включены модули ftp_nat и т.п. Бери tcpdump, запускай на сервере и проверяй, что за пакеты приходят.

AnDoR ★★★★★
()
Ответ на: комментарий от splinter

> Это как то проверить на самом дире можно?

Я их сто лет не видел, как-то можно было, погугли на эту тему.

AnDoR ★★★★★
()
Ответ на: комментарий от AnDoR

Огромное тебе спасибо, действительно вся трабла была в dir320, перепрошил и все заработало! Еще раз спасибо :-)

splinter ★★★★★
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.