Using FileTransferClient, I'm trying to upload a small html file onto the server (it's only a few bytes). For some reason, it's started giving me a read timeout error. I say started because up to a couple days ago this wasn't happening. I don't know what I did to break it. Here's the relevant code:
String postLoc = System.getProperty("java.io.tmpdir") + "/" + postName + ".html";
putFileContents(postLoc, file);
try {
ftpManager.uploadFile(postLoc, postName + ".html");
ftpManager.disconnect();
} catch (FTPException f1) {
iom.showError(f1);
} catch (IOException e1) {
iom.showError(e1);
}
The only error given is:
java.net.SocketTimeoutException: Read timed out.
I'm running this from a command line, with my desktop as the working directory, and from Fedora. The tmpdir variable is simply "/tmp".
No matter what timeout I've set it to this still happens. All it does is create an empty file on the server, but doesn't put any of the content into the remote file.
If it's relevant, I am unable to ftp to my server through a command line and issue the following commands:
quote PASV
quote LIST
The first one works to put it into passive mode, but it hangs up on the second. This also happens if I try to use a STOR command.