What is the problem you are having with rclone?
We are using rclone to transmit our files to a client's SFTP server. The files were successfully uploaded. But when the TCP connections are closed at the end of the process, "Use of Closed network Connection" error is thrown.
Run the command 'rclone version' and share the full output of the command.
xxxxxxxxxx@xxxxx01:~$ rclone version
rclone v1.67.0
- os/version: ubuntu 22.04 (64 bit)
- os/kernel: 5.15.0-86-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.22.4
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
SFTP
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone --config="/path/to/config/file" ls profile_name:/
A log from the command that you were trying to run
2024/07/08 11:26:00 DEBUG : rclone: Version "v1.67.0" starting with parameters ["rclone" "-vv" "--config=/path/to/config/file" "ls" "lxxxxxxxx:/Fxxxxx"]
2024/07/08 11:26:00 DEBUG : Creating backend with remote "lxxxxxxxx:/Fxxxxx"
2024/07/08 11:26:00 DEBUG : Using config file from "/path/to/config/file"
2024/07/08 11:26:00 DEBUG : sftp://FXXXXXX-DIXXXXX@edi-xxxxx.lxxxxxxxxx.com:22//Fxxxxx: New connection 10.101.20.21:47756->207.97.211.195:22 to "SSH-2.0-FileZillaProEnterpriseServer_1.8.7"
2024/07/08 11:26:00 DEBUG : sftp://FXXXXXX-DIXXXXX@edi-xxxxx.lxxxxxxxxx.com:22//Fxxxxx: Shell type "none" from config
2024/07/08 11:26:00 DEBUG : sftp://FXXXXXX-DIXXXXX@edi-xxxxx.lxxxxxxxxx.com:22//Fxxxxx: Using root directory "/Fxxxxx"
<List of files>
2024/07/08 11:28:27 DEBUG : 13 go routines active
2024/07/08 11:28:27 DEBUG : sftp://FXXXXXX-DIXXXXX@edi-xxxxx.lxxxxxxxxx.com:22//Fxxxxx: Closing 1 unused connections
2024/07/08 11:28:27 Failed to ls: close tcp xxx.xxx.xxx.xxx:58486->xxx.xxx.xxx.xxx:22: use of closed network connection
From the logs, it seemed that the remote SFTP server was too eager to close the unused TCP connections. As the result, when rclone attempted to close these connections, it failed to do so due to "use of closed network connection".
Is there a way to bypass this error and let rclone exit gracefully as this issue gave us a lot of false alarms?
Thank you very much.