Hive Metastore HA with DBTokenStore: Failed to initialize master key

This article describes my little adventure around a startup error with the Hive Metastore. It shall be reproducable with any  secure installation, meaning with Kerberos, with high availability enabled and with the storage of the delegation token in a database. The version of Hive is the 1.2 packaged inside the Hortonworks 2.4.2 distribution. Storage for [...]