CA WA Agent SFTP job results in Command execution failed and Broken Pipe Encountered

Document ID : KB000074032
Last Modified Date : 16/03/2018
Show Technical Document Details
Issue:
User may see the following error when trying to upload a file with an SFTP job.
-----
16:25:53.427 1 FtpPlugin.Thread-11.CybFTPClient.run[:215] - Command execution failed:
cybermation.plugins.ftp.CybFTPException: java.net.SocketException: Broken pipe
at cybermation.plugins.ftp.client.CybFtpUploadCommand.execute(CybFtpUploadCommand.java:625)
 at cybermation.plugins.ftp.client.CybFTPClient.run(CybFTPClient.java:210)
 at java.lang.Thread.run(Unknown Source)
Caused by: cybermation.library.communications.CybConversationException:  java.net.SocketException: Broken pipe
...... 
at cybermation.plugins.ftp.client.CybFtpUploadCommand.uploadSinglePair(CybFtpUploadCommand.java:495) at cybermation.plugins.ftp.client.CybFtpUploadCommand.execute(CybFtpUploadCommand.java:597)
  at cybermation.plugins.ftp.client.CybFTPClient.run(CybFTPClient.java:210)
  at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Broken pipe
......
 at sun.security.ssl.OutputRecord.writeBuffer(Unknown Source)
 at sun.security.ssl.OutputRecord.write(Unknown Source)
 at sun.security.ssl.SSLSocketImpl.writeRecordInternal(Unknown Source)
 at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
 at sun.security.ssl.AppOutputStream.write(Unknown Source)
 at java.io.BufferedOutputStream.write(Unknown Source)
 at java.io.DataOutputStream.write(Unknown Source)
 at java.io.FilterOutputStream.write(Unknown Source)

                                                        
Environment:
CA Workload Automation System Agent 11.3
Cause:
The error "Command execution failed:cybermation.plugins.ftp.CybFTPException" is most likely due to permissions on the remote server.  When uploading the file, the SFTP client (CA Agent) tries to rename or replace the file that already exists on the remote host.  Based on the user permissions, this may not be allowed.
Resolution:
Rename the file that is being uploaded to some other name.  Once done, resubmit the job again.

Note:  If the job requires to replace an existing file, then please consult the remote host administrator to add proper privileges to the username that is used in the SFTP job.
 
Additional Information:
You may also try to connect to the remote host with an SFTP client like FileZilla.  It can provide a listing of the remote files and permissions on the files.