Received Unexpected End-of-file From Sftp Server

After the upload is done the script writes out if the upload was complete or not. It checks this with a simple if-loop, it uses the fx2txt function in Net::SFTP to write the action error message which writes out 'End of file'. When i try to run the script when there is no files at the host its downloading from the script starts hanging a little when its connecting to the host its suppose to transfer files to and the script quits with a 'Connection closed at <scriptname> <linenumber>'. in this situation there was no files in the directory on the server it downloads the files from so i guess its why it just hangs when it tries to upload files.
I have not had the possibility to run the script where there actually is files in the directory, since this is run on a production system and files are being downloaded from a server and uploaded to another server and then scripts at that server puts the files in a database (we dont have control of this DB) so then i cant just create test files on the server.
I have however tried manual sftp uploads to the server the files will be transfered to and it works without problems, so i guess this have to be a perl problem and not an sftp/ssh problem? As you mention, perl needs to output something, could you explain that a little further ?
I have added the debug option when creating the SFTP object now to be able to see more detailed whats happening, but ill have to wait for the output until there are any new files to transfer for the script.
I have not had the possibility to run the script where there actually is files in the directory, since this is run on a production system and files are being downloaded from a server and uploaded to another server and then scripts at that server puts the files in a database (we dont have control of this DB) so then i cant just create test files on the server.
I have however tried manual sftp uploads to the server the files will be transfered to and it works without problems, so i guess this have to be a perl problem and not an sftp/ssh problem? As you mention, perl needs to output something, could you explain that a little further ?
I have added the debug option when creating the SFTP object now to be able to see more detailed whats happening, but ill have to wait for the output until there are any new files to transfer for the script.
Error: Received unexpected end-of-file from SFTP server Error: Could not connect to server Status: Delaying connection for 5 seconds due to previously failed connection attempt. Previous post Transferring files to a remote server using PSCP Next post Sorting ArrayList of Objects by Object attribute in Java 6 thoughts on “ Fatal: Received unexpected end-of-file from server ”. Buku belajar main piano untuk pemula. Operator manual for claas disco 300 for sale.