Update stat failed: stat failed: sftp: "" (SSH_FX_FAILURE)

Hello,
I tried all possible flags for rclone to ignore checking on remote files but it still tries as I see.
The vendor says we are trying a statPut which is why it's failing and try just put.

Appreciate your inputs and thank you in advance.
Shirish

What is the problem you are having with rclone?

Failed to copy: Update stat failed: stat failed: sftp: "" (SSH_FX_FAILURE)

Run the command 'rclone version' and share the full output of the command.

rclone v1.67.0

  • os/version: centos 7.7.1908 (64 bit)
  • os/kernel: 3.10.0-1062.12.1.el7.x86_64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.22.4
  • go/linking: static
  • go/tags: none

Are you on the latest version of rclone? You can validate by checking the version listed here: Rclone downloads
Yes

Which cloud storage system are you using?

S3 and sftp

The command you were trying to run (eg rclone copy /tmp remote:tmp)

+ ./rclone_1.67 move --config=tmp.conf -vvvvvv s3:data-files/reports/outgoing_uat/ vendor_uat:put/ --no-check-dest --sftp-set-modtime=false --inplace --sftp-disable-hashcheck --ignore-checksum --sftp-shell-type=cmd --no-traverse --sftp-use-fstat

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[qrt-s3]
type = s3
env_auth = true
region = eu-west-1
location_constraint = eu-west-1
acl = bucket-owner-full-control
server_side_encryption = AES256
storage_class = STANDARD

[vendor_uat]
type = sftp
host = svendor_uat_host
user = user
port = 22
pass = obscrured passwd

A log from the command that you were trying to run with the -vv flag

+ ./rclone_1.67 move --config=tmp.conf -vvvvvv s3:data-files/reports/outgoing_uat/ vendor_uat:put/ --no-check-dest --sftp-set-modtime=false --inplace --sftp-disable-hashcheck --ignore-checksum --sftp-shell-type=cmd --no-traverse --sftp-use-fstat
2024/07/16 10:56:36 DEBUG : rclone: Version "v1.67.0" starting with parameters 
2024/07/16 10:56:36 DEBUG : Creating backend with remote "s3:data-files/reports/outgoing_uat/"
2024/07/16 10:56:36 DEBUG : Using config file from "/data_trials/APAC/tmp.conf"
2024/07/16 10:56:36 NOTICE: s3: s3 provider "" not known - please set correctly
2024/07/16 10:56:36 DEBUG : fs cache: renaming cache item "vendor_uat:put/" to be canonical "vendor_uat:put/"
2024/07/16 10:56:36 DEBUG : Creating backend with remote "vendor_uat:put/"
2024/07/16 10:56:36 DEBUG : vendor_uat: detected overridden config - adding "{ZGc4v}" suffix to name
2024/07/16 10:56:38 DEBUG : sftp://user@svendor_uat_host:22/put/: New connection 100.69.23.201:60924->207.45.41.185:22 to "SSH-2.0-DataPowerSSH_1.1"
2024/07/16 10:56:38 DEBUG : sftp://user@svendor_uat_host:22/put/: Shell type "cmd" from config
2024/07/16 10:56:38 DEBUG : sftp://user@svendor_uat_host:22/put/: Relative path resolved to "/apps/cdts/data_in_datapower/put/"
2024/07/16 10:56:38 DEBUG : sftp://user@svendor_uat_host:22/put/: Using root directory "/apps/cdts/data_in_datapower/put/"
2024/07/16 10:56:38 DEBUG : fs cache: renaming cache item "vendor_uat:put/" to be canonical "vendor_uat{ZGc4v}:put/"
2024/07/16 10:56:38 ERROR : : Entry doesn't belong in directory "" (same as directory) - ignoring
2024/07/16 10:56:38 DEBUG : filename.S60317: Need to transfer - File not found at Destination
2024/07/16 10:56:38 DEBUG : sftp://user@svendor_uat_host:22/put/: Waiting for checks to finish
2024/07/16 10:56:38 DEBUG : sftp://user@svendor_uat_host:22/put/: Waiting for transfers to finish
2024/07/16 10:56:43 ERROR : filename.S60317: Failed to copy: Update stat failed: stat failed: sftp: "" (SSH_FX_FAILURE)
2024/07/16 10:56:43 ERROR : filename.S60317: Not deleting source as copy failed: Update stat failed: stat failed: sftp: "" (SSH_FX_FAILURE)
2024/07/16 10:56:43 ERROR : Attempt 1/3 failed with 1 errors and: Update stat failed: stat failed: sftp: "" (SSH_FX_FAILURE)
2024/07/16 10:56:43 ERROR : : Entry doesn't belong in directory "" (same as directory) - ignoring
2024/07/16 10:56:43 DEBUG : filename.S60317: Need to transfer - File not found at Destination
2024/07/16 10:56:43 DEBUG : sftp://user@svendor_uat_host:22/put/: Waiting for checks to finish
2024/07/16 10:56:43 DEBUG : sftp://user@svendor_uat_host:22/put/: Waiting for transfers to finish
2024/07/16 10:56:48 ERROR : filename.S60317: Failed to copy: Update stat failed: stat failed: sftp: "" (SSH_FX_FAILURE)
2024/07/16 10:56:48 ERROR : filename.S60317: Not deleting source as copy failed: Update stat failed: stat failed: sftp: "" (SSH_FX_FAILURE)
2024/07/16 10:56:48 ERROR : Attempt 2/3 failed with 1 errors and: Update stat failed: stat failed: sftp: "" (SSH_FX_FAILURE)
2024/07/16 10:56:48 ERROR : : Entry doesn't belong in directory "" (same as directory) - ignoring
2024/07/16 10:56:48 DEBUG : filename.S60317: Need to transfer - File not found at Destination
2024/07/16 10:56:48 DEBUG : sftp://user@svendor_uat_host:22/put/: Waiting for checks to finish
2024/07/16 10:56:48 DEBUG : sftp://user@svendor_uat_host:22/put/: Waiting for transfers to finish
2024/07/16 10:56:53 ERROR : filename.S60317: Failed to copy: Update stat failed: stat failed: sftp: "" (SSH_FX_FAILURE)
2024/07/16 10:56:53 ERROR : filename.S60317: Not deleting source as copy failed: Update stat failed: stat failed: sftp: "" (SSH_FX_FAILURE)
2024/07/16 10:56:53 ERROR : Attempt 3/3 failed with 1 errors and: Update stat failed: stat failed: sftp: "" (SSH_FX_FAILURE)
2024/07/16 10:56:53 INFO  : 
Transferred:   	    5.227 MiB / 5.227 MiB, 100%, 382.357 KiB/s, ETA 0s
Errors:                 1 (retrying may help)
Elapsed time:        16.3s

I wonder what that means...

Can you try without this flag --sftp-set-modtime=false and send the log. That will avoid the stat which is failing but might go wrong in a different way.

Also did you try without this flag?

  --sftp-use-fstat                          If set use fstat instead of stat

Do the files disappear on the server when they are uploaded? Rclone has a workaround for that already, but it is expecting the stat call to return "file not found" rather than some general error.

Hello Nick,

I tried with just the following,
--no-check-dest --inplace --sftp-disable-hashcheck --ignore-checksum --no-traverse

2024/07/17 15:21:59 DEBUG : filename.S60317: Need to transfer - File not found at Destination
2024/07/17 15:21:59 DEBUG : sftp://user@svendor_uat_host:22/put/: Waiting for checks to finish
2024/07/17 15:21:59 DEBUG : sftp://user@svendor_uat_host:22/put/: Waiting for transfers to finish
2024/07/17 15:22:03 ERROR : filename.S60317: Failed to copy: Update SetModTime failed: SetModTime failed: sftp: "" (SSH_FX_OP_UNSUPPORTED)
2024/07/17 15:22:03 ERROR : filename.S60317: Not deleting source as copy failed: Update SetModTime failed: SetModTime failed: sftp: "" (SSH_FX_OP_UNSUPPORTED)
2024/07/17 15:22:03 ERROR : Attempt 1/3 failed with 1 errors and: Update SetModTime failed: SetModTime failed: sftp: "" (SSH_FX_OP_UNSUPPORTED)
2024/07/17 15:22:03 ERROR : : Entry doesn't belong in directory "" (same as directory) - ignoring

Thanks for your attention,
shirish

Thanks for trying @shirish

Can you answer this question?

ERROR : : Entry doesn't belong in directory "" (same as directory) - ignoring
could that be an s3 error, and not an sftp error?

should fix that and test again.

in the command, the remote is s3:
but did not see that in the posted config?

and just curios about --sftp-shell-type=cmd
the sftp server is running on a windows server and the shell is Windows Command Prompt

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.