Page 1 of 1

SFTP file transfer task returns status_code=4

Posted: Wed Feb 13, 2019 5:57 pm
by Support_Julie
Overview
In a job log, during an SFTP file transfer, an error stating “status_code=4” is shown. This article addresses why this error occurs and how to resolve it.
Stack trace example:
(the status_code=4 is found in the "Caused by" section)

com.linoma.dpa.ExecutionException: [8098 - SFTP] java.net.SocketException: There is no process to read data written to a pipe.
at com.linoma.ga.projects.ProjectUtilities.getExecutionException(Unknown Source)
at com.linoma.ga.projects.impl.GoAnywhereProjectUtilities.getExecutionException(Unknown Source)
at com.linoma.ga.projects.tasks.ftp.PutAction.execute(Unknown Source)
at com.linoma.ga.projects.tasks.ftp.AbstractFTPTask.execute(Unknown Source)
at com.linoma.ga.projects.Module.execute(Unknown Source)
at com.linoma.ga.projects.Project.execute(Unknown Source)
at com.linoma.ga.projects.runtime.Job.executeProject(Unknown Source)
at com.linoma.ga.projects.runtime.Job.run(Unknown Source)
at com.linoma.dpa.util.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at com.linoma.dpa.util.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:804)
Caused by: com.linoma.ga.projects.tasks.ftp.FTPInterfaceException: java.net.SocketException: There is no process to read data written to a pipe.
at com.linoma.ga.projects.tasks.ftp.SFTPImpl.upload(Unknown Source)
at com.linoma.ga.projects.tasks.ftp.PutAction.processFile(Unknown Source)
at com.linoma.ga.projects.tasks.ftp.PutAction.uploadFiles(Unknown Source)
... 9 more
Caused by: java.net.SocketException: There is no process to read data written to a pipe. (status_code=4)
at com.jcraft.jsch.ChannelSftp._put(Unknown Source)
at com.jcraft.jsch.ChannelSftp.put(Unknown Source)
... 12 more


Environment
GoAnywhere MFT - all versions

Resolution
status_code=4 is a message coming from the SFTP server.
You will need to contact your trading partner to find out what the error indicates.

status_code=4 could mean several things:
Note that not all servers use all codes. Most SSH/SFTP servers, including the most commonly used OpenSSH, support only SFTP version 3 that defines only codes 0 to 8.

These servers would generally use code 4 (Failure) for many errors for which there is specific code defined in later versions of SFTP protocol, such as:
  • Renaming a file to the name of an already existing file.
  • Creating directory that already exists.
  • Moving remote file to different filesystem (HDD).
  • Uploading file to full filesystem (HDD).
  • Exceeding user disk quota.
It’s best practice to compare client and server logs, so you have all the relevant information to determine what could be causing the error message. Keep in mind, a job log with debug log level will help you see the lower level commands between the SFTP client and server.