• "Wrong Key!" error on starting array after upgrading to 6.8


    NREES87
    • Solved Minor

    Upgraded my test box to 6.8.0 stable this morning and am now unable to decrypt the array (using the same passphrase as I've used for the last year!).

     

    I experienced exactly the same issue with rc4 (see here and screenshot). If I roll back to 6.7.X - everything goes back to being fully functional.

     

    TIA,

    Nate

    image.png




    User Feedback

    Recommended Comments



    1 minute ago, novicode said:

    Yeah, that's what happens so that shouldn't be an issue.

    When you originally encrypted your devices you were running 6.8.1 and you specified "Passphrase" method of specifying the key... is this exactly correct?

    Link to comment
    Just now, limetech said:

    When you originally encrypted your devices you were running 6.8.1 and you specified "Passphrase" method of specifying the key... is this exactly correct?

    Yes, exactly.

    Link to comment
    9 minutes ago, novicode said:

    Yes, exactly.

    Well, please send me your passphrase in PM.  You can change the alpha-numerics around but don't change the length or position of any non-alphanumerics.

    Link to comment
    47 minutes ago, limetech said:

    Well, please send me your passphrase in PM.  You can change the alpha-numerics around but don't change the length or position of any non-alphanumerics.

    PM'd.

    Link to comment
    22 hours ago, limetech said:

    Changed Status to Solved

     

    Just write "use keyfile" or "only ASCII" is not solving the problem in my opinion. If anything, it's a workaround.

    Link to comment

    Hello, I am actually facing the opposite. I configured encryption with passphrase, however, I am now fetching the keyfile from an external source. When the keyfile is finally available, the system rejects it saying it's "Missing key" and fails to decrypt disks:

    Quote

    Dec  2 02:59:54 <server> emhttpd: Opening encrypted volumes...
    Dec  2 02:59:54 <server> emhttpd: shcmd (27): /usr/sbin/cryptsetup luksOpen /dev/md1 md1 --allow-discards --key-file=/root/keyfile
    Dec  2 02:59:54 <server> kernel: device-mapper: ioctl: 4.39.0-ioctl (2018-04-03) initialised: [email protected]
    Dec  2 02:59:57 <server> root: No key available with this passphrase.
    Dec  2 02:59:57 <server> emhttpd: shcmd (27): exit status: 2
    Dec  2 02:59:57 <server> emhttpd: shcmd (29): /usr/sbin/cryptsetup luksOpen /dev/md2 md2 --allow-discards --key-file=/root/keyfile
    Dec  2 02:59:59 <server> root: No key available with this passphrase.
    Dec  2 02:59:59 <server> emhttpd: shcmd (29): exit status: 2
    Dec  2 02:59:59 <server> emhttpd: shcmd (31): /usr/sbin/cryptsetup luksOpen /dev/md3 md3 --allow-discards --key-file=/root/keyfile
    Dec  2 03:00:01 <server> root: No key available with this passphrase.
    Dec  2 03:00:01 <server> emhttpd: shcmd (31): exit status: 2
    Dec  2 03:00:01 <server> emhttpd: shcmd (33): /usr/sbin/cryptsetup luksOpen /dev/md4 md4 --allow-discards --key-file=/root/keyfile
    Dec  2 03:00:02 <server> root: No key available with this passphrase.
    Dec  2 03:00:02 <server> emhttpd: shcmd (33): exit status: 2
    Dec  2 03:00:02 <server> emhttpd: shcmd (35): /usr/sbin/cryptsetup luksOpen /dev/md5 md5 --allow-discards --key-file=/root/keyfile
    Dec  2 03:00:03 <server> root: No key available with this passphrase.
    Dec  2 03:00:03 <server> emhttpd: shcmd (35): exit status: 2
    Dec  2 03:00:03 <server> emhttpd: Wrong encryption key
    Dec  2 03:00:03 <server> kernel: mdcmd (42): stop 

     

    I checked the contents of the file and its as expected, no added spaces, no tabs or anything of the sort. If I delete the keyfile and then use passphrase it does work however. Even if I create the keyfile as

    Quote

    echo "thepassphrase" > /root/keyfile

    it still gets rejected. I also performed a diff between the downloaded keyfile and the file generated by the echo method and it comes out clean.

    Quote

    <Run logic to fetch file into /root/keyfile>

    cat /root/keyfile

    thepassphrase

    echo "thepassphrase" > /root/otherfile

    diff /root/keyfile /root/otherfile

    (passphrase is not actually thepassphrase but you get the idea...)

     

    Am I missing a step?

     

    Thanks in advance!

    Link to comment
    1 hour ago, Krythel said:

    Hello, I am actually facing the opposite.

    (...)

     

    Am I missing a step?

    Try:

     

    echo -n "thepassphrase" > /root/keyfile

    See if it helps.

    Edited by doron
    Link to comment

    After a reboot to check a noisy case fan, I could myself unable to start my array due to "missing key". Neither entering my passphase or using a keyfile work to start the array. I'm using unRaid 6.8.3.

    Quote

    Jan 4 14:52:52 usul emhttpd: shcmd (539): /usr/sbin/cryptsetup luksOpen /dev/md2 md2 --allow-discards --key-file=/root/keyfile
    Jan 4 14:52:54 usul root: No key available with this passphrase.
    Jan 4 14:52:54 usul emhttpd: shcmd (539): exit status: 2
    Jan 4 14:52:56 usul emhttpd: shcmd (541): /usr/sbin/cryptsetup luksOpen /dev/md3 md3 --allow-discards --key-file=/root/keyfile
    Jan 4 14:52:58 usul root: No key available with this passphrase.
    Jan 4 14:52:58 usul emhttpd: shcmd (541): exit status: 2
    Jan 4 14:52:58 usul emhttpd: shcmd (543): /usr/sbin/cryptsetup luksOpen /dev/md4 md4 --allow-discards --key-file=/root/keyfile
    Jan 4 14:53:00 usul root: No key available with this passphrase.
    Jan 4 14:53:00 usul emhttpd: shcmd (543): exit status: 2
    Jan 4 14:53:00 usul emhttpd: shcmd (545): /usr/sbin/cryptsetup luksOpen /dev/md5 md5 --allow-discards --key-file=/root/keyfile
    Jan 4 14:53:01 usul root: No key available with this passphrase.
    Jan 4 14:53:01 usul emhttpd: shcmd (545): exit status: 2
    Jan 4 14:53:01 usul emhttpd: shcmd (547): /usr/sbin/cryptsetup luksOpen /dev/md6 md6 --allow-discards --key-file=/root/keyfile
    Jan 4 14:53:03 usul root: No key available with this passphrase.
    Jan 4 14:53:03 usul emhttpd: shcmd (547): exit status: 2
    Jan 4 14:53:03 usul emhttpd: shcmd (549): /usr/sbin/cryptsetup luksOpen /dev/md7 md7 --allow-discards --key-file=/root/keyfile
    Jan 4 14:53:05 usul root: No key available with this passphrase.
    Jan 4 14:53:05 usul emhttpd: shcmd (549): exit status: 2
    Jan 4 14:53:05 usul emhttpd: shcmd (551): /usr/sbin/cryptsetup luksOpen /dev/md8 md8 --allow-discards --key-file=/root/keyfile
    Jan 4 14:53:06 usul root: No key available with this passphrase.
    Jan 4 14:53:06 usul emhttpd: shcmd (551): exit status: 2
    Jan 4 14:53:06 usul emhttpd: shcmd (553): /usr/sbin/cryptsetup luksOpen /dev/md9 md9 --allow-discards --key-file=/root/keyfile
    Jan 4 14:53:08 usul root: No key available with this passphrase.
    Jan 4 14:53:08 usul emhttpd: shcmd (553): exit status: 2
    Jan 4 14:53:08 usul emhttpd: shcmd (555): /usr/sbin/cryptsetup luksOpen /dev/md10 md10 --allow-discards --key-file=/root/keyfile
    Jan 4 14:53:10 usul root: No key available with this passphrase.
    Jan 4 14:53:10 usul emhttpd: shcmd (555): exit status: 2
    Jan 4 14:53:10 usul emhttpd: Wrong encryption key
    Jan 4 14:53:10 usul kernel: mdcmd (102): stop
    Jan 4 14:53:10 usul kernel: md1: stopping
    Jan 4 14:53:10 usul kernel: md2: stopping
    Jan 4 14:53:10 usul kernel: md3: stopping
    Jan 4 14:53:10 usul kernel: md4: stopping
    Jan 4 14:53:10 usul kernel: md5: stopping
    Jan 4 14:53:10 usul kernel: md6: stopping
    Jan 4 14:53:10 usul kernel: md7: stopping
    Jan 4 14:53:10 usul kernel: md8: stopping
    Jan 4 14:53:10 usul kernel: md9: stopping
    Jan 4 14:53:10 usul kernel: md10: stopping
    Jan 4 14:57:49 usul apcupsd[8318]: Communications with UPS lost.
    Jan 4 14:58:03 usul emhttpd: shcmd (856): /usr/local/sbin/set_ncq sdn 1
    Jan 4 14:58:03 usul kernel: mdcmd (103): set md_num_stripes 1280
    Jan 4 14:58:03 usul kernel: mdcmd (104): set md_queue_limit 80
    Jan 4 14:58:03 usul kernel: mdcmd (105): set md_sync_limit 5
    Jan 4 14:58:03 usul kernel: mdcmd (106): set md_write_method
    Jan 4 14:58:03 usul kernel: mdcmd (107): set spinup_group 0 0
    Jan 4 14:58:03 usul kernel: mdcmd (108): set spinup_group 1 0
    Jan 4 14:58:03 usul kernel: mdcmd (109): set spinup_group 2 0
    Jan 4 14:58:03 usul kernel: mdcmd (110): set spinup_group 3 0
    Jan 4 14:58:03 usul kernel: mdcmd (111): set spinup_group 4 0
    Jan 4 14:58:03 usul kernel: mdcmd (112): set spinup_group 5 0
    Jan 4 14:58:03 usul kernel: mdcmd (113): set spinup_group 6 0
    Jan 4 14:58:03 usul kernel: mdcmd (114): set spinup_group 7 0
    Jan 4 14:58:03 usul kernel: mdcmd (115): set spinup_group 8 0
    Jan 4 14:58:03 usul kernel: mdcmd (116): set spinup_group 9 0
    Jan 4 14:58:03 usul kernel: mdcmd (117): set spinup_group 10 0
    Jan 4 14:58:03 usul kernel: mdcmd (118): set spinup_group 29 0
    Jan 4 14:58:03 usul emhttpd: shcmd (857): echo 128 > /sys/block/sdn/queue/nr_requests
    Jan 4 14:58:03 usul emhttpd: shcmd (858): /usr/local/sbin/set_ncq sdo 1
    Jan 4 14:58:03 usul emhttpd: shcmd (859): echo 128 > /sys/block/sdo/queue/nr_requests
    Jan 4 14:58:03 usul emhttpd: shcmd (860): /usr/local/sbin/set_ncq sdm 1
    Jan 4 14:58:03 usul emhttpd: shcmd (861): echo 128 > /sys/block/sdm/queue/nr_requests
    Jan 4 14:58:03 usul emhttpd: shcmd (862): /usr/local/sbin/set_ncq sdl 1
    Jan 4 14:58:03 usul emhttpd: shcmd (863): echo 128 > /sys/block/sdl/queue/nr_requests
    Jan 4 14:58:04 usul emhttpd: shcmd (864): /usr/local/sbin/set_ncq sdh 1
    Jan 4 14:58:04 usul emhttpd: shcmd (865): echo 128 > /sys/block/sdh/queue/nr_requests
    Jan 4 14:58:04 usul emhttpd: shcmd (866): /usr/local/sbin/set_ncq sdk 1
    Jan 4 14:58:04 usul emhttpd: shcmd (867): echo 128 > /sys/block/sdk/queue/nr_requests
    Jan 4 14:58:04 usul emhttpd: shcmd (868): /usr/local/sbin/set_ncq sdj 1
    Jan 4 14:58:04 usul emhttpd: shcmd (869): echo 128 > /sys/block/sdj/queue/nr_requests
    Jan 4 14:58:04 usul emhttpd: shcmd (870): /usr/local/sbin/set_ncq sdi 1
    Jan 4 14:58:04 usul emhttpd: shcmd (871): echo 128 > /sys/block/sdi/queue/nr_requests
    Jan 4 14:58:04 usul emhttpd: shcmd (872): /usr/local/sbin/set_ncq sdg 1
    Jan 4 14:58:04 usul emhttpd: shcmd (873): echo 128 > /sys/block/sdg/queue/nr_requests
    Jan 4 14:58:04 usul emhttpd: shcmd (874): /usr/local/sbin/set_ncq sdf 1
    Jan 4 14:58:04 usul emhttpd: shcmd (875): echo 128 > /sys/block/sdf/queue/nr_requests
    Jan 4 14:58:04 usul emhttpd: shcmd (876): /usr/local/sbin/set_ncq sde 1
    Jan 4 14:58:04 usul emhttpd: shcmd (877): echo 128 > /sys/block/sde/queue/nr_requests
    Jan 4 14:58:04 usul emhttpd: shcmd (878): /usr/local/sbin/set_ncq sdd 1
    Jan 4 14:58:04 usul emhttpd: shcmd (879): echo 128 > /sys/block/sdd/queue/nr_requests
    Jan 4 14:58:04 usul kernel: mdcmd (119): start STOPPED
    Jan 4 14:58:04 usul kernel: unraid: allocating 61830K for 1280 stripes (12 disks)
    Jan 4 14:58:04 usul kernel: md1: running, size: 11718885324 blocks
    Jan 4 14:58:04 usul kernel: md2: running, size: 3907018532 blocks
    Jan 4 14:58:04 usul kernel: md3: running, size: 4883770532 blocks
    Jan 4 14:58:04 usul kernel: md4: running, size: 13672382412 blocks
    Jan 4 14:58:04 usul kernel: md5: running, size: 11718885324 blocks
    Jan 4 14:58:04 usul kernel: md6: running, size: 7814026532 blocks
    Jan 4 14:58:04 usul kernel: md7: running, size: 7814026532 blocks
    Jan 4 14:58:04 usul kernel: md8: running, size: 3907018532 blocks
    Jan 4 14:58:04 usul kernel: md9: running, size: 11718885324 blocks
    Jan 4 14:58:04 usul kernel: md10: running, size: 13672382412 blocks
    Jan 4 14:58:04 usul emhttpd: shcmd (880): udevadm settle
    Jan 4 14:58:04 usul emhttpd: Opening encrypted volumes...
    Jan 4 14:58:04 usul emhttpd: shcmd (883): /usr/sbin/cryptsetup luksOpen /dev/md1 md1 --allow-discards
    Jan 4 14:58:06 usul emhttpd: shcmd (886): /usr/sbin/cryptsetup luksOpen /dev/md2 md2 --allow-discards
    Jan 4 14:58:08 usul emhttpd: shcmd (889): /usr/sbin/cryptsetup luksOpen /dev/md3 md3 --allow-discards
    Jan 4 14:58:10 usul emhttpd: shcmd (892): /usr/sbin/cryptsetup luksOpen /dev/md4 md4 --allow-discards
    Jan 4 14:58:11 usul emhttpd: shcmd (895): /usr/sbin/cryptsetup luksOpen /dev/md5 md5 --allow-discards
    Jan 4 14:58:13 usul emhttpd: shcmd (898): /usr/sbin/cryptsetup luksOpen /dev/md6 md6 --allow-discards
    Jan 4 14:58:15 usul emhttpd: shcmd (901): /usr/sbin/cryptsetup luksOpen /dev/md7 md7 --allow-discards
    Jan 4 14:58:16 usul emhttpd: shcmd (904): /usr/sbin/cryptsetup luksOpen /dev/md8 md8 --allow-discards
    Jan 4 14:58:18 usul emhttpd: shcmd (907): /usr/sbin/cryptsetup luksOpen /dev/md9 md9 --allow-discards
    Jan 4 14:58:20 usul emhttpd: shcmd (910): /usr/sbin/cryptsetup luksOpen /dev/md10 md10 --allow-discards
    Jan 4 14:58:22 usul emhttpd: Wrong encryption key
    Jan 4 14:58:22 usul kernel: mdcmd (120): stop
    Jan 4 14:58:22 usul kernel: md1: stopping
    Jan 4 14:58:22 usul kernel: md2: stopping
    Jan 4 14:58:22 usul kernel: md3: stopping
    Jan 4 14:58:22 usul kernel: md4: stopping
    Jan 4 14:58:22 usul kernel: md5: stopping
    Jan 4 14:58:22 usul kernel: md6: stopping
    Jan 4 14:58:22 usul kernel: md7: stopping
    Jan 4 14:58:22 usul kernel: md8: stopping
    Jan 4 14:58:22 usul kernel: md9: stopping
    Jan 4 14:58:22 usul kernel: md10: stopping

     

    usul-diagnostics-20210104-1456.zip

    Link to comment

    If using a key file have you checked that there is no new line character at the end of the phrase?    This seems to be the commonest error when trying to get a phrase into a key file.

     

    I must admit I tend to steer clear of using any encryption (except on my test server) as if you ever get any file system level corruption there is a good chance that the data on the drive will end up being lost.

     

    Link to comment

    Hello! I hope someone can help me. For the last year my unraid server autostarted the encrypted array automatically by downloading the keyfile from FTP. I used the guide from@SpaceInvaderOne, and it worked well until yesterday. Yesterday the array did not start and showed up the message "wrong key", simular like shown in this thread:

     

    https://forums.unraid.net/topic/87488-new-unraid-server-reporting-invalid-encryption-key-after-reboot/?_fromLogin=1

     

    Unfortunately, I have no idea what went wrong since I did not change anything. I checked the keyfile: With every reboot the keyfile will be correctly downloaded to /root/keyfile as in the guide. I also did not change the password. The password has 11 Characters and only letters and numbers. No special characters. It is very strange because I didn't change anything and the file is in /root.

     

    Any ideas on this?

    Screenshot Capture - 2021-06-18 - 10-44-16.png

    Link to comment



    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.