Java Commons.net 和 Java Commons.net FTP 权限
我经常使用 FileZilla 将文件上传到特定的 RedHat 5.5 服务器,没有任何问题。
我现在尝试使用 Java 库 org.apache.commons.net.ftp.FTPClient FTP 到同一台服务器,同时使用完全相同的凭据(un、pw 和 ip 地址)。我不断收到错误 Connection Refused: Connect at java.net.PlainSocketImpl.socketConnect(NativeMethod) at...........
似乎如果权限适用于 FileZilla,它们也应该适用于 commons.net。这听起来正确吗?
I regularly upload files to a particular RedHat 5.5 Server with no problems using FileZilla.
I am now trying to FTP to the same server with the Java Library org.apache.commons.net.ftp.FTPClient while using the exact same credentials (un, pw, and ip address). I keep getting an error Connection Refused: Connect at java.net.PlainSocketImpl.socketConnect(NativeMethod) at...........
It seems like if the permisions work for FileZilla, they should work for commons.net also. Does this sound right?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从服务器端来看,一切都应该没问题。当您可以使用一个客户端登录时,另一个客户端也应该可以正常登录。
但是,我无法判断服务器是否使用被动模式之类的东西,而您的库不支持该功能。
您确定连接到同一端口并且服务器没有使用 sftp 等吗?
From the serverside everything should be ok. When you can log in with one client the other client should be ok as well.
I cannot tell however if the server for example uses something like passive mode and your library doesn't support that feature.
Are you sure that you are connecting to the same port and the server is not using sftp, etc?