RabbitMQ Upgrade Failure from v4.0.9 to v4.1.13 Due to MQTT Plugin Configuration
search cancel

RabbitMQ Upgrade Failure from v4.0.9 to v4.1.13 Due to MQTT Plugin Configuration

book

Article ID: 408945

calendar_today

Updated On:

Products

RabbitMQ VMware Tanzu RabbitMQ VMware vFabric RabbitMQ 2.x Support Only for OpenSource RabbitMQ

Issue/Introduction

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}]},
                            ...
                           }}}}}

Environment

RabbitMQ: 4.1.13

Cause

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.

Resolution

 

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.