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

Ask A Question

Stats

  • Questions 509k
  • Answers 509k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Is there a specific reason why you use DynamicResource instead… May 16, 2026 at 4:46 pm
  • Editorial Team
    Editorial Team added an answer You implement that logic at the view layer, probably with… May 16, 2026 at 4:46 pm
  • Editorial Team
    Editorial Team added an answer My view is that when I speak of an API,… May 16, 2026 at 4:45 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I've heavily edited this question because responses indicated I wasn't being clear problem: UI
I was reading Java Platform Performance (sadly the link seems to have disappeared from
Given the intitial XML (BPEL) file: <?xml version=1.0 encoding=UTF-8?> <process name=TestSVG2 xmlns=http://www.example.org targetNamespace=http://www.example.org xmlns:xsd=http://www.w3.org/2001/XMLSchema>
I have a Serializable object which is supposed to hold a java.awt.Image as its
(EDIT: I've edited my question to make it simpler, sorry if some answers are
What is main use of Enumeration in c#? Edited:- suppose I want to compare
I am attempting to use JAXB to unmarshall an XML files whose schema is
My question is broader than merely expanding language specific skills. I'm wondering what sort
i have an app that has a few checkboxes in the settings and then
I have a project with multiple modules, including on that is responsible for building

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.