Ssh_fx_bad_message

I am attempting to sync a directory to a crypt remote. Before adding the crypt, the sync worked fine with 0 errors. Now im getting this at the end of the sync.

2018/05/18 09:28:14 INFO : Encrypted drive ‘encrypted:’: Waiting for transfers to finish
2018/05/18 09:28:14 ERROR : Encrypted drive ‘encrypted:’: not deleting files as there were IO errors
2018/05/18 09:28:14 ERROR : Encrypted drive ‘encrypted:’: not deleting directories as there were IO errors
2018/05/18 09:28:14 ERROR : Attempt 3/3 failed with 102 errors and: Update Create failed: sftp: “Bad message” (SSH_FX_BAD_MESSAGE)
2018/05/18 09:28:14 Failed to sync: Update Create failed: sftp: “Bad message” (SSH_FX_BAD_MESSAGE)

remote is debian 9 with SSH and client is windows 10 pro

The logs dont indicate why this is failing and im at an impasse here :frowning:

Add -vv to your command line and you’ll get some more info.

2018/05/26 21:16:24 DEBUG : music/library/not State Champs/Apparently, I’m Nothing/03 I Would Try.mp3: Unchanged skipping
2018/05/26 21:16:24 DEBUG : music/library/not State Champs/Apparently, I’m Nothing/04 If It Helps You Focus.mp3: Size and modification time the same (differ by 0s, within tolerance 1s)
2018/05/26 21:16:24 DEBUG : music/library/not State Champs/Apparently, I’m Nothing/04 If It Helps You Focus.mp3: Unchanged skipping
2018/05/26 21:16:24 DEBUG : music/library/not State Champs/Around the World and Back/10 Breaking Ground.mp3: Size and modification time the same (differ by 0s, within tolerance 1s)
2018/05/26 21:16:24 DEBUG : music/library/not State Champs/Around the World and Back/10 Breaking Ground.mp3: Unchanged skipping
2018/05/26 21:16:24 INFO : sftp://joek@nv1.makaiwell.com:22//home/joek/backups/fs1: Waiting for checks to finish
2018/05/26 21:16:24 INFO : sftp://joek@nv1.makaiwell.com:22//home/joek/backups/fs1: Waiting for transfers to finish
2018/05/26 21:16:24 ERROR : sftp://joek@nv1.makaiwell.com:22//home/joek/backups/fs1: not deleting files as there were IO errors
2018/05/26 21:16:24 ERROR : Attempt 3/3 failed with 14 errors and: Update ReadFrom failed: sftp: “Failure” (SSH_FX_FAILURE)
2018/05/26 21:16:24 Failed to sync: Update ReadFrom failed: sftp: “Failure” (SSH_FX_FAILURE)
joek@fs1:~$

Im thinking the filenames or something with the encryption is causing errors.

Earlier in the log it will tell you which file it was having a problem with. If you grep for ERROR you’ll find it.

I suspect it will be some sort of UTF-8 problem but hopefully the log will show…

http://makaiwell.com/downloads/rclone%20logs.txt

What filing system are you copying to on the debian box?

The errors appear to happen on very long file names so maybe the destination file system isn’t coping with file names over 256 characters? This might explain why it worked before as crypt increases the size of the file names by 8/5.

my FS is NTFS client side and ext4 on the debian 9 server side

I think you probably are being bitten by file names that are too long. ext4 can have an individual file name of length maximum 255 characters so if you have any file names of longer than 155 or so characters then they will exceed that maximum. I can see in the log that appears to be the case.

You can either

  • shorten the file names
  • or switch to a different name encryption mode (either obfusctated or off)

Noted. I cant really decide what files are in the sync. Perhaps you can add a flag to check or ignore files with a name length over a certain value?

Yes there is an issue about this: https://github.com/ncw/rclone/issues/762

I haven’t had time to work on it alas - fancy having a go? I’m happy to walk you through the process.