LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-25-2016, 12:11 AM   #1
_mz
Member
 
Registered: Jul 2013
Posts: 37

Rep: Reputation: Disabled
Multiple files upload to FTP fails


I have a strange issue whereby my customer cannot upload a very small xml file to FTP server (passive mode).

No problem if manual upload a single xml file one bye one. The issue occur whenever our customer upload multiple xml files simultaneously using third party tool. Let say he uploads 30 files but at least 1 file will be failed with error below:

Code:
    Thu Aug 25 11:58:07 2016 [pid 21870] [user1] FTP command:  Client "x.x.x.x", "PASV"
    Thu Aug 25 11:58:07 2016 [pid 21870] [user1] FTP response:   Client "x.x.x.x", "227 Entering Passive Mode (x,x,x,x,121,4)"
    Thu Aug 25 11:58:07 2016 [pid 21870] [user1] FTP command:  Client "x.x.x.x", "STOR ZM02/Inbound/SalesByReceipt/POS_Sales_1794267_20160825-11524141.xml"
    Thu Aug 25 11:58:07 2016 [pid 21870] [user1] FTP response: Client "x.x.x.x", "150 Ok to send data."
    Thu Aug 25 12:03:07 2016 [pid 21870] [user1] FTP response: Client "x.x.x.x", "421 Data timeout. Reconnect. Sorry."`
user1 put a xml file, FTP response with "150 Ok to send data". 5 mins later FTP terminated the session (data_connection_timeout=300 is set) due to it did not receive any file. This is normal behavior for the data time out.

What is strange here is why User1 cannot upload a small file. 5 mins is more than enough to let a small xml file being transferred.

Here is vsftpd.conf:

Code:
	write_enable=YES
	dirmessage_enable=YES
	nopriv_user=ftpsecure
	ls_recurse_enable=YES
	local_enable=YES
	local_umask=000
	chroot_local_user=YES
	local_max_rate=256000
	syslog_enable=NO
	log_ftp_protocol=YES
	xferlog_enable=NO
	vsftpd_log_file=/var/log/vsftpd.log
	xferlog_std_format=YES
	xferlog_file=/var/log/xferlog
	dual_log_enable=YES
	setproctitle_enable=YES
	connect_from_port_20=YES
	idle_session_timeout=600
	data_connection_timeout=300
	async_abor_enable=YES
	ascii_upload_enable=YES
	ascii_download_enable=YES
	pasv_enable=YES
	pam_service_name=vsftpd
	listen=YES
	ssl_enable=YES
	pasv_min_port=30000
	pasv_max_port=31000
	userlist_enable=YES
	userlist_file=/etc/vsftpd.userlist
	userlist_deny=NO
	rsa_cert_file=/etc/ssl/servercerts/servercert.pem
	rsa_private_key_file=/etc/ssl/servercerts/serverkey.pem
	allow_anon_ssl=NO
	force_local_data_ssl=YES
	force_local_logins_ssl=YES
	ssl_tlsv1=YES
	ssl_sslv2=NO
	ssl_sslv3=NO
	ssl_ciphers=HIGH
	listen_port=7000
	chmod_enable=NO
	pasv_promiscuous=YES
	user_config_dir=/etc/vsftpd_user_conf
Note1: We have allowed passive port 30000-31000 in our firewall.
Note2: customer uploads file from internal server. In vsftpd.log x.x.x.x is customer's public IP. They are doing NAT from internal server to public IP.
 
Old 08-27-2016, 04:34 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by _mz View Post
I have a strange issue whereby my customer cannot upload a very small xml file to FTP server (passive mode).
No problem if manual upload a single xml file one bye one. The issue occur whenever our customer upload multiple xml files simultaneously using third party tool. Let say he uploads 30 files but at least 1 file will be failed with error below:
Code:
    Thu Aug 25 11:58:07 2016 [pid 21870] [user1] FTP command:  Client "x.x.x.x", "PASV"
    Thu Aug 25 11:58:07 2016 [pid 21870] [user1] FTP response:   Client "x.x.x.x", "227 Entering Passive Mode (x,x,x,x,121,4)"
    Thu Aug 25 11:58:07 2016 [pid 21870] [user1] FTP command:  Client "x.x.x.x", "STOR ZM02/Inbound/SalesByReceipt/POS_Sales_1794267_20160825-11524141.xml"
    Thu Aug 25 11:58:07 2016 [pid 21870] [user1] FTP response: Client "x.x.x.x", "150 Ok to send data."
    Thu Aug 25 12:03:07 2016 [pid 21870] [user1] FTP response: Client "x.x.x.x", "421 Data timeout. Reconnect. Sorry."`
user1 put a xml file, FTP response with "150 Ok to send data". 5 mins later FTP terminated the session (data_connection_timeout=300 is set) due to it did not receive any file. This is normal behavior for the data time out. What is strange here is why User1 cannot upload a small file. 5 mins is more than enough to let a small xml file being transferred. Here is vsftpd.conf:
Code:
	write_enable=YES
	dirmessage_enable=YES
	nopriv_user=ftpsecure
	ls_recurse_enable=YES
	local_enable=YES
	local_umask=000
	chroot_local_user=YES
	local_max_rate=256000
	syslog_enable=NO
	log_ftp_protocol=YES
	xferlog_enable=NO
	vsftpd_log_file=/var/log/vsftpd.log
	xferlog_std_format=YES
	xferlog_file=/var/log/xferlog
	dual_log_enable=YES
	setproctitle_enable=YES
	connect_from_port_20=YES
	idle_session_timeout=600
	data_connection_timeout=300
	async_abor_enable=YES
	ascii_upload_enable=YES
	ascii_download_enable=YES
	pasv_enable=YES
	pam_service_name=vsftpd
	listen=YES
	ssl_enable=YES
	pasv_min_port=30000
	pasv_max_port=31000
	userlist_enable=YES
	userlist_file=/etc/vsftpd.userlist
	userlist_deny=NO
	rsa_cert_file=/etc/ssl/servercerts/servercert.pem
	rsa_private_key_file=/etc/ssl/servercerts/serverkey.pem
	allow_anon_ssl=NO
	force_local_data_ssl=YES
	force_local_logins_ssl=YES
	ssl_tlsv1=YES
	ssl_sslv2=NO
	ssl_sslv3=NO
	ssl_ciphers=HIGH
	listen_port=7000
	chmod_enable=NO
	pasv_promiscuous=YES
	user_config_dir=/etc/vsftpd_user_conf
Note1: We have allowed passive port 30000-31000 in our firewall.
Note2: customer uploads file from internal server. In vsftpd.log x.x.x.x is customer's public IP. They are doing NAT from internal server to public IP.
If FTP is working, I'd focus more on how the customer is sending the file(s), rather than on FTP itself. Are they using a standard FTP client, or a 'drag-n-drop' client like Filezilla? Or something homegrown that they wrote? Can they send smaller files of another data type?
 
Old 08-29-2016, 11:24 PM   #3
_mz
Member
 
Registered: Jul 2013
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
If FTP is working, I'd focus more on how the customer is sending the file(s), rather than on FTP itself. Are they using a standard FTP client, or a 'drag-n-drop' client like Filezilla? Or something homegrown that they wrote? Can they send smaller files of another data type?
It is a coding from visual studio .net system not by FTP client GUI. They can send file if manual transfer one by one. Other people do not have such issue. I just want to make sure that if something needs to be done on FTP server side specifically.

Anyway, I already asked them to check their coding.
 
Old 08-30-2016, 07:28 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by _mz View Post
It is a coding from visual studio .net system not by FTP client GUI. They can send file if manual transfer one by one. Other people do not have such issue. I just want to make sure that if something needs to be done on FTP server side specifically. Anyway, I already asked them to check their coding.
Well, if it's working for ONE file, and others are not having any issues, it's pretty obvious the FTP server isn't having any issues.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ftp upload multiple files at once ted_chou12 Linux - Software 4 11-17-2011 11:34 PM
Multiple FTP Upload Socket Error lives4him06 Linux - Networking 1 02-25-2010 09:24 AM
Large FTP upload slows and fails. lives4him06 Linux - Networking 2 02-25-2010 09:23 AM
C++: how to upload files using ftp matiasar Programming 3 02-25-2009 05:01 AM
upload files on ftp zafar466 Programming 2 12-14-2006 07:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration