FTP 客户端 listFiles() 在某些机器上工作
我有一个使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来数据连接被阻止 - 最有可能是在路由器或防火墙中。您需要让 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?