Failed to start HiveMQ broker
Problem
After upgrading to a newer version of HiveMQ, the broker fails to start. The following error is observed in the hivemq.log
ERROR - Could not generate initial hash of KeyStore and TrustStore
java.io.FileNotFoundException: /opt/hivemq/keystore/hivemq.jks (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)Solution
This error indicates that HiveMQ is configured to use TLS but cannot find the keystore file hivemq.jks at the specified path /opt/hivemq/keystore/. This typically happens after an upgrade if the TLS-related files were not copied over to the new hivemq version directory.
Verify TLS Configuration
Check yourconfig.xmlfile for references to the keystore and truststore paths.Check File Paths
Ensure the following files exist at the configured location:/opt/hivemq/keystore/hivemq.jks(Optional)
/opt/hivemq/keystore/truststore.jksif configured.
Copy Missing Files
If the TLS keystore and truststore files were not copied during the upgrade, do the following:Locate the files in your previous HiveMQ version directory (e.g.,
hivemq.jks,truststore.jks).Copy them to the expected location in the new version directory:
Restart the Broker