ProFTP / ProFTPD timeout / freeze / relaunch

FTP Server, File Server, DDNS, SAMBA, AFP, NFS
Post Reply
FFT
New here
Posts: 9
Joined: Sat Aug 08, 2009 6:53 am

ProFTP / ProFTPD timeout / freeze / relaunch

Post by FFT » Thu Jan 28, 2010 4:10 am

Hello,

Many qnap users complain about the Proftpd instabillity (and the fact that it is really old, unsecure and buggy) seems my problem is related to that, so I'll explain it here :

I have tremendous problem to make ProFTP be up more than 5 minutes in a row when I download backup files from a remote server.

On a remote server (in a professionnal host : OVH in France) I use duplicity, well known open source product wich makes remote backup using encrypted tar.gz files, no big deal so far, it works flawlessly on any hosts I have.

It uses the very last version of ncftp client 3.2.3

ncftp tries to PUT the files (30 MO tar.gz) on the NAS every 2 minutes (via my DSL line) it works for some minutes and then I invariably get this message from the remote host :

Code: Select all

Remote write timed out after 17334272 bytes had been sent.
Could not read reply from control connection -- timed out.
ncftpput Qbackup/xxxxxx.ovh.net/home/fft/duplicity-full.20100126T052721Z.vol88.difftar.gpg: data transfer timed out.
Could not read reply from control connection -- timed out.
ncftpput Qbackup/xxxxxx.ovh.net/home/fft/duplicity-full.20100126T052721Z.vol88.difftar.gpg: timed out while waiting for server response.


On the TS639 I can then see this on the top process :

Code: Select all

22473 nsxxxxxx D       2716  3850  0.0  0.1 proftpd
21865 nsxxxxxx D       2716  3850  0.0  0.1 proftpd
21251 nsxxxxxx S       2532  3850  0.0  0.1 proftpd


It seems that it launch a proftpd process each time the remote hosts tries to reconnect... may be normal... I don't know

And then, the listing just hang on the qnap backup folder (ls -l)

The only thing I can do is to restart manually the ProFtpd server

Code: Select all

/etc/init.d/ftp.sh restart
Shutting down FTP services:
Starting FTP services: Start rcv_port: set 139 445 20.
proftpd.
stopped


What I can affirm :

I'm using active FTP sessions (PORT vs PASV) on Port 21, so there is no trouble with the firewall and passive ports.

I have tested an alternative ftp server on the same location where is the NAS (same cable), running either filezilla server on windows, and vsftp on a debian release, both servers worked flawlessly...

My DSL line had no troubles when I made the tests (several days at different hours)

I'm really disappointed because the NAS was one of the reason I wanted it to do...

Do you have any configuration solution ?

Is it possible on install an alternative ftp server ?

When will the QNAP team upgrade or CHANGE the server version (vsftpd would do fine...)

Related posts :
viewtopic.php?f=142&t=23645&p=101902&hilit=proftpd#p101902
viewtopic.php?f=160&t=23331&p=98757&hilit=proftpd#p98757
viewtopic.php?f=161&t=13385&start=0
viewtopic.php?f=14&t=17698

Thanks

User avatar
schumaku
Guru
Posts: 43668
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: ProFTP / ProFTPD timeout / freeze / relaunch

Post by schumaku » Thu Jan 28, 2010 7:50 am

Firmware on your TS-x39?
File system on the ftp destination volume on the NAS?

FFT
New here
Posts: 9
Joined: Sat Aug 08, 2009 6:53 am

Re: ProFTP / ProFTPD timeout / freeze / relaunch

Post by FFT » Thu Jan 28, 2010 8:28 am

Hello,

TS639 Pro tested with the latest 3.2.1 Build 1231 and 3.2.0 firmwares, same results ont both. :cry:

File system on the NAS : EXT3 (default)

Thanks

FFT
New here
Posts: 9
Joined: Sat Aug 08, 2009 6:53 am

Re: ProFTP / ProFTPD timeout / freeze / relaunch

Post by FFT » Thu Jan 28, 2010 9:44 pm

Adding some informations here :

My analysis about is that duplicity tries to reconnect on the NAS and thus launch a new ftpd process, you can see in the "top" log in the status column (3rd) :

22473 nsxxxxxx D 2716 3850 0.0 0.1 proftpd => uninterruptible sleep <= bugged
21865 nsxxxxxx D 2716 3850 0.0 0.1 proftpd => uninterruptible sleep <= bugged
21251 nsxxxxxx S 2532 3850 0.0 0.1 proftpd => Sleeping <= good one

During a working download process, the command "ps ax | grep proftp" output this :

24283 guest 3868 S proftpd: (accepting connections)
24284 admin 1096 S /usr/local/sbin/proftpd -n
25425 nsxxxxxx 2760 S proftpd: nsxxxxxx.ovh.net - 91.xxx.xxx.xxx: STOR Qbackup/nsxxxxxx.ovh.net/home/fft/duplicity-full.duplicity-full.20100126T052721Z.vol231

Just when proftp hangs you can read this :

24283 guest 3868 S proftpd: (accepting connections)
24284 admin 1096 S /usr/local/sbin/proftpd -n
25649 nsxxxxxx 2760 S proftpd: nsxxxxxx.ovh.net - 91.xxx.xxx.xxx: STOR Qbackup/nsxxxxxx.ovh.net/home/fft/duplicity-full.20100126T052721Z.vol231
26274 nsxxxxxx 2748 D proftpd: nsxxxxxx.ovh.net - 91.xxx.xxx.xxx: STOR Qbackup/nsxxxxxx.ovh.net/home/fft/duplicity-full.20100126T052721Z.vol231

The process 26274 hangs (uninterruptible sleep status) and a new process come along with the same file beeing transmitted, which does not work (the "D" 26274 process makes all proftp process hang)

And after some times I can't even do "ps ax | grep proftp" as the stdout freezes before the "D" lines !

The only solution here is to reboot the ftp server...

I also repeat that the tests I've made with the other ftp servers (vsftp, filezilla) were all successfull (using the same physical configuration)

So i maintain that there is an unknown stability problem with this proftpd version here (wich is old on this device), and cannot be changed since it's part of the QNAP firmware... May be there is a work around about this... How to install manually latest Proftpd version without breaking the box ?

Here is the configuration file (/etc/config/proftpd.conf)

ServerName "ProFTPD"
ServerType standalone
DefaultServer on
RootLogin on
Port 21
MaxInstances 30
User guest
Group guest
DefaultRoot /share
Umask 000
ShowSymlinks off
AllowOverwrite on
TimesGMT off
UseReverseDNS off
WtmpLog off
AllowStoreRestart on
TransferLog NONE
UseReverseDNS off
IdentLookups off
DisplayLogin welcome.msg
CharsetLocal UTF-8
CharsetRemote UTF-8
UseUTF8 on
TLSEngine off
TLSRequired off
TLSRSACertificateFile /etc/ssl/certs/myhost.crt
TLSRSACertificateKeyFile /etc/ssl/private/myhost.key
TLSCACertificateFile /etc/ssl/certs/myrootca.crt
TLSOptions NoCertRequest
TLSVerifyClient off
PassivePorts 55536 56559
MaxClientsPerUser 10
EnableUserWanIp on
AllowForeignAddress on

Thanks for any help

Post Reply

Return to “File Sharing”