banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Forum Index Thảo luận hệ điều hành *nix ftp list file chậm  XML
  [Question]   ftp list file chậm 21/05/2012 08:09:20 (+0700) | #1 | 263655
thuank51cc
Member

[Minus]    0    [Plus]
Joined: 13/01/2012 03:44:56
Messages: 26
Offline
[Profile] [PM]
Dear cả nhà!

Cả nhà cho mình hỏi một vấn đề sau. Có ae nào đã gặp qua hoặc biết về vấn đề này thì giúp mình với.
Số là công ty mình đang có một dự án. Bên mình cày đặt hypervm trên server chủ. Và tạo 2 vps cho 2 dự án.
Website của 2 dự án chạy bình thường, tuy nhiên ftp hoặc sử dụng winscp để copy file hoặc upload file thì rất chậm mà chính xác là không thể.
Sử dụng FTP thì cứ đến lúc list file (Response: 150 Here comes the directory listing.) thì không thể list ra file hoặc directory.
server chủ bên mình dùng hypervm version: 2.6.18-308.el5.028stab099.3
[Up] [Print Copy]
  [Question]   ftp list file chậm 21/05/2012 09:57:59 (+0700) | #2 | 263673
[Avatar]
xnohat
Moderator

Joined: 30/01/2005 13:59:19
Messages: 1210
Location: /dev/null
Offline
[Profile] [PM] [Email] [WWW] [Yahoo!] [MSN]
Đo băng thông upload của máy upload và kiểm tra xem firewall của server có giới hạn gì không

Đưa các thông số cấu hình, log liếc lên đây, chứ bồ hỏi khơi khơi không thì chỉ nhận được lời phán của thầy bói thôi
iJust clear, "What I need to do and how to do it"/i
br
brBox tán gẫu dời về: http://www.facebook.com/hvaonline
[Up] [Print Copy]
  [Question]   ftp list file chậm 21/05/2012 10:09:29 (+0700) | #3 | 263674
thuank51cc
Member

[Minus]    0    [Plus]
Joined: 13/01/2012 03:44:56
Messages: 26
Offline
[Profile] [PM]
Hi! Sr a.

firewall trên server chủ e đã remove.
hiện tại iptables đã bị disable. e test thử FTP local trên 2 con VPS thì ok.
hoặc từ con máy chủ cài hypervm vào cũng ok.
chỉ từ bên ngoài FTP là bị hiện tường như vậy.
1. Đây là cấu hình vz.conf trên server hypervm: (/etc/vz/vz.conf)
## Global parameters
VIRTUOZZO=yes
LOCKDIR=/vz/lock
DUMPDIR=/vz/dump
VE0CPUUNITS=1000
NEIGHBOUR_DEVS=all
## Logging parameters
LOGGING=yes
LOGFILE=/var/log/vzctl.log
LOG_LEVEL=0
VERBOSE=0

## Disk quota parameters
DISK_QUOTA=yes
VZFASTBOOT=no

# Disable module loading. If set, vz initscript does not load any modules.
#MODULES_DISABLED=yes

# The name of the device whose IP address will be used as source IP for CT.
# By default automatically assigned.
#VE_ROUTE_SRC_DEV="eth0"

# Controls which interfaces to send ARP requests and modify ARP tables on.
NEIGHBOUR_DEVS=detect

## Fail if there is another machine in the network with the same IP
ERROR_ON_ARPFAIL="no"

## Template parameters
TEMPLATE=/vz/template

## Defaults for containers
VE_ROOT=/vz/root/$VEID
VE_PRIVATE=/vz/private/$VEID
CONFIGFILE="basic" # Use vswap-256m on RHEL6 kernel
DEF_OSTEMPLATE="centos-5"
## Filesystem layout for new CTs: either simfs (default) or ploop
#VE_LAYOUT=ploop
## Load vzwdog module
VZWDOG="no"

## IPv4 iptables kernel modules to be enabled in CTs by default
#IPTABLES="ip_tables iptable_filter ipt_limit ipt_multiport iptable_mangle"
IPTABLES="ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ip_conntrack_ftp"
## IPv4 iptables kernel modules to be loaded by init.d/vz script
IPTABLES_MODULES="$IPTABLES"

## Enable IPv6
IPV6="no"

## IPv6 ip6tables kernel modules
IP6TABLES="ip6_tables ip6table_filter ip6table_mangle ip6t_REJECT"

2. file cau hinh sysctl.conf(/etc/sysctl.conf):
Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.all.rp_filter = 1
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.send_wwwects = 1
net.ipv4.conf.all.send_wwwects = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.default.forwarding=1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 1

# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536

# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
#net.ipv4.ip_conntrack_max=106476000
#net.ipv4.netfilter.ip_conntrack_max=12000

3. Cấu hình VSFTPD:

# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=NO
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# The target log file can be vsftpd_log_file or xferlog_file.
# This depends on setting xferlog_std_format parameter
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
"/etc/vsftpd/vsftpd.conf" 123L, 4665C
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# The name of log file when xferlog_enable=YES and xferlog_std_format=YES
# WARNING - changing this filename affects /etc/logrotate.d/vsftpd.log
#xferlog_file=/var/log/xferlog
#
# Switches between logging into vsftpd_log_file and xferlog_file files.
# NO writes to vsftpd_log_file, YES to xferlog_file
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
ascii_upload_enable=YES
ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
ls_recurse_enable=YES
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES
#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd whith two configuration files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=YES
# use localtime
use_localtime=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
pasv_promiscuous=YES
pasv_min_port=6500
pasv_max_port=6550







[Up] [Print Copy]
  [Question]   ftp list file chậm 21/05/2012 10:18:26 (+0700) | #4 | 263675
thuank51cc
Member

[Minus]    0    [Plus]
Joined: 13/01/2012 03:44:56
Messages: 26
Offline
[Profile] [PM]
Dear a!

hiện tại băng thông bên e dùng lad unlimit cho cả 2 chiều down vs upload.
Và e nghĩ ko hẳn do vấn đế upload vi FTP bị là khi nó list file.
tất cả các services khác vẫn bt, web vẫn load ok.
chỉ có giao thức FTP(port 21) Winscp(2512) là bị.
[Up] [Print Copy]
  [Question]   ftp list file chậm 21/05/2012 21:27:18 (+0700) | #5 | 263714
[Avatar]
xnohat
Moderator

Joined: 30/01/2005 13:59:19
Messages: 1210
Location: /dev/null
Offline
[Profile] [PM] [Email] [WWW] [Yahoo!] [MSN]
trong LAN access vào FTP có bình thường không ?
iJust clear, "What I need to do and how to do it"/i
br
brBox tán gẫu dời về: http://www.facebook.com/hvaonline
[Up] [Print Copy]
  [Question]   ftp list file chậm 22/05/2012 07:44:45 (+0700) | #6 | 263729
thuank51cc
Member

[Minus]    0    [Plus]
Joined: 13/01/2012 03:44:56
Messages: 26
Offline
[Profile] [PM]
Server bên e thuê của bên nc ngoài. Server này 1 giải không có mạng Lan.
e đang nghĩ có thể do hypervm nó giới hạn gói tin...
[Up] [Print Copy]
[digg] [delicious] [google] [yahoo] [technorati] [reddit] [stumbleupon]
Go to: 
 Users currently in here 
1 Anonymous

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|