License File Shows Corrupt Error

License File Shows Corrupt Error

Overview

This article addresses issues where HiveMQ license files appear as corrupt, even when using recently obtained license files.

Problem Description

Users may encounter situations where HiveMQ reports that a license file is corrupt, despite receiving a new license file from HiveMQ support. This issue can prevent the broker from starting or operating correctly.

Common Causes

  • Incorrect file encoding when loading license into environment variables

  • Whitespace or line breaks in base64-encoded license strings

  • Incorrect file path or mounting configuration in containerized environments

  • File corruption during transfer or storage

  • Multiple license files requiring proper loading mechanism

  • Missing/incorrect file permissions

Resolution Steps

  1. Obtain a fresh copy of the license file from HiveMQ support

  2. If using Docker with environment variables, ensure proper base64 encoding without whitespace or line breaks

  3. If using Docker with multiple licenses, use volume mounting to the /opt/hivemq/license directory(1)(https://community.hivemq.com/t/load-multiple-licenses-in-docker-container/3643)

  4. Restart the HiveMQ broker after applying the new license

  5. Verify successful license loading in the broker logs

Prevention

To prevent license-related issues in the future:

  • Store license files in a secure, backed-up location

  • Document the license loading method used in your deployment

  • For Docker deployments, use volume mounting when managing multiple licenses(1)(https://community.hivemq.com/t/load-multiple-licenses-in-docker-container/3643)

  • Avoid manual editing of license files

  • Keep records of license expiration dates

  • Test license loading in non-production environments before production deployment