Avamar: Backups may stop responding, or file system backups fail with "Fatal Server Error occurred"
Resumen: Avamar backups fail MSG_ERR_AUTH_FAIL). Session tickets must be properly synced between the Global Storage Area Network (GSAN) and Management Console Service (MCS) in order to process a backup. ...
Síntomas
Backups are failing, and the following errors may be seen in the following logs:
Avamar Global Storage Area Network (GSAN) err.log:
[srvm-518654#srv:481] WARN: <1479> sessionkeytable::setpublickey new serial=<x> less than current minserial=<y>
...
[srvm-525136#srv:775] WARN: <1426> sessionkeytable::comparesignature incorrect signature
Avtar logs:
2019-12-31 07:35:23 avtar Error <8609>: Connection killed from GSAN. (Log #1)
2019-12-31 07:35:23 avtar FATAL <5704>: Fatal Server Error occurred (MSG_ERR_AUTH_FAIL), aborting execution (SECURETICKETLOGIN=452 serial=1 seq=0 flags=R:H:0 kind=0 rsp=MSG_ERR_AUTH_FAIL) (Log #1)
2019-12-31 07:35:23 avtar Error <5126>: Login error 5: Authorization failure (Session Ticket login) (Log #1)
2019-12-31 07:35:23 avtar FATAL <8941>: Fatal server connection problem, aborting initialization. Verify correct server address and login credentials. (Log #1)
2019-12-31 07:35:23 avtar Error <7001>: Exiting avtar with run-at-end script failure -1 (Log #1)
2019-12-31 07:35:23 avtar Info <8474>: - Log file path: /usr/local/avamar/var/clientlogs/some-Unix.log
2019-12-31 07:35:23 avtar Info <6555>: Initializing connection
2019-12-31 07:35:23 avtar Info <5552>: Connecting to Avamar Server (avamar.com)
2019-12-31 07:35:23 avtar Info <5554>: Connecting to one node in each datacenter
2019-12-31 07:35:23 avtar Info <5993>: - Connect: Connected to 10.x.x.x:29000, Priv=0, SSL Cipher=AES256-SHA
2019-12-31 07:35:23 avtar Info <5993>: - Datacenter 0 has 1 nodes: Connected to 10.x.x.x:29000, Priv=0, SSL Cipher=AES256-SHA
2019-12-31 07:35:23 avtar Info <5581>: Logging in on connection 0 with Session Ticket
2019-12-31 07:35:23 avtar Info <18854>: Using Secure Session Ticket Format
2019-12-31 07:35:23 avtar Error <8609>: Connection killed from GSAN.
2019-12-31 07:35:23 avtar Info <9772>: Starting graceful (staged) termination, KILL event received (wrap-up stage)
2019-12-31 07:35:23 avtar FATAL <5704>: Fatal Server Error occurred (MSG_ERR_AUTH_FAIL), aborting execution (SECURETICKETLOGIN=452 serial=1 seq=0 flags=R:H:0 kind=0 rsp=MSG_ERR_AUTH_FAIL)
2019-12-31 07:35:23 avtar Error <5126>: Login error 5: Authorization failure (Session Ticket login)
2019-12-31 07:35:23 avtar FATAL <8941>: Fatal server connection problem, aborting initialization. Verify correct server address and login credentials.
2019-12-31 07:35:23 avtar Info <6149>: Error summary: 4 errors: 8941, 5704, 5126, 8609
2019-12-31 07:35:23 avtar Info <5917>: Back from run-at-end, exit code -1
2019-12-31 07:35:23 avtar Error <7001>: Exiting avtar with run-at-end script failure -1Causa
The GSAN logs show that the session ticket assigned may have already been used for a previous backup.
This could occur from a GSAN or Management Console Server (MCS) rollback, putting the session ticket out of order.
From the GSAN log:
WARN: <1418> sessionkeytable::setpublickey session ticket with serial=28451 was used already
WARN: <1426> sessionkeytable::comparesignature incorrect signature
When MCS has a larger session ticket than GSAN, it could be inferred that GSAN is behind, and using old session tickets to give to clients.
Use the following grep command to help diagnose:
grep -i "sessionkeytable\|minserial" /data01/cur/gsan.log.00?Resolución
Perform the following to resync the session tickets:
Step 1:
Get the current GSAN minserial:
avmaint cat /sysinfo/security/keytable
Example:
root@avamar:/home/admin/#: avmaint cat /sysinfo/security/keytable |grep minimalserial
<keytable minimalserial="<minserial_less_than_mcs>">
Step 2:
Get the current session ticket serial from MCS.
cat /usr/local/avamar/var/mc/server_data/prefs/sessionticket.srl
Example:
root@avamar:/home/admin/#: cat /usr/local/avamar/var/mc/server_data/prefs/sessionticket.srl
<mcs_session_ticket_larger_than_gsan>
Step 3:
Create a public key file with "mcecroot," and use it with avmaint:
cd /usr/local/avamar/lib
keytool -list -rfc -keystore /usr/local/avamar/lib/avamar_keystore -storepass `avlockbox.sh -r keystore_passphrase` -alias mcecroot | openssl x509 -pubkey -noout > mcecroot.pub
(The command uses keytool to list the mcecroot alias in the avamar_keystore, sends the result to openssl to get the public key from the key pair, and wries the public key to a file called mcecroot.pub.)
Example:
root@avamar:/usr/local/avamar/lib/#: keytool -list -rfc -keystore /usr/local/avamar/lib/avamar_keystore -storepass `avlockbox.sh -r keystore_passphrase` -alias mcecroot | openssl x509 -pubkey -noout > mcecroot.pub
root@avamar:/usr/local/avamar/lib/#: cat mcecroot.pub
-----BEGIN PUBLIC KEY-----
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEicGAqiHQQ8DRi0ZkgsvEA8fCEeqW/DIr
k53CFakwbOtTejb2Okk+2VTkY5H4gfLEKd4Gtq5gPP2OcpaUf/SrIc4MO3bn8OhC
l/vQKfAeJvrPPEvcIG0GiLyLtwJykeUq
-----END PUBLIC KEY-----
Step 4:
Write the new GSAN minserial using the mcecroot public key. Use a number larger than the current value in MCS:
avmaint publickey --keyfile=./mcecroot.pub --serial=<new-gsan-minserial-value> --ava
(A serial number high enough to avoid the following error must be chosen)
ERROR: avmaint: publickey: server_exception(MSG_ERR_INVALID_PARAMETERS)
Examples:
root@avamar:/usr/local/avamar/lib/#: avmaint publickey --keyfile=./mcecroot.pub --serial=28500 --ava
ERROR: avmaint: publickey: server_exception(MSG_ERR_INVALID_PARAMETERS)
If the above error is received, keep choosing a higher number until there is no error.
root@avamar:/usr/local/avamar/lib/#: avmaint publickey --keyfile=./mcecroot.pub --serial=38000 --ava
Step 5:
Verify the change:
avmaint cat /sysinfo/security/keytable
Example:
root@avamar:/usr/local/avamar/lib/#: avmaint cat /sysinfo/security/keytable |grep minimalserial
<keytable minimalserial="38000"> <-- This should display the gsan minserial number entered in step 4 above
Step 6:
Write that minserial to the MCS session ticket, and verify:
echo -n "<new-gsan-minserial-value>" > /usr/local/avamar/var/mc/server_data/prefs/sessionticket.srl
Example:
root@avamar:/usr/local/avamar/lib/#: echo -n "38000" > /usr/local/avamar/var/mc/server_data/prefs/sessionticket.srl
root@avamar:/usr/local/avamar/lib/#: cat /usr/local/avamar/var/mc/server_data/prefs/sessionticket.srl
38000
Step 7:
Restart MCS:
mcserver.sh --restart
Step 8:
Test backups.