During an upgrade from RabbitMQ v4.0.9 to v4.1.13, RabbitMQ might fail to start after the upgrade. The error logs would indicate a BOOT FAILED condition caused by the rabbitmq_mqtt plugin.
Error during startup: {error,
{rabbitmq_mqtt,
{bad_return,
{{rabbit_mqtt,start,[normal,[]]},
{'EXIT',
{{assert,
[{module,rabbit_mqtt},
{line,117},
{expression,"MaxSizeAuth =< MaxMsgSize"},
{expected,true},
{value,false}]},
...
}}}}}
RabbitMQ: 4.1.13
Starting with RabbitMQ 4.1.x, validation was introduced for MQTT plugin parameters. Specifically, the assertion:
MaxSizeAuth =< MaxMsgSize
ensures that the maximum allowed authentication packet size (max_auth_size) does not exceed the configured maximum message size (max_message_size).
In the existing configuration, the value for max_message_size was set explicitly as:
max_message_size =<value>
This configuration conflicts with plugin defaults in RabbitMQ 4.1.13, causing the assertion check to fail and preventing the broker from starting.
1. Review the MQTT configuration values in rabbitmq.conf.
2. Either adjust the max_message_size parameter or remove it to allow RabbitMQ to apply safe defaults.
Example :
Comment out or remove the following line:
# max_message_size = <value>
3. Restart RabbitMQ.