You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by Gérard Frédéric <Fr...@atosorigin.com> on 2009/06/09 14:32:09 UTC

Failed to open passive data connection

Hi All

We now use ftpserver for more than one year (Dec 10 2007 incubator version)
Everything goes well on linux, solaris and windows
But sometimes I cannot explain this exception which occurs very infrequently, on linux here :

12:10:43,034 INFO listener.FtpProtocolHandler pool-2-thread-4 - Open connection - 10.24.231.113
12:10:43,303 INFO command.PASS pool-2-thread-4 - Login success - user1
12:10:43,722 WARN command.PASV pool-2-thread-4 - Failed to open passive data connection
org.apache.ftpserver.DataConnectionException: FtpDataConnection.setPasvCommand()
        at org.apache.ftpserver.IODataConnectionFactory.initPassiveDataConnection(IODataConnectionFactory.java:182)
        at org.apache.ftpserver.command.PASV.execute(PASV.java:69)
        at org.apache.ftpserver.listener.FtpProtocolHandler.service(FtpProtocolHandler.java:203)
        at org.apache.ftpserver.listener.FtpProtocolHandler.onRequestReceived(FtpProtocolHandler.java:130)
        at org.apache.ftpserver.listener.mina.MinaFtpProtocolHandler.messageReceived(MinaFtpProtocolHandler.java:109)
        at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:569)
        at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:298)
        at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
        at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:647)
        at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:220)
        at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:266)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
        at java.lang.Thread.run(Thread.java:595)
12:10:43,782 INFO listener.FtpProtocolHandler pool-2-thread-4 - Close connection : 10.24.231.113 - user1


3 ports are configured for passive connections, in addition to the listener
There is not an explicit reason about this behavior, could it be a java memory issue or any lack of resources ?

Thanks

Frédéric



  ________________________________

Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

RE: Failed to open passive data connection

Posted by Gérard Frédéric <Fr...@atosorigin.com>.
Thank you Niklas, thank you Sai

Yes I plan to upgrade, but I don't have time now for that ...
This Dec 2007 version is ok until now Niklas, we do many transfers without any problem on several servers

I have found the reason of this issue

My data connection properties are :
config.listeners.default.data-connection.class=org.apache.ftpserver.DefaultDataConnectionConfig
config.listeners.default.data-connection.idle-time=5
config.listeners.default.data-connection.active.enable=false
#config.listeners.default.data-connection.active.local-address=localhost
#config.listeners.default.data-connection.active.local-port=20
# used by command PORT
#config.listeners.default.data-connection.active.ip-check=true
## default value = config.listeners.default.address
## config.listeners.default.data-connection.passive.address=localhost
config.listeners.default.data-connection.passive.ports=9921,9922,9923
## default value = config.listeners.default.address

At debug level, when it's ok ftpserver says :
00:00:35,108 DEBUG ftpserver.IODataConnectionFactory pool-2-thread-7 - SSL data connection created on /192.168.9.79:9921

This server runs a mysql client, and a tcpdump showed this (mmut01 is 192.168.9.79) :
tcpdump: listening on eth0
19:00:52.895625 mmut01.9921 > mytus.priv.atos.fr.3307: S 2061302194:2061302194(0) win 5840 <mss 1460,sackOK,timestamp 25
47785201[|tcp]> (DF)
19:00:52.895839 mytus.priv.atos.fr.3307 > mmut01.9921: S 1330322014:1330322014(0) ack 2061302195 win 5792 <mss 1460,sack
OK,timestamp 3550800202[|tcp]> (DF)
19:00:52.895855 mmut01.9921 > mytus.priv.atos.fr.3307: . ack 1 win 23 <nop,nop,timestamp 2547785201 3550800202> (DF)
19:00:52.897115 mytus.priv.atos.fr.3307 > mmut01.9921: P 1:48(47) ack 1 win 5792 <nop,nop,timestamp 3550800202 254778520
1> (DF) [tos 0x8]

So sometimes there's a port conflict for the dynamic and passive connection on port# 9921
I'm looking for a workaround, the best is probably to forbid mysql (or any other application) to use the 3 passive ports of ftpserver as local ports


-----Message d'origine-----
De : Niklas Gustavsson [mailto:niklas@protocol7.com]
Envoyé : mardi 9 juin 2009 22:32
À : ftpserver-users@mina.apache.org
Objet : Re: Failed to open passive data connection

On Tue, Jun 9, 2009 at 10:08 PM, Sai
Pullabhotla<sa...@jmethods.com> wrote:
> But don't you think that having just 3 passive ports available would pose a
> problem if there are more than 3 concurrent data connections open? I would
> like to be educated a little bit If I'm not understanding the source from
> the trunk correctly.

You're understanding is correct :-) We got a patch for handling
multiple connections per port, but it have not yet been applied
(scheduled for 1.1.0). So, yeah, it would be a problem. But since
Gerard only seem to get this on some environments, I'm thinking it
might also be related to socket handling, an area were we have closed
many bugs.

/niklas



Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.


Re: Failed to open passive data connection

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Tue, Jun 9, 2009 at 10:08 PM, Sai
Pullabhotla<sa...@jmethods.com> wrote:
> But don't you think that having just 3 passive ports available would pose a
> problem if there are more than 3 concurrent data connections open? I would
> like to be educated a little bit If I'm not understanding the source from
> the trunk correctly.

You're understanding is correct :-) We got a patch for handling
multiple connections per port, but it have not yet been applied
(scheduled for 1.1.0). So, yeah, it would be a problem. But since
Gerard only seem to get this on some environments, I'm thinking it
might also be related to socket handling, an area were we have closed
many bugs.

/niklas

Re: Failed to open passive data connection

Posted by Sai Pullabhotla <sa...@jmethods.com>.
But don't you think that having just 3 passive ports available would pose a
problem if there are more than 3 concurrent data connections open? I would
like to be educated a little bit If I'm not understanding the source from
the trunk correctly.

Thank you.

Sai Pullabhotla
www.jMethods.com



On Tue, Jun 9, 2009 at 1:51 PM, Niklas Gustavsson <ni...@protocol7.com>wrote:

> 2009/6/9 Gérard Frédéric <Fr...@atosorigin.com>:
> > We now use ftpserver for more than one year (Dec 10 2007 incubator
> version)
>
> We have fixed tons of issues since 2007. Would it be at all possible
> for you to upgrade to the latest version?
>
> /niklas
>

Re: Failed to open passive data connection

Posted by Niklas Gustavsson <ni...@protocol7.com>.
2009/6/9 Gérard Frédéric <Fr...@atosorigin.com>:
> We now use ftpserver for more than one year (Dec 10 2007 incubator version)

We have fixed tons of issues since 2007. Would it be at all possible
for you to upgrade to the latest version?

/niklas

Re: Failed to open passive data connection

Posted by David Latorre <dv...@gmail.com>.
This is strange .

Our codebase has changed a lot since incubator and actually I'm not
familiar with your version, but i'd say that support for port-reuse in
passive mode was just recently added. Are you sure that your stress
tests do actually use passive mode rather than active?

I think Niklas has fixed several issues with passive connections, so
he might be able to give you a diagnosis ... Otherwise I would ask
for:
 - A log file in DEBUG mode ( Basically I'd like to see the ports and
ips being used)
 - The configuration you're using ( port-range etc.)
 - I wonder if you keep the source code of the version you're using ,
or at least, can give us a specific version so we can try to get the
sources.

If i had to make a wild guess, taking into account you're using   100
servers! (I guess several of them are linux servers, right? not only
the one which is failing ...)  I'd suggest that you ran out of
available socket descriptors or that the port FtpServer is trying to
use for the data transfer is already in use.

Anyway, there should be something going on there as there are quite a
few connections in CLOSE_WAIT  mode- i guess they aren't being closed
properly.




2009/6/9 Gérard Frédéric <Fr...@atosorigin.com>:
> Thanks Sai
>
> Arrrh I don't think it's the reason
> Stress benths have been done on several Os with this configuration, with many concurrent transfers, and there were no any problem
> Here we test only from on client, without concurrent transfers (so just one passive port is used once)
> More precisely, the server hangs after 2 issues, and a lsof shows none passive ports are in use
> We use ftpserver in more than 100 servers, we observe this only on a lfs 32bit linux server, jre5u9 (no ssl issue about it)
> Do you think it could an unstable behavior of a firewall ?
> Maybe these logs and lsof could help you :
>
>
> SERVER LSOF
> [root@mmut01] /usr/local/aft/log]# lsof -p 22135
> COMMAND   PID USER   FD   TYPE     DEVICE     SIZE       NODE NAME
> java    22135 root  cwd    DIR      104,3     4096     249675 /usr/local/aft
> java    22135 root  rtd    DIR      104,1     4096          2 /
> java    22135 root  txt    REG      104,3    64248      67715 /usr/java/jdk1.5.0_09/bin/exec/java
> java    22135 root  mem    REG      104,3    25000      67866 /usr/java/jdk1.5.0_09/jre/lib/i386/libnio.so
> java    22135 root  mem    REG      104,3    71732      67865 /usr/java/jdk1.5.0_09/jre/lib/i386/libnet.so
> java    22135 root  mem    REG      104,3    28694     249721 /usr/local/aft/lib/aft.jar
> java    22135 root  mem    REG       0,13   124724    2197211 /LOCAL/classes/jar/xerces/xml-apis-2.6.2.jar (dmz-data01:/vol/vol0/LOCAL_classes)
> java    22135 root  mem    REG      104,3   232168     249722 /usr/local/aft/lib/aftd.jar
> java    22135 root  mem    REG      104,3   300128     249723 /usr/local/aft/lib/backport-util-concurrent31.jar
> java    22135 root  mem    REG      104,3    79441     249724 /usr/local/aft/lib/ftp4che071gen15.jar
> java    22135 root  mem    REG      104,3    14119     249725 /usr/local/aft/lib/ftplet-aftd.jar
> java    22135 root  mem    REG      104,3   391834     249726 /usr/local/aft/lib/log4j-1.2.15gen15.jar
> java    22135 root  mem    REG      104,3   276847     249727 /usr/local/aft/lib/mina-core-1.0.8.jar
> java    22135 root  mem    REG      104,3    16094     249728 /usr/local/aft/lib/mina-filter-ssl-1.0.8.jar
> java    22135 root  mem    REG      104,3    15345     249729 /usr/local/aft/lib/slf4j-api-1.4.3gen15.jar
> java    22135 root  mem    REG      104,3     8601     249730 /usr/local/aft/lib/slf4j-log4j12-1.4.3gen15.jar
> java    22135 root  mem    REG      104,3     7991     249731 /usr/local/aft/lib/sysmm-1-1-0b1.jar
> java    22135 root  mem    REG      104,3   175811      67798 /usr/java/jdk1.5.0_09/jre/lib/ext/sunpkcs11.jar
> java    22135 root  mem    REG      104,3   158417      67797 /usr/java/jdk1.5.0_09/jre/lib/ext/sunjce_provider.jar
> java    22135 root  mem    REG      104,3   802388      67796 /usr/java/jdk1.5.0_09/jre/lib/ext/localedata.jar
> java    22135 root  mem    REG      104,3     8176      67795 /usr/java/jdk1.5.0_09/jre/lib/ext/dnsns.jar
> java    22135 root  mem    REG      104,3  1037385      67794 /usr/java/jdk1.5.0_09/jre/lib/ext/bcprov-jdk15-131.jar
> java    22135 root  mem    REG      104,3  8843542      67785 /usr/java/jdk1.5.0_09/jre/lib/charsets.jar
> java    22135 root  mem    REG      104,3    81946      67906 /usr/java/jdk1.5.0_09/jre/lib/jce.jar
> java    22135 root  mem    REG      104,3   542560      67907 /usr/java/jdk1.5.0_09/jre/lib/jsse.jar
> java    22135 root  mem    REG      104,3 39935094      67936 /usr/java/jdk1.5.0_09/jre/lib/rt.jar
> java    22135 root  mem    REG       0,13    27052    6111554 /LOCAL/classes/jar/jaxp/jaxp-api-1.2.jar (dmz-data01:/vol/vol0/LOCAL_classes)
> java    22135 root  mem    REG       0,13  1010675    2197212 /LOCAL/classes/jar/xerces/xercesImpl-2.6.2.jar (dmz-data01:/vol/vol0/LOCAL_classes)
> java    22135 root  mem    REG       0,13  1781922    2197215 /LOCAL/classes/jar/xalan/xalan-2.6.0.jar (dmz-data01:/vol/vol0/LOCAL_classes)
> java    22135 root  mem    REG      104,3    64968      67871 /usr/java/jdk1.5.0_09/jre/lib/i386/libzip.so
> java    22135 root  mem    REG      104,3   136824      67851 /usr/java/jdk1.5.0_09/jre/lib/i386/libjava.so
> java    22135 root  mem    REG      104,3    48520      67870 /usr/java/jdk1.5.0_09/jre/lib/i386/libverify.so
> java    22135 root  mem    REG      104,6    32768       3410 /tmp/hsperfdata_root/22135
> java    22135 root  mem    REG      104,1   125882      98474 /lib/libnss_files-2.3.4.so
> java    22135 root  mem    REG      104,1   366424      98468 /lib/libnsl-2.3.4.so
> java    22135 root  mem    REG      104,3    27144      67873 /usr/java/jdk1.5.0_09/jre/lib/i386/native_threads/libhpi.so
> java    22135 root  mem    REG      104,1   519618      98466 /lib/libm-2.3.4.so
> java    22135 root  mem    REG      104,3  7397185      67876 /usr/java/jdk1.5.0_09/jre/lib/i386/server/libjvm.so
> java    22135 root  mem    REG      104,1  5268520      98460 /lib/libc-2.3.4.so
> java    22135 root  mem    REG      104,1    53141      98464 /lib/libdl-2.3.4.so
> java    22135 root  mem    REG      104,1   499480      98482 /lib/libpthread-2.3.4.so
> java    22135 root  mem    REG      104,1   349237      98453 /lib/ld-2.3.4.so
> java    22135 root    0r   CHR        1,3               65542 /dev/null
> java    22135 root    1w   REG      104,3       34      98479 /usr/local/aft/log/aftServ.sh.log
> java    22135 root    2w   REG      104,3       34      98479 /usr/local/aft/log/aftServ.sh.log
> java    22135 root    3r   CHR        1,8               65547 /dev/random
> java    22135 root    4r   CHR        1,9               65548 /dev/urandom
> java    22135 root    5u  IPv4 1035966280                 TCP mmut01:9920->tdintc01s.priv.atos.fr:11881 (ESTABLISHED)
> java    22135 root    6w   REG      104,3   540466      98635 /usr/local/aft/log/aftServ.log
> java    22135 root    7u  IPv4 1035802229                 TCP localhost:4335->localhost:9930 (ESTABLISHED)
> java    22135 root    8u  sock        0,4          1035802227 can't identify protocol
> java    22135 root    9r  FIFO        0,5          1035803180 pipe
> java    22135 root   10w  FIFO        0,5          1035803180 pipe
> java    22135 root   11u  IPv4 1035803190                 TCP *:9920 (LISTEN)
> java    22135 root   12r  FIFO        0,5          1035966281 pipe
> java    22135 root   13w  FIFO        0,5          1035966281 pipe
> java    22135 root   14u  IPv4 1036927696                 TCP mmut01:9920->tdintc01s.priv.atos.fr:45596 (CLOSE_WAIT)
> java    22135 root   15u  unix 0xce3bca80          1035808999 socket
> java    22135 root   16r  FIFO        0,5          1036927697 pipe
> java    22135 root   17w  FIFO        0,5          1036927697 pipe
> java    22135 root   18u  IPv4 1037036176                 TCP mmut01:9920->tdintc01s.priv.atos.fr:45597 (CLOSE_WAIT)
> java    22135 root   19r  FIFO        0,5          1037036177 pipe
> java    22135 root   20w  FIFO        0,5          1037036177 pipe
> java    22135 root   21u  IPv4 1037091229                 TCP mmut01:9920->tdintc01s.priv.atos.fr:45598 (CLOSE_WAIT)
> java    22135 root   22r  FIFO        0,5          1037091230 pipe
> java    22135 root   23w  FIFO        0,5          1037091230 pipe
> java    22135 root   24u  IPv4 1037145509                 TCP mmut01:9920->tdintc01s.priv.atos.fr:32754 (CLOSE_WAIT)
> java    22135 root   25r  FIFO        0,5          1037145510 pipe
> java    22135 root   26w  FIFO        0,5          1037145510 pipe
> java    22135 root   27u  IPv4 1037197963                 TCP mmut01:9920->tdintc01s.priv.atos.fr:32755 (CLOSE_WAIT)
> java    22135 root   28u  IPv4 1037253780                 TCP mmut01:9920->tdintc01s.priv.atos.fr:32756 (CLOSE_WAIT)
> java    22135 root   29u  IPv4 1037308681                 TCP mmut01:9920->tdintc01s.priv.atos.fr:32757 (CLOSE_WAIT)
> java    22135 root   30u  IPv4 1037363860                 TCP mmut01:9920->tdintc01s.priv.atos.fr:32758 (CLOSE_WAIT)
> java    22135 root   31u  IPv4 1037418631                 TCP mmut01:9920->tdintc01s.priv.atos.fr:3309 (CLOSE_WAIT)
> java    22135 root   32u  IPv4 1037473644                 TCP mmut01:9920->tdintc01s.priv.atos.fr:3310 (CLOSE_WAIT)
> java    22135 root   33u  IPv4 1037522801                 TCP mmut01:9920->tdintc01s.priv.atos.fr:3311 (CLOSE_WAIT)
> java    22135 root   34u  IPv4 1037568312                 TCP mmut01:9920->tdintc01s.priv.atos.fr:3312 (CLOSE_WAIT)
> java    22135 root   35u  IPv4 1037616650                 TCP mmut01:9920->tdintc01s.priv.atos.fr:3314 (CLOSE_WAIT)
> java    22135 root   36u  IPv4 1037673324                 TCP mmut01:9920->tdintc01s.priv.atos.fr:30635 (CLOSE_WAIT)
> java    22135 root   37u  IPv4 1037729311                 TCP mmut01:9920->tdintc01s.priv.atos.fr:30636 (CLOSE_WAIT)
> java    22135 root   38u  IPv4 1037785722                 TCP mmut01:9920->tdintc01s.priv.atos.fr:30637 (CLOSE_WAIT)
> java    22135 root   39u  IPv4 1037841094                 TCP mmut01:9920->tdintc01s.priv.atos.fr:30648 (CLOSE_WAIT)
> java    22135 root   40u  IPv4 1037896470                 TCP mmut01:9920->tdintc01s.priv.atos.fr:30649 (CLOSE_WAIT)
> java    22135 root   41u  IPv4 1037952956                 TCP mmut01:9920->tdintc01s.priv.atos.fr:15216 (CLOSE_WAIT)
> java    22135 root   42u  IPv4 1038009779                 TCP mmut01:9920->tdintc01s.priv.atos.fr:15217 (CLOSE_WAIT)
> java    22135 root   43u  IPv4 1038065612                 TCP mmut01:9920->tdintc01s.priv.atos.fr:15218 (CLOSE_WAIT)
> java    22135 root   44u  IPv4 1038121542                 TCP mmut01:9920->tdintc01s.priv.atos.fr:15219 (CLOSE_WAIT)
> java    22135 root   45u  IPv4 1038176766                 TCP mmut01:9920->tdintc01s.priv.atos.fr:55706 (CLOSE_WAIT)
> java    22135 root   46u  IPv4 1038233091                 TCP mmut01:9920->tdintc01s.priv.atos.fr:55707 (CLOSE_WAIT)
> java    22135 root   47u  IPv4 1038288869                 TCP mmut01:9920->tdintc01s.priv.atos.fr:55708 (CLOSE_WAIT)
> java    22135 root   48u  IPv4 1038345669                 TCP mmut01:9920->tdintc01s.priv.atos.fr:55709 (CLOSE_WAIT)
> java    22135 root   49u  IPv4 1038402810                 TCP mmut01:9920->tdintc01s.priv.atos.fr:55710 (CLOSE_WAIT)
> java    22135 root   50u  IPv4 1038459018                 TCP mmut01:9920->tdintc01s.priv.atos.fr:20360 (ESTABLISHED)
>
> CLIENT LOG
>
> 14:03:43,962 INFO aft2.AftEntryThread Thread-16 - All is done for file /var/tmp/gf/in1/F960 , I remove it
> 14:03:43,963 INFO aft2.AftTransfer Thread-16 - BEGIN transfer /var/tmp/gf/in1/F961 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/
> 14:03:45,062 INFO aft2.AftTransfer Thread-16 - END transfer /var/tmp/gf/in1/F961 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/ : SUCCESS
> 14:03:45,062 INFO aft2.AftEntryThread Thread-16 - All is done for file /var/tmp/gf/in1/F961 , I remove it
> 14:03:45,062 INFO aft2.AftTransfer Thread-16 - BEGIN transfer /var/tmp/gf/in1/F962 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/
> 14:03:46,162 INFO aft2.AftTransfer Thread-16 - END transfer /var/tmp/gf/in1/F962 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/ : SUCCESS
> 14:03:46,162 INFO aft2.AftEntryThread Thread-16 - All is done for file /var/tmp/gf/in1/F962 , I remove it
> 14:03:46,162 INFO aft2.AftTransfer Thread-16 - BEGIN transfer /var/tmp/gf/in1/F963 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/
> 14:03:47,232 INFO aft2.AftTransfer Thread-16 - END transfer /var/tmp/gf/in1/F963 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/ : SUCCESS
> 14:03:47,232 INFO aft2.AftEntryThread Thread-16 - All is done for file /var/tmp/gf/in1/F963 , I remove it
> 14:03:47,233 INFO aft2.AftTransfer Thread-16 - BEGIN transfer /var/tmp/gf/in1/F964 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/
> 14:03:48,332 INFO aft2.AftTransfer Thread-16 - END transfer /var/tmp/gf/in1/F964 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/ : SUCCESS
> 14:03:48,333 INFO aft2.AftEntryThread Thread-16 - All is done for file /var/tmp/gf/in1/F964 , I remove it
> 14:03:48,333 INFO aft2.AftTransfer Thread-16 - BEGIN transfer /var/tmp/gf/in1/F965 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/
> 14:03:49,092 ERROR aft2.AftTransfer Thread-16 - cannot upload file to mmut01.priv.atos.fr - FtpIOException --> Return Value: 425 Description: Can't open passive connection.^M
> 14:04:04,102 INFO aft2.AftTransfer Thread-16 - BEGIN transfer /var/tmp/gf/in1/F966 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/
> 14:04:04,862 ERROR aft2.AftTransfer Thread-16 - cannot upload file to mmut01.priv.atos.fr - FtpIOException --> Return Value: 425 Description: Can't open passive connection.^M
> 14:04:19,872 INFO aft2.AftTransfer Thread-16 - BEGIN transfer /var/tmp/gf/in1/F967 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/
> 14:04:20,622 ERROR aft2.AftTransfer Thread-16 - cannot upload file to mmut01.priv.atos.fr - FtpIOException --> Return Value: 425 Description: Can't open passive connection.^M
> 14:04:35,632 INFO aft2.AftTransfer Thread-16 - BEGIN transfer /var/tmp/gf/in1/F968 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/
> 14:22:30,453 INFO aft2.AftEntryThread Thread-1385 - BEGIN entry processing, idx=0 entry=/DATA/repository/maven.tar.gz
> 14:22:34,492 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
> 14:23:34,492 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
> 14:23:34,492 INFO aft2.AftEntryThread Thread-1385 - dead status set for host mmut01.priv.atos.fr
> 14:24:35,092 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
> 14:25:35,092 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
> 14:25:36,102 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
> 14:26:36,102 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
> 14:26:37,112 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
> 14:27:37,112 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
> 14:27:38,122 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
> 14:28:38,122 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
> 14:28:39,132 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
> 14:29:39,132 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
> 14:29:40,142 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
> 14:30:40,142 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
> 14:30:41,152 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
> 14:31:41,152 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
> 14:31:42,162 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
> 14:32:42,162 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
> 14:32:43,172 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
> 14:33:43,172 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
> 14:33:44,182 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
> 14:34:44,182 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
> 14:34:45,192 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
> 14:35:45,192 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
> 14:35:46,202 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
> -----Message d'origine-----
> De : Sai Pullabhotla [mailto:sai.pullabhotla@jmethods.com]
> Envoyé : mardi 9 juin 2009 14:54
> À : ftpserver-users@mina.apache.org
> Objet : Re: Failed to open passive data connection
>
> I think it is because you have configured too few passive ports (3). Every
> file transfer/list command locks a port until the data transfer completes.
> So, if you have 3 concurrent users transferring files and a 4th one comes
> in, it will error out.
>
> You might want to increase the passive port range based on the load you
> expect.
>
> Sai Pullabhotla
> www.jMethods.com
>
>
>
> 2009/6/9 Gérard Frédéric <Fr...@atosorigin.com>
>
>> Hi All
>>
>> We now use ftpserver for more than one year (Dec 10 2007 incubator version)
>> Everything goes well on linux, solaris and windows
>> But sometimes I cannot explain this exception which occurs very
>> infrequently, on linux here :
>>
>> 12:10:43,034 INFO listener.FtpProtocolHandler pool-2-thread-4 - Open
>> connection - 10.24.231.113
>> 12:10:43,303 INFO command.PASS pool-2-thread-4 - Login success - user1
>> 12:10:43,722 WARN command.PASV pool-2-thread-4 - Failed to open passive
>> data connection
>> org.apache.ftpserver.DataConnectionException:
>> FtpDataConnection.setPasvCommand()
>>        at
>> org.apache.ftpserver.IODataConnectionFactory.initPassiveDataConnection(IODataConnectionFactory.java:182)
>>        at org.apache.ftpserver.command.PASV.execute(PASV.java:69)
>>        at
>> org.apache.ftpserver.listener.FtpProtocolHandler.service(FtpProtocolHandler.java:203)
>>        at
>> org.apache.ftpserver.listener.FtpProtocolHandler.onRequestReceived(FtpProtocolHandler.java:130)
>>        at
>> org.apache.ftpserver.listener.mina.MinaFtpProtocolHandler.messageReceived(MinaFtpProtocolHandler.java:109)
>>        at
>> org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:569)
>>        at
>> org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:298)
>>        at
>> org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
>>        at
>> org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:647)
>>        at
>> org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:220)
>>        at
>> org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:266)
>>        at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
>>        at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
>>        at java.lang.Thread.run(Thread.java:595)
>> 12:10:43,782 INFO listener.FtpProtocolHandler pool-2-thread-4 - Close
>> connection : 10.24.231.113 - user1
>>
>>
>> 3 ports are configured for passive connections, in addition to the listener
>> There is not an explicit reason about this behavior, could it be a java
>> memory issue or any lack of resources ?
>>
>> Thanks
>>
>> Frédéric
>>
>>
>>
>>  ________________________________
>>
>> Ce message et les pièces jointes sont confidentiels et réservés à l'usage
>> exclusif de ses destinataires. Il peut également être protégé par le secret
>> professionnel. Si vous recevez ce message par erreur, merci d'en avertir
>> immédiatement l'expéditeur et de le détruire. L'intégrité du message ne
>> pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin
>> ne pourra être recherchée quant au contenu de ce message. Bien que les
>> meilleurs efforts soient faits pour maintenir cette transmission exempte de
>> tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa
>> responsabilité ne saurait être recherchée pour tout dommage résultant d'un
>> virus transmis.
>>
>> This e-mail and the documents attached are confidential and intended solely
>> for the addressee; it may also be privileged. If you receive this e-mail in
>> error, please notify the sender immediately and destroy it. As its integrity
>> cannot be secured on the Internet, the Atos Origin group liability cannot be
>> triggered for the message content. Although the sender endeavours to
>> maintain a computer virus-free network, the sender does not warrant that
>> this transmission is virus-free and will not be liable for any damages
>> resulting from any virus transmitted.
>>
>
>
> Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.
>
> This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
>
>

RE: Failed to open passive data connection

Posted by Gérard Frédéric <Fr...@atosorigin.com>.
Thanks Sai

Arrrh I don't think it's the reason
Stress benths have been done on several Os with this configuration, with many concurrent transfers, and there were no any problem
Here we test only from on client, without concurrent transfers (so just one passive port is used once)
More precisely, the server hangs after 2 issues, and a lsof shows none passive ports are in use
We use ftpserver in more than 100 servers, we observe this only on a lfs 32bit linux server, jre5u9 (no ssl issue about it)
Do you think it could an unstable behavior of a firewall ?
Maybe these logs and lsof could help you :


SERVER LSOF
[root@mmut01] /usr/local/aft/log]# lsof -p 22135
COMMAND   PID USER   FD   TYPE     DEVICE     SIZE       NODE NAME
java    22135 root  cwd    DIR      104,3     4096     249675 /usr/local/aft
java    22135 root  rtd    DIR      104,1     4096          2 /
java    22135 root  txt    REG      104,3    64248      67715 /usr/java/jdk1.5.0_09/bin/exec/java
java    22135 root  mem    REG      104,3    25000      67866 /usr/java/jdk1.5.0_09/jre/lib/i386/libnio.so
java    22135 root  mem    REG      104,3    71732      67865 /usr/java/jdk1.5.0_09/jre/lib/i386/libnet.so
java    22135 root  mem    REG      104,3    28694     249721 /usr/local/aft/lib/aft.jar
java    22135 root  mem    REG       0,13   124724    2197211 /LOCAL/classes/jar/xerces/xml-apis-2.6.2.jar (dmz-data01:/vol/vol0/LOCAL_classes)
java    22135 root  mem    REG      104,3   232168     249722 /usr/local/aft/lib/aftd.jar
java    22135 root  mem    REG      104,3   300128     249723 /usr/local/aft/lib/backport-util-concurrent31.jar
java    22135 root  mem    REG      104,3    79441     249724 /usr/local/aft/lib/ftp4che071gen15.jar
java    22135 root  mem    REG      104,3    14119     249725 /usr/local/aft/lib/ftplet-aftd.jar
java    22135 root  mem    REG      104,3   391834     249726 /usr/local/aft/lib/log4j-1.2.15gen15.jar
java    22135 root  mem    REG      104,3   276847     249727 /usr/local/aft/lib/mina-core-1.0.8.jar
java    22135 root  mem    REG      104,3    16094     249728 /usr/local/aft/lib/mina-filter-ssl-1.0.8.jar
java    22135 root  mem    REG      104,3    15345     249729 /usr/local/aft/lib/slf4j-api-1.4.3gen15.jar
java    22135 root  mem    REG      104,3     8601     249730 /usr/local/aft/lib/slf4j-log4j12-1.4.3gen15.jar
java    22135 root  mem    REG      104,3     7991     249731 /usr/local/aft/lib/sysmm-1-1-0b1.jar
java    22135 root  mem    REG      104,3   175811      67798 /usr/java/jdk1.5.0_09/jre/lib/ext/sunpkcs11.jar
java    22135 root  mem    REG      104,3   158417      67797 /usr/java/jdk1.5.0_09/jre/lib/ext/sunjce_provider.jar
java    22135 root  mem    REG      104,3   802388      67796 /usr/java/jdk1.5.0_09/jre/lib/ext/localedata.jar
java    22135 root  mem    REG      104,3     8176      67795 /usr/java/jdk1.5.0_09/jre/lib/ext/dnsns.jar
java    22135 root  mem    REG      104,3  1037385      67794 /usr/java/jdk1.5.0_09/jre/lib/ext/bcprov-jdk15-131.jar
java    22135 root  mem    REG      104,3  8843542      67785 /usr/java/jdk1.5.0_09/jre/lib/charsets.jar
java    22135 root  mem    REG      104,3    81946      67906 /usr/java/jdk1.5.0_09/jre/lib/jce.jar
java    22135 root  mem    REG      104,3   542560      67907 /usr/java/jdk1.5.0_09/jre/lib/jsse.jar
java    22135 root  mem    REG      104,3 39935094      67936 /usr/java/jdk1.5.0_09/jre/lib/rt.jar
java    22135 root  mem    REG       0,13    27052    6111554 /LOCAL/classes/jar/jaxp/jaxp-api-1.2.jar (dmz-data01:/vol/vol0/LOCAL_classes)
java    22135 root  mem    REG       0,13  1010675    2197212 /LOCAL/classes/jar/xerces/xercesImpl-2.6.2.jar (dmz-data01:/vol/vol0/LOCAL_classes)
java    22135 root  mem    REG       0,13  1781922    2197215 /LOCAL/classes/jar/xalan/xalan-2.6.0.jar (dmz-data01:/vol/vol0/LOCAL_classes)
java    22135 root  mem    REG      104,3    64968      67871 /usr/java/jdk1.5.0_09/jre/lib/i386/libzip.so
java    22135 root  mem    REG      104,3   136824      67851 /usr/java/jdk1.5.0_09/jre/lib/i386/libjava.so
java    22135 root  mem    REG      104,3    48520      67870 /usr/java/jdk1.5.0_09/jre/lib/i386/libverify.so
java    22135 root  mem    REG      104,6    32768       3410 /tmp/hsperfdata_root/22135
java    22135 root  mem    REG      104,1   125882      98474 /lib/libnss_files-2.3.4.so
java    22135 root  mem    REG      104,1   366424      98468 /lib/libnsl-2.3.4.so
java    22135 root  mem    REG      104,3    27144      67873 /usr/java/jdk1.5.0_09/jre/lib/i386/native_threads/libhpi.so
java    22135 root  mem    REG      104,1   519618      98466 /lib/libm-2.3.4.so
java    22135 root  mem    REG      104,3  7397185      67876 /usr/java/jdk1.5.0_09/jre/lib/i386/server/libjvm.so
java    22135 root  mem    REG      104,1  5268520      98460 /lib/libc-2.3.4.so
java    22135 root  mem    REG      104,1    53141      98464 /lib/libdl-2.3.4.so
java    22135 root  mem    REG      104,1   499480      98482 /lib/libpthread-2.3.4.so
java    22135 root  mem    REG      104,1   349237      98453 /lib/ld-2.3.4.so
java    22135 root    0r   CHR        1,3               65542 /dev/null
java    22135 root    1w   REG      104,3       34      98479 /usr/local/aft/log/aftServ.sh.log
java    22135 root    2w   REG      104,3       34      98479 /usr/local/aft/log/aftServ.sh.log
java    22135 root    3r   CHR        1,8               65547 /dev/random
java    22135 root    4r   CHR        1,9               65548 /dev/urandom
java    22135 root    5u  IPv4 1035966280                 TCP mmut01:9920->tdintc01s.priv.atos.fr:11881 (ESTABLISHED)
java    22135 root    6w   REG      104,3   540466      98635 /usr/local/aft/log/aftServ.log
java    22135 root    7u  IPv4 1035802229                 TCP localhost:4335->localhost:9930 (ESTABLISHED)
java    22135 root    8u  sock        0,4          1035802227 can't identify protocol
java    22135 root    9r  FIFO        0,5          1035803180 pipe
java    22135 root   10w  FIFO        0,5          1035803180 pipe
java    22135 root   11u  IPv4 1035803190                 TCP *:9920 (LISTEN)
java    22135 root   12r  FIFO        0,5          1035966281 pipe
java    22135 root   13w  FIFO        0,5          1035966281 pipe
java    22135 root   14u  IPv4 1036927696                 TCP mmut01:9920->tdintc01s.priv.atos.fr:45596 (CLOSE_WAIT)
java    22135 root   15u  unix 0xce3bca80          1035808999 socket
java    22135 root   16r  FIFO        0,5          1036927697 pipe
java    22135 root   17w  FIFO        0,5          1036927697 pipe
java    22135 root   18u  IPv4 1037036176                 TCP mmut01:9920->tdintc01s.priv.atos.fr:45597 (CLOSE_WAIT)
java    22135 root   19r  FIFO        0,5          1037036177 pipe
java    22135 root   20w  FIFO        0,5          1037036177 pipe
java    22135 root   21u  IPv4 1037091229                 TCP mmut01:9920->tdintc01s.priv.atos.fr:45598 (CLOSE_WAIT)
java    22135 root   22r  FIFO        0,5          1037091230 pipe
java    22135 root   23w  FIFO        0,5          1037091230 pipe
java    22135 root   24u  IPv4 1037145509                 TCP mmut01:9920->tdintc01s.priv.atos.fr:32754 (CLOSE_WAIT)
java    22135 root   25r  FIFO        0,5          1037145510 pipe
java    22135 root   26w  FIFO        0,5          1037145510 pipe
java    22135 root   27u  IPv4 1037197963                 TCP mmut01:9920->tdintc01s.priv.atos.fr:32755 (CLOSE_WAIT)
java    22135 root   28u  IPv4 1037253780                 TCP mmut01:9920->tdintc01s.priv.atos.fr:32756 (CLOSE_WAIT)
java    22135 root   29u  IPv4 1037308681                 TCP mmut01:9920->tdintc01s.priv.atos.fr:32757 (CLOSE_WAIT)
java    22135 root   30u  IPv4 1037363860                 TCP mmut01:9920->tdintc01s.priv.atos.fr:32758 (CLOSE_WAIT)
java    22135 root   31u  IPv4 1037418631                 TCP mmut01:9920->tdintc01s.priv.atos.fr:3309 (CLOSE_WAIT)
java    22135 root   32u  IPv4 1037473644                 TCP mmut01:9920->tdintc01s.priv.atos.fr:3310 (CLOSE_WAIT)
java    22135 root   33u  IPv4 1037522801                 TCP mmut01:9920->tdintc01s.priv.atos.fr:3311 (CLOSE_WAIT)
java    22135 root   34u  IPv4 1037568312                 TCP mmut01:9920->tdintc01s.priv.atos.fr:3312 (CLOSE_WAIT)
java    22135 root   35u  IPv4 1037616650                 TCP mmut01:9920->tdintc01s.priv.atos.fr:3314 (CLOSE_WAIT)
java    22135 root   36u  IPv4 1037673324                 TCP mmut01:9920->tdintc01s.priv.atos.fr:30635 (CLOSE_WAIT)
java    22135 root   37u  IPv4 1037729311                 TCP mmut01:9920->tdintc01s.priv.atos.fr:30636 (CLOSE_WAIT)
java    22135 root   38u  IPv4 1037785722                 TCP mmut01:9920->tdintc01s.priv.atos.fr:30637 (CLOSE_WAIT)
java    22135 root   39u  IPv4 1037841094                 TCP mmut01:9920->tdintc01s.priv.atos.fr:30648 (CLOSE_WAIT)
java    22135 root   40u  IPv4 1037896470                 TCP mmut01:9920->tdintc01s.priv.atos.fr:30649 (CLOSE_WAIT)
java    22135 root   41u  IPv4 1037952956                 TCP mmut01:9920->tdintc01s.priv.atos.fr:15216 (CLOSE_WAIT)
java    22135 root   42u  IPv4 1038009779                 TCP mmut01:9920->tdintc01s.priv.atos.fr:15217 (CLOSE_WAIT)
java    22135 root   43u  IPv4 1038065612                 TCP mmut01:9920->tdintc01s.priv.atos.fr:15218 (CLOSE_WAIT)
java    22135 root   44u  IPv4 1038121542                 TCP mmut01:9920->tdintc01s.priv.atos.fr:15219 (CLOSE_WAIT)
java    22135 root   45u  IPv4 1038176766                 TCP mmut01:9920->tdintc01s.priv.atos.fr:55706 (CLOSE_WAIT)
java    22135 root   46u  IPv4 1038233091                 TCP mmut01:9920->tdintc01s.priv.atos.fr:55707 (CLOSE_WAIT)
java    22135 root   47u  IPv4 1038288869                 TCP mmut01:9920->tdintc01s.priv.atos.fr:55708 (CLOSE_WAIT)
java    22135 root   48u  IPv4 1038345669                 TCP mmut01:9920->tdintc01s.priv.atos.fr:55709 (CLOSE_WAIT)
java    22135 root   49u  IPv4 1038402810                 TCP mmut01:9920->tdintc01s.priv.atos.fr:55710 (CLOSE_WAIT)
java    22135 root   50u  IPv4 1038459018                 TCP mmut01:9920->tdintc01s.priv.atos.fr:20360 (ESTABLISHED)

CLIENT LOG

14:03:43,962 INFO aft2.AftEntryThread Thread-16 - All is done for file /var/tmp/gf/in1/F960 , I remove it
14:03:43,963 INFO aft2.AftTransfer Thread-16 - BEGIN transfer /var/tmp/gf/in1/F961 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/
14:03:45,062 INFO aft2.AftTransfer Thread-16 - END transfer /var/tmp/gf/in1/F961 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/ : SUCCESS
14:03:45,062 INFO aft2.AftEntryThread Thread-16 - All is done for file /var/tmp/gf/in1/F961 , I remove it
14:03:45,062 INFO aft2.AftTransfer Thread-16 - BEGIN transfer /var/tmp/gf/in1/F962 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/
14:03:46,162 INFO aft2.AftTransfer Thread-16 - END transfer /var/tmp/gf/in1/F962 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/ : SUCCESS
14:03:46,162 INFO aft2.AftEntryThread Thread-16 - All is done for file /var/tmp/gf/in1/F962 , I remove it
14:03:46,162 INFO aft2.AftTransfer Thread-16 - BEGIN transfer /var/tmp/gf/in1/F963 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/
14:03:47,232 INFO aft2.AftTransfer Thread-16 - END transfer /var/tmp/gf/in1/F963 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/ : SUCCESS
14:03:47,232 INFO aft2.AftEntryThread Thread-16 - All is done for file /var/tmp/gf/in1/F963 , I remove it
14:03:47,233 INFO aft2.AftTransfer Thread-16 - BEGIN transfer /var/tmp/gf/in1/F964 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/
14:03:48,332 INFO aft2.AftTransfer Thread-16 - END transfer /var/tmp/gf/in1/F964 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/ : SUCCESS
14:03:48,333 INFO aft2.AftEntryThread Thread-16 - All is done for file /var/tmp/gf/in1/F964 , I remove it
14:03:48,333 INFO aft2.AftTransfer Thread-16 - BEGIN transfer /var/tmp/gf/in1/F965 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/
14:03:49,092 ERROR aft2.AftTransfer Thread-16 - cannot upload file to mmut01.priv.atos.fr - FtpIOException --> Return Value: 425 Description: Can't open passive connection.^M
14:04:04,102 INFO aft2.AftTransfer Thread-16 - BEGIN transfer /var/tmp/gf/in1/F966 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/
14:04:04,862 ERROR aft2.AftTransfer Thread-16 - cannot upload file to mmut01.priv.atos.fr - FtpIOException --> Return Value: 425 Description: Can't open passive connection.^M
14:04:19,872 INFO aft2.AftTransfer Thread-16 - BEGIN transfer /var/tmp/gf/in1/F967 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/
14:04:20,622 ERROR aft2.AftTransfer Thread-16 - cannot upload file to mmut01.priv.atos.fr - FtpIOException --> Return Value: 425 Description: Can't open passive connection.^M
14:04:35,632 INFO aft2.AftTransfer Thread-16 - BEGIN transfer /var/tmp/gf/in1/F968 --> mmut01.priv.atos.fr:/var/tmp/gf/out1/
14:22:30,453 INFO aft2.AftEntryThread Thread-1385 - BEGIN entry processing, idx=0 entry=/DATA/repository/maven.tar.gz
14:22:34,492 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
14:23:34,492 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
14:23:34,492 INFO aft2.AftEntryThread Thread-1385 - dead status set for host mmut01.priv.atos.fr
14:24:35,092 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
14:25:35,092 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
14:25:36,102 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
14:26:36,102 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
14:26:37,112 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
14:27:37,112 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
14:27:38,122 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
14:28:38,122 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
14:28:39,132 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
14:29:39,132 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
14:29:40,142 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
14:30:40,142 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
14:30:41,152 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
14:31:41,152 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
14:31:42,162 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
14:32:42,162 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
14:32:43,172 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
14:33:43,172 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
14:33:44,182 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
14:34:44,182 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
14:34:45,192 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
14:35:45,192 ERROR aft2.AftTransfer Thread-1385 - cannot connect to mmut01.priv.atos.fr - Read timed out
14:35:46,202 INFO aft2.AftTransfer Thread-1385 - BEGIN transfer /DATA/repository/maven.tar.gz --> mmut01.priv.atos.fr:/WEBS/UniteOD/xa.atosworldline.com/docs/repository/
-----Message d'origine-----
De : Sai Pullabhotla [mailto:sai.pullabhotla@jmethods.com]
Envoyé : mardi 9 juin 2009 14:54
À : ftpserver-users@mina.apache.org
Objet : Re: Failed to open passive data connection

I think it is because you have configured too few passive ports (3). Every
file transfer/list command locks a port until the data transfer completes.
So, if you have 3 concurrent users transferring files and a 4th one comes
in, it will error out.

You might want to increase the passive port range based on the load you
expect.

Sai Pullabhotla
www.jMethods.com



2009/6/9 Gérard Frédéric <Fr...@atosorigin.com>

> Hi All
>
> We now use ftpserver for more than one year (Dec 10 2007 incubator version)
> Everything goes well on linux, solaris and windows
> But sometimes I cannot explain this exception which occurs very
> infrequently, on linux here :
>
> 12:10:43,034 INFO listener.FtpProtocolHandler pool-2-thread-4 - Open
> connection - 10.24.231.113
> 12:10:43,303 INFO command.PASS pool-2-thread-4 - Login success - user1
> 12:10:43,722 WARN command.PASV pool-2-thread-4 - Failed to open passive
> data connection
> org.apache.ftpserver.DataConnectionException:
> FtpDataConnection.setPasvCommand()
>        at
> org.apache.ftpserver.IODataConnectionFactory.initPassiveDataConnection(IODataConnectionFactory.java:182)
>        at org.apache.ftpserver.command.PASV.execute(PASV.java:69)
>        at
> org.apache.ftpserver.listener.FtpProtocolHandler.service(FtpProtocolHandler.java:203)
>        at
> org.apache.ftpserver.listener.FtpProtocolHandler.onRequestReceived(FtpProtocolHandler.java:130)
>        at
> org.apache.ftpserver.listener.mina.MinaFtpProtocolHandler.messageReceived(MinaFtpProtocolHandler.java:109)
>        at
> org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:569)
>        at
> org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:298)
>        at
> org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
>        at
> org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:647)
>        at
> org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:220)
>        at
> org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:266)
>        at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
>        at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
>        at java.lang.Thread.run(Thread.java:595)
> 12:10:43,782 INFO listener.FtpProtocolHandler pool-2-thread-4 - Close
> connection : 10.24.231.113 - user1
>
>
> 3 ports are configured for passive connections, in addition to the listener
> There is not an explicit reason about this behavior, could it be a java
> memory issue or any lack of resources ?
>
> Thanks
>
> Frédéric
>
>
>
>  ________________________________
>
> Ce message et les pièces jointes sont confidentiels et réservés à l'usage
> exclusif de ses destinataires. Il peut également être protégé par le secret
> professionnel. Si vous recevez ce message par erreur, merci d'en avertir
> immédiatement l'expéditeur et de le détruire. L'intégrité du message ne
> pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin
> ne pourra être recherchée quant au contenu de ce message. Bien que les
> meilleurs efforts soient faits pour maintenir cette transmission exempte de
> tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa
> responsabilité ne saurait être recherchée pour tout dommage résultant d'un
> virus transmis.
>
> This e-mail and the documents attached are confidential and intended solely
> for the addressee; it may also be privileged. If you receive this e-mail in
> error, please notify the sender immediately and destroy it. As its integrity
> cannot be secured on the Internet, the Atos Origin group liability cannot be
> triggered for the message content. Although the sender endeavours to
> maintain a computer virus-free network, the sender does not warrant that
> this transmission is virus-free and will not be liable for any damages
> resulting from any virus transmitted.
>


Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.


Re: Failed to open passive data connection

Posted by Sai Pullabhotla <sa...@jmethods.com>.
I think it is because you have configured too few passive ports (3). Every
file transfer/list command locks a port until the data transfer completes.
So, if you have 3 concurrent users transferring files and a 4th one comes
in, it will error out.

You might want to increase the passive port range based on the load you
expect.

Sai Pullabhotla
www.jMethods.com



2009/6/9 Gérard Frédéric <Fr...@atosorigin.com>

> Hi All
>
> We now use ftpserver for more than one year (Dec 10 2007 incubator version)
> Everything goes well on linux, solaris and windows
> But sometimes I cannot explain this exception which occurs very
> infrequently, on linux here :
>
> 12:10:43,034 INFO listener.FtpProtocolHandler pool-2-thread-4 - Open
> connection - 10.24.231.113
> 12:10:43,303 INFO command.PASS pool-2-thread-4 - Login success - user1
> 12:10:43,722 WARN command.PASV pool-2-thread-4 - Failed to open passive
> data connection
> org.apache.ftpserver.DataConnectionException:
> FtpDataConnection.setPasvCommand()
>        at
> org.apache.ftpserver.IODataConnectionFactory.initPassiveDataConnection(IODataConnectionFactory.java:182)
>        at org.apache.ftpserver.command.PASV.execute(PASV.java:69)
>        at
> org.apache.ftpserver.listener.FtpProtocolHandler.service(FtpProtocolHandler.java:203)
>        at
> org.apache.ftpserver.listener.FtpProtocolHandler.onRequestReceived(FtpProtocolHandler.java:130)
>        at
> org.apache.ftpserver.listener.mina.MinaFtpProtocolHandler.messageReceived(MinaFtpProtocolHandler.java:109)
>        at
> org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:569)
>        at
> org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:298)
>        at
> org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
>        at
> org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:647)
>        at
> org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:220)
>        at
> org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:266)
>        at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
>        at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
>        at java.lang.Thread.run(Thread.java:595)
> 12:10:43,782 INFO listener.FtpProtocolHandler pool-2-thread-4 - Close
> connection : 10.24.231.113 - user1
>
>
> 3 ports are configured for passive connections, in addition to the listener
> There is not an explicit reason about this behavior, could it be a java
> memory issue or any lack of resources ?
>
> Thanks
>
> Frédéric
>
>
>
>  ________________________________
>
> Ce message et les pièces jointes sont confidentiels et réservés à l'usage
> exclusif de ses destinataires. Il peut également être protégé par le secret
> professionnel. Si vous recevez ce message par erreur, merci d'en avertir
> immédiatement l'expéditeur et de le détruire. L'intégrité du message ne
> pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin
> ne pourra être recherchée quant au contenu de ce message. Bien que les
> meilleurs efforts soient faits pour maintenir cette transmission exempte de
> tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa
> responsabilité ne saurait être recherchée pour tout dommage résultant d'un
> virus transmis.
>
> This e-mail and the documents attached are confidential and intended solely
> for the addressee; it may also be privileged. If you receive this e-mail in
> error, please notify the sender immediately and destroy it. As its integrity
> cannot be secured on the Internet, the Atos Origin group liability cannot be
> triggered for the message content. Although the sender endeavours to
> maintain a computer virus-free network, the sender does not warrant that
> this transmission is virus-free and will not be liable for any damages
> resulting from any virus transmitted.
>