user924966
user924966

Reputation: 1

FTP Client listFiles() work in some machines

I have a program that make use of FTP Client, it is running in several machines and it stoped working in one of those machines.

Making the debug I can see that the problem is on listFiles(), listNames()... But it work's perfect giving me the name of the directory when I make printWorkingDirectory() or when I make FTPReply.isPositiveCompletion(ftp.getReplyCode()) it brings me the true value.

I have also made ftp.enterLocalPassiveMode(), ftp.setFileType(FTPClient.BINARY_FILE_TYPE).

I'm lost, can you please help me?

Upvotes: 0

Views: 463

Answers (1)

Sounds like the data connection is blocked - most likely in a router or firewall. You need to have the machine "behind" a NAT device be the active one.

What is the exact network configuration between the two machines you have problems with?

Upvotes: 1

Related Questions