Skip to content

failed to authenticate decrypted block - bad password? #677

Closed

Description

@makaveli96

I routinely get these types of errors and sometimes have to end up transferring files multiple times before they work fully. Is there any way to limit the number of these types of errors?

What is your rclone version (eg output from rclone -V)
1.33

Which OS you are using and how many bits (eg Windows 7, 64 bit)
Windows 10 64bit

Which cloud storage system are you using? (eg Google Drive)
Amazon Cloud Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone -v --checksum --transfers=16 --checkers=16 copy acd:"data/files" C:\downloads

A log from the command with the -v flag (eg output from rclone -v copy /tmp remote:tmp)
2016/09/02 11:12:45 2fhrjhHR83urhfstrnf89.part052.rar: Failed to copy: failed to authenticate 2016/09/02 11:15:40 pacer: Rate limited, sleeping for 947.77941ms (1 consecutive low level retries)
2016/09/02 11:15:40 pacer: low level retry 1/10 (error HTTP code 504: "504 GATEWAY_TIMEOUT", no response body
)
2016/09/02 11:15:41 2fhrjhHR83urhfstrnf89.part004.rar: Copied (new)
2016/09/02 11:15:42 pacer: Resetting sleep to minimum 20ms on success
2016/09/02 11:15:58 2fhrjhHR83urhfstrnf89.part012.rar: Copied (new)
2016/09/02 11:16:00 2fhrjhHR83urhfstrnf89.part071.rar: Failed to copy: failed to authenticate decrypted block - bad password?

Activity

  1. ncw commented on Sep 3, 2016

    @ncw
    Member

    Where is the encryption coming in? Are you using rclone's encryption too? If not are you using another encryption layer somewhere?

    I'm trying to figure out where this error comes from: "failed to authenticate decrypted block - bad password?"

  2. makaveli96 commented on Sep 3, 2016

    @makaveli96
    Author

    I'm using rclone's built in encryption. Added amazon cloud config first and then added an encrypted config in rclone and setup a password and salt during the process.

    I refreshed the local directory when I saw the error again now. What I noticed is the file giving the 'failed to authenticate decrypted block - bad password' was around 90% complete, so maybe rclone is attempting to decrypt files that haven't fully been downloaded yet?

  3. ncw commented on Sep 5, 2016

    @ncw
    Member

    What it looks like to me is that the files are being truncated on download - amazon, or your ISP or your router is killing the connections.

    Because rclone decrypts the file on the fly, when it gets an unexpected end of file, it will attempt to decrypt the last incomplete block and you'll get that "failed to authenticate decrypted block" error.

    rclone should just retry the file though.

    I'm not 100% satisfied with that explanation though... Can you send me a complete log (with the stats output too) so I can see the progress? Email it to [email protected] if you want to keep it private.

    Thanks

    Nick

  4. ncw commented on Sep 19, 2016

    @ncw
    Member

    Any news on the log?

  5. DurvalMenezes commented on Oct 9, 2016

    @DurvalMenezes
    Contributor

    Hello,

    As stated here, I've been seeing those errors too, namely during "rclone copy" operations from an encrypted remote configured on top of Amazon Cloud Drive to the local file system.

    Every time I saw these errors, I waited for the transfer to finish and then checked the file indicated in the message (using an MD5 hash I'd calculated beforehand) and the file was perfectly OK, so rclone must have taken care of the error.

    I haven't saved the "-v" logs produced for those files, so I will try to reproduce the error with "-v --log-file" and then post the log here. Should I bring the entire log, or just a section around the error?

    Cheers,
    Durval.

  6. DurvalMenezes commented on Oct 9, 2016

    @DurvalMenezes
    Contributor

    Hi,

    I haven't saved the "-v" logs produced for those files, so I will try to reproduce the error with "-v --log-file" and then post the log here. Should I bring the entire log, or just a section around the error?

    Just reproduced the error, in a relatively small transfer (less than 1000 files) so the resulting log size isn't so large. Please find the complete log attached.

    It seems I can reproduce these errors quite easily on my setup, so if you need me to test any modifications, gather more data or whatever, just ask.

    Cheers,
    Durval.

    LOCDIR_log.zip

  7. ncw commented on Oct 10, 2016

    @ncw
    Member

    Thanks for the log. I had a go at reproducing this without any luck.

    What I suspect is that some external agent (Amazon, your ISP, your firewall, your PC) is closing connections prematurely and the error in decryption is masking the other error.

    Could you try adding --stats 1s say, and see whether you can get it to do it again and get some idea of whether you think the file was at 100% or not when the error happened.

  8. DurvalMenezes commented on Oct 10, 2016

    @DurvalMenezes
    Contributor

    Hello Nick,

    What I suspect is that some external agent (Amazon, your ISP, your firewall, your PC) is closing connections prematurely and the error in decryption is masking the other error.

    Could be Amazon (not enough experience with them yet), but I don't believe in the ISP, firewall or PC doing it (all under my control). Anyway, I see your point.

    Could you try adding --stats 1s say, and see whether you can get it to do it again and get some idea of whether you think the file was at 100% or not when the error happened.

    Doing it right away. Will update this comment with the file attached when it's done.
    EDIT: please find the file attached.
    LOCDIR.zip

    Cheers,
    Durval.

  9. DurvalMenezes commented on Oct 10, 2016

    @DurvalMenezes
    Contributor

    Just noticed editing a previous comment doesn't mark the issue as updated; added this new comment to make sure it shows up on everyone's radar.

  10. added this to the v1.35 milestone on Oct 20, 2016
  11. ncw commented on Oct 20, 2016

    @ncw
    Member

    Thanks for the log @DurvalMenezes

    I'm pretty sure that the problem is caused by some internet glitch interrupting the download, but rclone is reporting the wrong error.

    I'll try and reproduce this in a test case

  12. DurvalMenezes commented on Oct 21, 2016

    @DurvalMenezes
    Contributor

    @ncw you are most welcome!
    BTW, I think I can reproduce that error pretty much at will here. If it would help, I can try capturing a pcap file for a session using tcpdump and send it to you. Please let me know if you'd find that useful.

  13. ncw commented on Oct 24, 2016

    @ncw
    Member

    Here is an experimental fix for that error. It will produce a different error instead of the spurious failed to authenticate decrypted block - something to do with the connection breaking would be my guess.

    http://pub.rclone.org/v1.33-81-gef17f90-readfull-fix%CE%B2/

    I'm on the trail of the underlying error, but I need to confirm I'm going in the right direction, so any testing appreciated.

  14. 1 remaining item

  15. ncw commented on Oct 27, 2016

    @ncw
    Member

    I found a bit of missing locking in the FUSE module which can also produce this error message. Here is a beta with the fix - let me know if it works: http://beta.rclone.org/v1.33-83-g8710741/ (will be uploaded in 15-30 mins)

  16. ncw commented on Nov 7, 2016

    @ncw
    Member

    You should find this issue is completely fixed in v1.34 so I'm going to close this issue. If you are still having problems, then please open a new issue with logs of the problem.

  17. nummersyv commented on Dec 11, 2016

    @nummersyv

    Still receiving this error on Debian Jessie using rclone v1.34. Seems to be related to pausing and resuming the video in VLC (<1GB file).

    Keep up the good work! \o/

  18. DurvalMenezes commented on Dec 15, 2016

    @DurvalMenezes
    Contributor

    Hello folks,

    Running v1.34 on Devuan 1.0 (Debian Jessie's systemd-free fork).

    I'm getting this same error in about 5% of the files being copied from an AmazonCloudDrive remote to a GoogleDrive remote (both encrypted), done with a straight "rclone copy" (so no seeking, pausing, resuming or anything).

    Also, there are absolutely no other errors around these "Failed to copy: failed to authenticate decrypted block - bad password?", they seem to happen completely out of the blue in completely random files (small and large alike). I'm not even hammering the Amazon Cloud Drive source remote too much, due to GoogleDrive throttling of new file creation.

    @ncw if you need anything to help debug these, please let me know.

    Cheers,
    Durval.

  19. nummersyv commented on Dec 16, 2016

    @nummersyv

    Did you try the latest beta version from beta.rclone.org? This error should've been fixed since ec0916c

  20. DurvalMenezes commented on Dec 17, 2016

    @DurvalMenezes
    Contributor

    Hello @nummersyv,

    Did you try the latest beta version from beta.rclone.org? This error should've been fixed since ec0916c

    So I upgraded to the latest rclone beta, and repeated the test, and again got this error:

    2016/12/16 19:02:47 rclone: Version "v1.34-23-gc41b67e<CE><B2>" starting with parameters ["rclone" "--low-level-retries=10" "-v" "--log-file=LOGFILE" "copy" "ENCACD:DIR" "ENCGD:DIR"]
    [...]
    2016/12/16 19:55:17 DIR/SUBDIR/FILE.EXT: Failed to copy: failed to authenticate decrypted block - bad password?
    

    So it seems #ec0916c didn't fix it, or at least not completely.

    If you or @ncw need me to run any further tests, I'm at your disposal.

    Cheers,
    Durval.

  21. nummersyv commented on Dec 17, 2016

    @nummersyv

    Something must've gone wrong when you updated; according to the provided log you are running v1.34-23-gc41b67e but the latest version available on beta.rclone.org is v1.34-71-g4482e75 as seen here.

  22. dcplaya commented on Dec 24, 2016

    @dcplaya

    I am on v1.34-75 beta and I am now seeing

    ReadFileHandle.Read error: low level retry 2/10: unexpected EOF

    instead of the bad auth error.

  23. DurvalMenezes commented on Jan 4, 2017

    @DurvalMenezes
    Contributor

    Hello folks,

    Sorry for the delay in getting back to you on this, a lot has changed here, including my replacing AmazonCloudDrive with GoogleDrive (an unlimited academic account I had laying around here), so now I'm using Google Drive exclusively.

    And... I'm still getting those errors :-/ Current scenario is sequentially reading (using "md5sum -c") a series of files from an "rclone --low-level-retries=100 mount --no-modtime --no-seek --read-only" filesystem, and I get a lot of these on the md5sum output:

    2017/01/04 09:48:33 REDACTED/MVI_6190.MOV: ReadFileHandle.Read error: low level retry 2/100: failed to authenticate decrypted block - bad password?
    md5sum: REDACTED/MVI_6190.MOV: Input/output error
    REDACTED/MVI_6190.MOV: FAILED open or read
    

    What can I do to help you fix this?

    Thanks,
    Durval.

  24. ncw commented on Jan 4, 2017

    @ncw
    Member

    @dcplaya thanks - that is what I was hoping to see. Unexpected EOF is caused by a networking problem somewhere.

  25. ncw commented on Jan 4, 2017

    @ncw
    Member

    @DurvalMenezes Are you trying the latest rclone? 1.35 should do, or the latest beta? That should work better.

    You need to look in the log from rclone to see what is really happening (with -v)

  26. DurvalMenezes commented on Jan 7, 2017

    @DurvalMenezes
    Contributor

    Hello everyone,

    Update: I've tried copying the same files that were giving me the above error to my local machine (with "rclone copy") and I'm getting that exact same error ("failed to authenticate decrypted block - bad password?"), and those errors are 100% reproducible, so I don't think they are being caused by connections being closed or reset.

    As this issue has been closed and I can't reopen it, I'm opening a new issue for this latest development.

    Cheers,
    Durval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions