ProFTPD login via MySQL langsam

gulp

New Member
Hi,
ich habe folgendes Problem. Und zwar dauert die Passwortabfrage bei meinem FTP immmer so ca. 5 Sekunden.

Zur Konfiguration:
  • Authentifizierung via MySQL
  • IdentLookups off
  • UseReverseDNS off

Weiß jemand woran das liegt bzw. was man tun kann?:confused:
 
Also Plugins sind alle nötigen installiert.

Und in den logs steht auch nichts besonderes

Code:
Mär 27 20:44:51 beta proftpd[6913] beta (192.168.178.27[192.168.178.27]): FTP session opened.
Mär 27 20:44:54 beta proftpd[6913] beta (192.168.178.27[192.168.178.27]): Preparing to chroot to directory '/var/www'
Mär 27 20:44:54 beta proftpd[6913] beta (192.168.178.27[192.168.178.27]): USER ben: Login successful.
 
Mit HDD-Auslastung meinte ich zwar wieviel die Platte schreibt/liest, aber da die CPU-Load so niedrig is, interessiert das sowieso nicht.

Ist deine WLAN-Verbindung vielleicht en bissl lahm, falls du überhaupt eine hast?

Ansonsten könnts z.B. na kaputte Festplatte sein.

Wenn du dich per FTP anmeldest und dem Log im Client dort mal zuschaust, siehst du dann, was so lange dauert?
 
Leg doch einfach mal einen kleinen ftp-testzugang an und frage ueber PM hier ob mal jemand testen will/kann.
Wenn sonst alles im Gruenen-Bereich ist, wird es viel. die Verbind. sein.
 
Also Wlan kanns nicht sein der Server läuft über LAN

Kapputte Festplatte oder sonstige Hardware auch nicht da auf Server 1 und 2 mit unterschiedlicher Hardware exakt der gleiche Fehler entsteht.

Lansam ist er an diesem Punkt:

Befehl: USER test
Antwort: 331 Password required for test
Befehl: PASS ************

Log mit DebugLevel 2:

Code:
Mär 29 14:29:04 alpha proftpd[18946] alpha (95.117.0.122[95.117.0.122]): FTP session opened.
Mär 29 14:29:04 alpha proftpd[18946] alpha (95.117.0.122[95.117.0.122]): no supplemental groups found for user 'test'
Mär 29 14:29:04 alpha proftpd[18946] alpha (95.117.0.122[95.117.0.122]): no supplemental groups found for user 'test'
Mär 29 14:29:05 alpha proftpd[18946] alpha (95.117.0.122[95.117.0.122]): user 'test' authenticated by mod_sql.c
Mär 29 14:29:05 alpha proftpd[18946] alpha (95.117.0.122[95.117.0.122]): Preparing to chroot to directory '/var/ftp/test'
Mär 29 14:29:05 alpha proftpd[18946] alpha (95.117.0.122[95.117.0.122]): Environment successfully chroot()ed
Mär 29 14:29:05 alpha proftpd[18946] alpha (95.117.0.122[95.117.0.122]): mod_cap/1.0: capabilities '= cap_net_bind_service,cap_audit_write+ep'
Mär 29 14:29:05 alpha proftpd[18946] alpha (95.117.0.122[95.117.0.122]): USER test: Login successful.
Mär 29 14:29:19 alpha proftpd[18946] alpha (95.117.0.122[95.117.0.122]): FTP session closed.
Mär 29 14:29:22 alpha proftpd[18957] alpha (95.117.0.122[95.117.0.122]): FTP session opened.
Mär 29 14:29:22 alpha proftpd[18957] alpha (95.117.0.122[95.117.0.122]): no supplemental groups found for user 'test'
Mär 29 14:29:22 alpha proftpd[18957] alpha (95.117.0.122[95.117.0.122]): no supplemental groups found for user 'test'
Mär 29 14:29:24 alpha proftpd[18957] alpha (95.117.0.122[95.117.0.122]): user 'test' authenticated by mod_sql.c
Mär 29 14:29:24 alpha proftpd[18957] alpha (95.117.0.122[95.117.0.122]): Preparing to chroot to directory '/var/ftp/test'
Mär 29 14:29:24 alpha proftpd[18957] alpha (95.117.0.122[95.117.0.122]): Environment successfully chroot()ed
Mär 29 14:29:24 alpha proftpd[18957] alpha (95.117.0.122[95.117.0.122]): mod_cap/1.0: capabilities '= cap_net_bind_service,cap_audit_write+ep'
Mär 29 14:29:24 alpha proftpd[18957] alpha (95.117.0.122[95.117.0.122]): USER test: Login successful.
Mär 29 14:32:58 alpha proftpd[18957] alpha (95.117.0.122[95.117.0.122]): Entering Passive Mode (192,168,178,30,205,255).

Und nen Testzugang stelle ich auch per PN zur verfügung (fals nötig)

Ach ja und die Verbindung kann es eigentlich auch nicht sein weil das Problem innerhalb wie außerhalb des Netzwerks auftritt.
 
Huhu, weis den niemand eine Antwort?
Sonst stell ich die Frage nämlich noch in anderen Foren.
Ich möchte nur nicht das dann deswegen hier ein riesen Theater gemacht wird.

p.s. An die Admins und Moderatoren, Sorry für meine Mehrfachposts!
 
Das einzige, was eine ca. 2 Sekunden-Verzögerung laut dem Logauszug bringt, ist
Code:
Mär 29 14:29:22 alpha proftpd[18957] alpha (95.117.0.122[95.117.0.122]): no supplemental groups found for user 'test'
Mär 29 14:29:22 alpha proftpd[18957] alpha (95.117.0.122[95.117.0.122]): no supplemental groups found for user 'test'

Verifizier mal bitte, dass das Paket "proftpd-mysql" installiert ist und zeig mal, welche Module alles geladen werden.
 
Code:
sudo apt-get install proftpd-mod-mysql
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut
Lese Status-Informationen ein... Fertig
proftpd-mod-mysql ist schon die neueste Version.

Die Module:

  • mod_dynmasq.c
  • mod_quotatab.c
  • mod_ratio.c
  • mod_delay.c
  • mod_ctrls.c
  • mod_ctrls_admin.c
  • mod_mysql.c
 
Immernoch die 5 Skunden bei der Passwort abfrage!

(Ach ja kleine Nebenfrage: Ich hab gerade so nen nervigen FTP-Bot, denn blocke ich doch am besten mit Fail2Ban oder ?)
 
Hi,
ich mag es zwar eigentlich garnicht aber anscheinend kann mir ja keiner helfen.
Deswegen stell ich mal meine proftpd.conf hier rein in der hoffnung das mir jemand helfen kann.

Code:
Include /etc/proftpd/modules.conf

UseIPv6				off
IdentLookups			off
UseReverseDNS			off

DebugLevel 0

RequireValidShell               off
AllowRetrieveRestart            on
AllowStoreRestart               on
AllowOverwrite                  off

ServerName			"alpha"
ServerType			standalone
DeferWelcome			off

MultilineRFC2228		on
DefaultServer			on
ShowSymlinks			on

TimeoutNoTransfer		600
TimeoutStalled			600
TimeoutIdle			1200

DisplayLogin                    welcome.msg
DisplayChdir               	.message true
ListOptions                	"-l"

DenyFilter			\*.*/
DefaultRoot ~

Port				21

PassivePorts                  49152 65534


<IfModule mod_dynmasq.c>
</IfModule>

MaxInstances			30



User				proftpd
Group				nogroup

Umask				022  022




TransferLog /var/log/proftpd/xferlog
SystemLog   /var/log/proftpd/proftpd.log

<IfModule mod_quotatab.c>
QuotaEngine off
</IfModule>

<IfModule mod_ratio.c>
Ratios off
</IfModule>


<IfModule mod_delay.c>
DelayEngine off
</IfModule>

<IfModule mod_ctrls.c>
ControlsEngine        off
ControlsMaxClients    2
ControlsLog           /var/log/proftpd/controls.log
ControlsInterval      5
ControlsSocket        /var/run/proftpd/proftpd.sock
</IfModule>

<IfModule mod_ctrls_admin.c>
AdminControlsEngine off
</IfModule mod_mysql.c>





    SQLAuthTypes crypt

    SQLAuthenticate users*

    SQLConnectInfo xxxx@localhost xxxxx xxxxxxxxx

    SQLDefaultGID 65534

    SQLDefaultUID 65534

    SQLMinUserGID  100

    SQLMinUserUID            500

    SQLUserInfo ftp username password uid gid homedir shell
 
Steht in /etc/proftpd/modules.conf irgendwas von Bedeutung?

Ansonsten würde ich jetzt vor der Eingabe des Paßworts mal die PID des verbundenen Daemons ermitteln und dann mit
Code:
strace -r -T -p <PID>
die Laufzeit zwischen und innerhalb der einzelnen Systemcalls protokollieren.
 
modules.conf
Code:
#
# This file is used to manage DSO modules and features.
#

# This is the directory where DSO modules reside

ModulePath /usr/lib/proftpd

# Allow only user root to load and unload modules, but allow everyone
# to see which modules have been loaded

ModuleControlsACLs insmod,rmmod allow user root
ModuleControlsACLs lsmod allow user *

LoadModule mod_ctrls_admin.c
LoadModule mod_tls.c

# Install one of proftpd-mod-mysql, proftpd-mod-pgsql or any other
# SQL backend engine to use this module and the required backend.
# This module must be mandatory loaded before anyone of
# the existent SQL backeds.
LoadModule mod_sql.c

# Install proftpd-mod-ldap to use this
#LoadModule mod_ldap.c

#
# 'SQLBackend mysql' or 'SQLBackend postgres' directives are required 
# to have SQL authorization working. You can also comment out the
# unused module here, in alternative.
#

# Install proftpd-mod-mysql and decomment the previous
# mod_sql.c module to use this.
LoadModule mod_sql_mysql.c

# Install proftpd-mod-pgsql and decommen the previous 
# mod_sql.c module to use this.
#LoadModule mod_sql_postgres.c

# Install proftpd-mod-sqlite and decomment the previous
# mod_sql.c module to use this
#LoadModule mod_sql_sqlite.c

# Install proftpd-mod-odbc and decomment the previous
# mod_sql.c moduleto use this
#LoadModule mod_sql_odbc.c

LoadModule mod_radius.c
LoadModule mod_quotatab.c
LoadModule mod_quotatab_file.c

# Install proftpd-mod-ldap to use this
#LoadModule mod_quotatab_ldap.c

# Install proftpd-mod-pgsql or proftpd-mod-mysql to use this
#LoadModule mod_quotatab_sql.c
LoadModule mod_quotatab_radius.c
LoadModule mod_wrap.c
LoadModule mod_rewrite.c
LoadModule mod_load.c
LoadModule mod_ban.c
LoadModule mod_wrap2.c
LoadModule mod_wrap2_file.c
# Install proftpd-mod-pgsql or proftpd-mod-mysql to use this
#LoadModule mod_wrap2_sql.c
LoadModule mod_dynmasq.c


# keep this module the last one
LoadModule mod_ifsession.c

Mittschnitt via strace -r -T -p <PID>
Code:
Process 2242 attached - interrupt to quit
     0.000000 select(2, [1], NULL, NULL, {12, 526562}) = 1 (in [1], left {7, 360091}) <5.166489>
     5.166660 rt_sigprocmask(SIG_BLOCK, [TERM CHLD], NULL, 8) = 0 <0.000006>
     0.000043 rt_sigprocmask(SIG_UNBLOCK, [TERM CHLD], NULL, 8) = 0 <0.000004>
     0.000027 fcntl64(1, F_GETFL)       = 0x2 (flags O_RDWR) <0.000005>
     0.000023 fcntl64(1, F_SETFL, O_RDWR|O_NONBLOCK) = 0 <0.000005>
     0.000025 accept(1, 0, NULL)        = 2 <0.000015>
     0.000032 pipe([3, 4])              = 0 <0.000008>
     0.000027 rt_sigprocmask(SIG_BLOCK, [USR1 USR2 TERM CHLD], NULL, 8) = 0 <0.000004>
     0.000028 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7d03a78) = 27040 <0.000134>
     0.004494 close(2)                  = 0 <0.000075>
     0.000159 time(NULL)                = 1270594204 <0.000028>
     0.000068 close(4)                  = 0 <0.000024>
     0.000063 rt_sigprocmask(SIG_UNBLOCK, [USR1 USR2 TERM CHLD], NULL, 8) = 0 <0.000024>
     0.000078 fcntl64(1, F_GETFL)       = 0x802 (flags O_RDWR|O_NONBLOCK) <0.000023>
     0.000067 fcntl64(1, F_SETFL, O_RDWR) = 0 <0.000022>
     0.000083 lstat64("/etc/shutmsg", 0xbfe59ff4) = -1 ENOENT (No such file or directory) <0.000037>
     0.000126 select(4, [1 3], NULL, NULL, {30, 0}) = 1 (in [3], left {29, 999997}) <0.000029>
     0.000101 time(NULL)                = 1270594204 <0.000020>
     0.000055 close(3)                  = 0 <0.000029>
     0.000079 lstat64("/etc/shutmsg", 0xbfe59ff4) = -1 ENOENT (No such file or directory) <0.000032>
     0.000089 select(2, [1], NULL, NULL, {30, 0}) = ? ERESTARTNOHAND (To be restarted) <7.353951>
     7.354082 --- SIGALRM (Alarm clock) @ 0 (0) ---
     0.000143 rt_sigaction(SIGALRM, {0x805b320, [], SA_INTERRUPT}, NULL, 8) = 0 <0.000051>
     0.000119 rt_sigaction(SIGALRM, NULL, {0x805b320, [], SA_INTERRUPT}, 8) = 0 <0.000021>
     0.000079 rt_sigaction(SIGALRM, {0x805b320, [], SA_INTERRUPT}, NULL, 8) = 0 <0.000026>
     0.000075 time(NULL)                = 1270594211 <0.000020>
     0.000056 alarm(30)                 = 0 <0.000022>
     0.000059 sigreturn()               = ? (mask now []) <0.000023>
     0.000085 rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0 <0.000026>
     0.000074 select(0, NULL, NULL, NULL, {0, 200000}) = 0 (Timeout) <0.200236>
     0.200327 rt_sigprocmask(SIG_UNBLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0 <0.000025>
     0.000086 alarm(0)                  = 30 <0.000023>
     0.000060 time(NULL)                = 1270594211 <0.000019>
     0.000062 rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0 <0.000026>
     0.000076 setresuid32(-1, 0, -1)    = 0 <0.000024>
     0.000064 setresgid32(-1, 0, -1)    = 0 <0.000021>
     0.000058 rt_sigprocmask(SIG_UNBLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0 <0.000025>
     0.000071 open("/var/run/proftpd/proftpd.scoreboard", O_RDWR|O_LARGEFILE) = 2 <0.000042>
     0.000095 rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0 <0.000026>
     0.000081 geteuid32()               = 0 <0.000022>
     0.000054 setresgid32(-1, 65534, -1) = 0 <0.000017>
     0.000047 setresuid32(-1, 114, -1)  = 0 <0.000017>
     0.000046 rt_sigprocmask(SIG_UNBLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0 <0.000019>
     0.000058 fcntl64(2, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}, 0xbfe5a420) = 0 <0.000022>
     0.000064 _llseek(2, 16, [16], SEEK_SET) = 0 <0.000017>
     0.000059 rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0 <0.000018>
     0.000056 setresuid32(-1, 0, -1)    = 0 <0.000016>
     0.000047 setresgid32(-1, 0, -1)    = 0 <0.000016>
     0.000046 rt_sigprocmask(SIG_UNBLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0 <0.000018>
     0.000056 read(2, "\240i\0\0r\0\0\0\376\377\0\0cem\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 520) = 520 <0.000021>
     0.000080 kill(27040, SIG_0)        = 0 <0.000018>
     0.000048 _llseek(2, 0, [536], SEEK_CUR) = 0 <0.000016>
     0.000051 read(2, "", 520)          = 0 <0.000016>
     0.000048 rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0 <0.000018>
     0.000056 geteuid32()               = 0 <0.000015>
     0.000045 setresgid32(-1, 65534, -1) = 0 <0.000017>
     0.000046 setresuid32(-1, 114, -1)  = 0 <0.000016>
     0.000046 rt_sigprocmask(SIG_UNBLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0 <0.000018>
     0.000056 fcntl64(2, F_SETLK64, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}, 0xbfe5a420) = 0 <0.000021>
     0.000059 close(2)                  = 0 <0.000019>
     0.000053 time(NULL)                = 1270594211 <0.000017>
     0.000047 alarm(19)                 = 0 <0.000018>
     0.000061 lstat64("/etc/shutmsg", 0xbfe59ff4) = -1 ENOENT (No such file or directory) <0.000028>
     0.000079 select(2, [1], NULL, NULL, {30, 0}) = ? ERESTARTNOHAND (To be restarted) <17.994830>
    17.994968 --- SIGCHLD (Child exited) @ 0 (0) ---
     0.000072 rt_sigprocmask(SIG_BLOCK, [TERM CHLD], NULL, 8) = 0 <0.000062>
     0.000204 waitpid(-1, NULL, WNOHANG) = 27040 <0.000032>
     0.000076 waitpid(-1, NULL, WNOHANG) = -1 ECHILD (No child processes) <0.000020>
     0.000062 rt_sigprocmask(SIG_UNBLOCK, [TERM CHLD], NULL, 8) = 0 <0.000024>
     0.000185 rt_sigaction(SIGCHLD, {0x8053720, [CHLD], SA_RESTART}, {0x8053720, [CHLD], SA_RESTART}, 8) = 0 <0.000035>
     0.000104 sigreturn()               = ? (mask now []) <0.000025>
     0.000084 rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0 <0.000026>
     0.000073 select(0, NULL, NULL, NULL, {0, 200000}) = 0 (Timeout) <0.200336>
     0.200430 rt_sigprocmask(SIG_UNBLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0 <0.000026>
     0.000087 rt_sigprocmask(SIG_BLOCK, [TERM CHLD], NULL, 8) = 0 <0.000024>
     0.000069 waitpid(-1, NULL, WNOHANG) = -1 ECHILD (No child processes) <0.000019>
     0.000063 rt_sigprocmask(SIG_UNBLOCK, [TERM CHLD], NULL, 8) = 0 <0.000023>
     0.000078 lstat64("/etc/shutmsg", 0xbfe59ff4) = -1 ENOENT (No such file or directory) <0.000034>
     0.000091 select(2, [1], NULL, NULL, {30, 0}) = ? ERESTARTNOHAND (To be restarted) <0.803241>
     0.803369 --- SIGALRM (Alarm clock) @ 0 (0) ---
     0.000134 rt_sigaction(SIGALRM, {0x805b320, [], SA_INTERRUPT}, NULL, 8) = 0 <0.000050>
     0.000114 rt_sigaction(SIGALRM, NULL, {0x805b320, [], SA_INTERRUPT}, 8) = 0 <0.000021>
     0.000073 rt_sigaction(SIGALRM, {0x805b320, [], SA_INTERRUPT}, NULL, 8) = 0 <0.000024>
     0.000069 time(NULL)                = 1270594230 <0.000019>
     0.000054 alarm(19)                 = 0 <0.000021>
     0.000058 sigreturn()               = ? (mask now []) <0.000024>
     0.000085 rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0 <0.000025>
     0.000073 select(0, NULL, NULL, NULL, {0, 200000}) = 0 (Timeout) <0.200238>
     0.200334 rt_sigprocmask(SIG_UNBLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0 <0.000026>
     0.000086 alarm(0)                  = 19 <0.000024>
     0.000061 time(NULL)                = 1270594231 <0.000020>
     0.000057 time(NULL)                = 1270594231 <0.000020>
     0.000055 time(NULL)                = 1270594231 <0.000020>
     0.000055 time(NULL)                = 1270594231 <0.000020>
     0.000055 alarm(10)                 = 0 <0.000022>
     0.000070 lstat64("/etc/shutmsg", 0xbfe59ff4) = -1 ENOENT (No such file or directory) <0.000034>
     0.000092 select(2, [1], NULL, NULL, {30, 0}
 
Back
Top