# Error on MQTT device connection

**URL:** https://forum.cirrus-link.com/t/error-on-mqtt-device-connection/783
**Category:** MQTT Modules
**Created:** [July 29, 2025, 4:43pm UTC](https://forum.cirrus-link.com/t/error-on-mqtt-device-connection/783 "2025-07-29T16:43:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jason.moore](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@jason.moore](https://forum.cirrus-link.com/u/jason.moore)
#### Post date: [July 29, 2025, 4:43pm UTC](https://forum.cirrus-link.com/t/error-on-mqtt-device-connection/783/1 "2025-07-29T16:43:56Z")

</div>

Client used to connect, and connects just fine with Mosquito, MQTT explorer from same machine and user/pw combo connects to the Cirrus, packet below from the device to Cirrus

Using ver 4.0.31-SNAPSHOT (b2025072911)

| | HandlerThread | 29Jul2025 11:32:41 | Error while handling packet |
| --- | --- | --- | --- |
| | | | |
| undefined | ---- | | |

java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 7279 out of bounds for byte[59]at java.base/java.lang.System.arraycopy(Native Method)at com.cirruslink.chariot.mqtt.util.ControlPacketUtils.parseUTF8EncodedString(ControlPacketUtils.java:227)at com.cirruslink.chariot.mqtt.control.Connect.parseRemainingBytes(Connect.java:293)at com.cirruslink.chariot.server.core.PacketHandler.handlePacket(PacketHandler.java:235)at com.cirruslink.chariot.server.core.io.HandlerThread.run(HandlerThread.java:75)

| DefaultConnectionListener | 29Jul2025 11:32:41 | New Client Session with id fab19980-5d9b-46d8-89f6-65b22108c440 |
| --- | --- | --- |
| DefaultConnectionListener | 29Jul2025 11:32:41 | Accepting an new connection |
| undefined | ---- | ---- |
| AbstractConnectionListener | 29Jul2025 11:32:41 | [DEFAULT] Handling accept from channel, using selector worker DEFAULT-PooledSelectorWorker-9 |
| undefined | ---- | ---- |
| AcceptSelectorWorker | 29Jul2025 11:32:41 | [DEFAULT-MainSelectorWorker] Handling accept from socket channel |
| undefined | ---- | ---- |
| ClientSessionUtils | 29Jul2025 11:32:40 | Writing PINGRESP to client with session ID 2918fc6d-6cfc-4003-bcd2-232064d648b6 |
| undefined | ---- | ---- |
| ClientSessionUtils | 29Jul2025 11:32:40 | Writing PINGRESP to client ME-0ab7cdbc-7105-4de7 |
| undefined | ---- | ---- |
| PacketHandler | 29Jul2025 11:32:40 | [2918fc6d-6cfc-4003-bcd2-232064d648b6, ME-0ab7cdbc-7105-4de7] Handling PING |
| undefined | ---- | ---- |
| AbstractConnectionListener | 29Jul2025 11:32:40 | [DEFAULT] Connecting client timed out (25000ms)for: [2185afde-361f-4459-943a-addd0005a95b, /10.1.0.222] |
| undefined | ---- | ---- |
| DefaultConnectionListener | 29Jul2025 11:32:40 | Forcefully closing SocketChannel for 2185afde-361f-4459-943a-addd0005a95b |
| undefined | ---- | ---- |

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/cirrus_link/original/1X/e458187c429e78f5dbe88830c0e592515c567481.jpeg)

---

<div class="post-metadata">

### Author: ![wes.johnson](https://avatars.discourse-cdn.com/v4/letter/w/f14d63/32.png) [@wes.johnson](https://forum.cirrus-link.com/u/wes.johnson)
#### Post date: [July 31, 2025, 5:51pm UTC](https://forum.cirrus-link.com/t/error-on-mqtt-device-connection/783/2 "2025-07-31T17:51:33Z")

</div>

Chariot and MQTT Distributor do not support MQTT 5 yet. This is on our roadmap and should be available by the end of the year.
