The master key is set per product say ( Artifactory, Xray, etc..), and must be the same for all the nodes in the same service (when using HA).
During the Xray migration or fresh installation(s) yet times we might encounter an error with decryption of master key. In case of fresh installation, you can stop Xray, remove/truncate the current Xray DB, then start Xray again It will generate a fresh master.key.
We can follow the below steps to restore the master key in the DB when we don’t have a backup of the existing master key file.
You will find below entries in the logs indicating a mismatch of master.key during the procedure.
[jfxr ] [ERROR] [a314de91e8330833] [bin_mgr_service:300 ] [main ] Failed to decrypt password for binmgr default: Cipher text is not well formatted [jfxr ] [ERROR] [a314de91e8330833] [ha_service:119 ] [main ] failed to register HA node--- at /go/src/jfrog.com/xray/internal/service/ha/ha_service.go:118 (haService.ValidateLicenseAndRegisterNodeForServer) --- Caused by: master keys do not match