Hi there,
It looks like there is a problem with the connection between the M2 Gateway and your MQTT Broker, and the cause may be due to a mismatch in your MQTT Broker version.
Trying to use Mosquitto version 2.x or EMQX, I see on the admin page that the M2 gateway’s MQTT connection will use version 3.1.1 or 5.0 of the MQTT protocol.