Gary Chen created NET-699:
-----------------------------

             Summary: FTPClient storeFile() method return false because cannot 
open socket
                 Key: NET-699
                 URL: https://issues.apache.org/jira/browse/NET-699
             Project: Commons Net
          Issue Type: Bug
          Components: FTP
    Affects Versions: 3.6
            Reporter: Gary Chen
             Fix For: 3.6
         Attachments: image-2021-04-16-14-44-26-858.png

Currently we're using common-pool to store those ftpClient, and sometimes the 
storeFile() method return false with reply "200 send noop successfully".

 
{code:java}
primary:
  host: nycsdevfeed.rrdev.dev.reuters.com
  port: 21
  userName: anonymous
  password: anonymous
  role: 0
  baseDir: /
  tempFolder: temp/
  controlEncoding: UTF-8
  useEPSVWithIPv4: false
  passiveMode: true
  dataTimeout: 20000 #ms, transfer command timeout in passive mode
  connectTimeout: 10000 #ms, socket connection timeout
  fileType: 2
  bufferSize: 524288 #512 * 1024
  controlKeepAliveTimeout: 110  #seconds, keep control command alive, send a 
NOOP approximately every 5 mins
  controlKeepAliveReplyTimeout: 45000
  maxTotal: 5 #max total object in pool, default 8
  maxIdle: 5 #max idle object in pool, default 8
  minIdle: 2  #min idle object in pool, default 0
  testOnCreate: true #verify the validateObject when create object to pool
  testOnReturn: true #verify the validateObject when return object to pool
  testOnBorrow: true #verify the validateObject when borrow object to pool
  testWhileIdle: true #verify the validateObject when evict thread return 
false(no need to remove idle object)
  timeBetweenEvictionRunsMillis: 60000 #check the idle object every 60 seconds
  softMinEvictableIdleTimeMillis: 120000 #keep the minIdle count idle object, 
remove the redundant idle object
  numTestsPerEvictionRun: 5 #evict thread will pick up 10 object to verify
  blockWhenExhausted: true #if there is no more idle object, block the thread 
until maxWaitMillis
  maxWaitMillis: -1 #if there is no more idle object, it will throw 
NoSuchElementException; -1 means always wait
{code}
This is the connection poo setting for FtpClient.

 

and we found that code in FTPClient._openDataConnection_()

even the pasv() method return 227, but here still return null, then storeFile() 
return false with 200 noop reply.

!image-2021-04-16-14-44-26-858.png!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to