Plesk

Unable to reload DNS service on Plesk server: invalid command from 127.0.0.1#41838: bad auth

Symptoms

Cause

Two different keys are in conflict with each other.

Resolution

Use the same key in both files:

  1. Connect to the server via SSH.

  2. Get the key from the /etc/bind/rndc.key (or /etc/rndc.key) file and copy it.

    # cat /etc/bind/rndc.key

    key "rndc-key" {
    algorithm hmac-md5;
    secret "aff2YA**********FRkj/g==";
    };

  3. Open the /etc/named.conf and/or /etc/bind/rndc.conf file via any text editor and modify change the key to the correct one received from the previous step:

    [BEFORE]

    key "rndc-key" {
    algorithm hmac-md5;
    secret "CeMgS**********yv0x40Q==";
    };

    [AFTER]

    key "rndc-key" {
    algorithm hmac-md5;
    secret "aff2YA**********FRkj/g==";
    };

  4. Restart the DNS service:

    # service bind9 restart

    OR

    # service named-chroot restart