FTP 客户端 listFiles() 在某些机器上工作

发布于 2024-12-22 13:08:28 字数 395 浏览 6 评论 0原文

我有一个使用 FTP 客户端的程序,它在多台机器上运行,但在其中一台机器上停止工作。

进行调试我可以看到问题出在 listFiles()、listNames()... 但它工作得很好,当我进行 printWorkingDirectory() 时给我目录的名称code> 或者当我制作 FTPReply.isPositiveCompletion(ftp.getReplyCode()) 时,它给我带来了真正的价值。

我还制作了ftp.enterLocalPassiveMode()ftp.setFileType(FTPClient.BINARY_FILE_TYPE)

我迷路了,你能帮我吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

七秒鱼° 2024-12-29 13:08:28

听起来数据连接被阻止 - 最有可能是在路由器或防火墙中。您需要让 NAT 设备“后面”的机器成为活动机器。

您遇到问题的两台机器之间的确切网络配置是什么?

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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文