This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Event Type "File Downloaded" triggering without successful download.

We transfer files to an external client and during their maintenance window (of which we are not notified prior), the connection to their site is somewhat successful, but the transfer fails with a "Permission Denied" error. We have an event set up in Serv-U to send a notification when a file is downloaded which is triggered even when the file is not actually transferred. Each retry will send another email.

How do I stop the notification being sent if the file transfer is not successful? 

Serv-U 15.3.2.172 running on Windows Server 2016

Error:

2023-05-15 06:00:24 Host 'ftp.example.com' is known and matches the RSA host key
2023-05-15 06:00:24 SSH_MSG_NEWKEYS sent
2023-05-15 06:00:24 SSH_MSG_NEWKEYS received
2023-05-15 06:00:24 SSH_MSG_SERVICE_REQUEST sent
2023-05-15 06:00:24 SSH_MSG_SERVICE_ACCEPT received
2023-05-15 06:00:24 Authentications that can continue: publickey,keyboard-interactive,password
2023-05-15 06:00:24 Next authentication method: publickey
2023-05-15 06:00:24 Authentication succeeded (publickey).
2023-05-15 06:00:24 connection completed
2023-05-15 06:00:25 Skip remote directory check true
2023-05-15 06:00:25 sftp channel opened
2023-05-15 06:00:25
2023-05-15 06:00:25 Copying from INTERNAL.FTP to EXTERNAL.FTP
2023-05-15 06:00:25 copy /Outbound/File/FileExample.xlsx.pgp to /Inbound/FileExample.xlsx.pgp
Permission denied
com.uc4.ftpjob.DataTransferException: Unable to open file /Inbound/FileExample.xlsx.pgp for output on system EXTERNAL.FTP.
at com.uc4.ftpjob.commands.impl.CopyCommand.throwDataException(CopyCommand.java:711)
at com.uc4.ftpjob.commands.impl.CopyCommand.execute(CopyCommand.java:612)
at com.uc4.ftpjob.commands.impl.CopyCommand.execute(CopyCommand.java:443)
at com.uc4.ftpjob.commands.CommandProcessor.execCommand(CommandProcessor.java:308)
at com.uc4.ftpjob.commands.CommandProcessor.processCommands(CommandProcessor.java:164)
at com.uc4.ftpjob.commands.CommandProcessor$processCommands$0.call(Unknown Source)
at FtpJob.runJob(FtpAgent.groovy:320)
at com.uc4.extensibility.types.CITAgent.dispatchJob(CITAgent.java:258)
at com.uc4.ex.cit.CITJob.execute(CITJob.java:195)
at com.uc4.ex.Job.run(Job.java:463)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.uc4.ftpjob.DataTransferException: Permission denied
at com.uc4.ftpjob.commands.SFtpCommandImpl.getOutputStream(SFtpCommandImpl.java:268)
at com.uc4.ftpjob.commands.FtpFacadeCommandImpl.getOutputStream(FtpFacadeCommandImpl.java:106)
at com.uc4.ftpjob.commands.impl.CopyCommand.execute(CopyCommand.java:601)

  • It turns out in the Serv-U logs, even though the transfer is 'successful', the size of the file is 0kb. I went ahead and created a filter to not kick off the event in this case and I'm good with that solution. Hope this helps someone in the future.

  • Thank you for the update on this, the "permission denied" error is probably the reason for the 0 byte file, I've sene this a few times before where there is an issue transferring a file, the SFTP client creates the file as a placeholder on the remote server but when it comes to read the source file it cannot for whatever reason (usually local permissions). The SFTP client then aborts the transfer leaving the 0 byte file in place and this triggers the 'event' in Serv-U as it doent know how big the file would have been.

    Thats my theory anyway!