SFTP file transfer task returns status_code=4
Posted: Wed Feb 13, 2019 5:57 pm
Question:
In a job log, during an SFTP file transfer, you receive an error stating “status_code=4”
Stack trace example: (the status_code=4 is found in the "Caused by" paragraph)
Answer:
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:
In a job log, during an SFTP file transfer, you receive an error stating “status_code=4”
Stack trace example: (the status_code=4 is found in the "Caused by" paragraph)
Code: Select all
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
Answer:
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 file to name of 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.