Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 834203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:38:20+00:00 2026-05-15T04:38:20+00:00

An edited version of the java code: FileSystemOptions opts = new FileSystemOptions(); DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts, auth);

  • 0

An edited version of the java code:

FileSystemOptions opts = new FileSystemOptions();
DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts, auth);

// fileToMonitor is the FTP folder.                  
LOG.debug("Trying to resolve file " + fileToMonitor + "...");
FileObject fo = fileSystemManager.resolveFile(fileToMonitor, opts);

LOG.debug("File resolved, attempting to add to DefaultFileMonitor...");
DefaultFileMonitor monitor = createFileMonitor(processor);

// This line causes PORT and LIST commnads to be sent to the FTP server
monitor.addFile(fo);
LOG.debug("File successfully, added to DefaultFileMonitor");

I monitored the network traffic and it seems that when the FTP location is added to the monitor, it sends PORT and LIST commands to two folders on the server. The problem is that it keeps doing it (presumably till it runs out of client ports to call from?.

Here’s an excerpt of the FTP network traffic:

50         0.312500           {TCP:2, IPv4:0}  FTP      FTP:Request from Port 12620,'PORT xxx,xxx,xxx,xxx,49,114'
51         0.312500           {TCP:2, IPv4:0}  FTP      FTP:Response to Port 12620, '200  PORT command successful.'
52         0.312500           {TCP:2, IPv4:0}  FTP      FTP:Request from Port 12620,'LIST tmp/dump'
<snipped>
270       1.750000           {TCP:2, IPv4:0}  FTP      FTP:Request from Port 12620,'PORT xxx,xxx,xxx,xxx,49,115'
271       1.750000           {TCP:2, IPv4:0}  FTP      FTP:Response to Port 12620, '200  PORT command successful.'
272       1.750000           {TCP:2, IPv4:0}  FTP      FTP:Request from Port 12620,'LIST tmp'
<snipped>
343       2.296875           {TCP:2, IPv4:0}  FTP      FTP:Request from Port 12620,'PORT xxx,xxx,xxx,xxx,49,116'
344       2.312500           {TCP:2, IPv4:0}  FTP      FTP:Response to Port 12620, '200  PORT command successful.'
345       2.312500           {TCP:2, IPv4:0}  FTP      FTP:Request from Port 12620,'LIST tmp/dump'
<snipped>
560       3.687500           {TCP:2, IPv4:0}  FTP      FTP:Response to Port 12620, '226  Transfer complete.'
566       4.031250           {TCP:2, IPv4:0}  FTP      FTP:Request from Port 12620,'PORT xxx,xxx,xxx,xxx,49,118'
567       4.031250           {TCP:2, IPv4:0}  FTP      FTP:Response to Port 12620, '200  PORT command successful.'
568       4.031250           {TCP:2, IPv4:0}  FTP      FTP:Request from Port 12620,'LIST tmp'
<repeat>

The part is the response from the LIST command. Note that the commands are repeated for the same folders but the port changes each time. This does not occur when there are no files at those locations.

What causes this behaviour and how can I change it so that only sends retrieves the listing once?

Edit:
I’ve narrowed down the problem to the getChildren() method on the FileObject.

This is the only internet reference I could find:
http://mail-archives.apache.org/mod_mbox/commons-user/201005.mbox/%3C4c03ed10.0d01df0a.53c3.059c@mx.google.com%3E

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T04:38:21+00:00Added an answer on May 15, 2026 at 4:38 am

    I’ve discovered that this is a bug in FTPFileObject in VFS.

    https://issues.apache.org/jira/browse/VFS-114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

    I built another jar from the latest source code and the problem went away.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Edit my code to make it work please. Edited for latest version. Here is
i have an edited version of a config file specific for my machine. i
Edited code - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @Cell;
The following code class GenericCompilationFailureDemo { List<? extends GenericCompilationFailureDemo> newList() { return new ArrayList<GenericCompilationFailureDemo>();
I installed the 32 bit Linux version of Eclipse for Java EE Developers on
I'm trying to upload an edited version of a .txt file to Dropbox using
I have written a java code in Eclipse and i am developing a plug-in
EDIT: The code below has been edited to show the correct solution to the
In a Java project, I am using an ojdbc6 jar <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>11.2.0.1.0</version>
Example code : EDITED : clarified example. Sorry for any confusion. using System.Collections.Specialized; using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.