You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@artemis.apache.org by "Justin Bertram (Jira)" <ji...@apache.org> on 2026/06/01 15:53:00 UTC
[jira] [Updated] (ARTEMIS-6085) Null pointer exception calling `MQTTSessionState.getSession()`
[ https://issues.apache.org/jira/browse/ARTEMIS-6085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Bertram updated ARTEMIS-6085:
------------------------------------
Description:
I found this among my broker's logs:
{noformat}
2026-05-28 16:19:43,429 ERROR [org.apache.activemq.artemis.core.protocol.mqtt] AMQ834002: Error processing control packet: MqttConnectMessage[fixedHeader=MqttFixedHeader[messageType=CONNECT, isDup=false, qosLevel=AT_MOST_ONCE, isRetain=false, remainingLength=99], variableHeader=MqttConnectVariableHeader[name=MQTT, version=5, hasUserName=true, hasPassword=true, isWillRetain=false, isWillFlag=false, isCleanSession=false, keepAliveTimeSeconds=30], payload=MqttConnectPayload[clientIdentifier=xyz-1, willTopic=null, willMessage=null, userName=artemis, password=[99, 50, 56, 54, 100, 56, 51, 49, 48, 98, 99, 102, 98, 49, 99, 50, 102, 57, 101, 98, 48, 49, 57, 56, 102, 100, 101, 49, 49, 56, 102, 54, 97, 52, 53, 51, 48, 57, 56, 48, 98, 99, 48, 51, 51, 99, 99, 55, 56, 100, 97, 52, 57, 97, 56, 53, 54, 98, 99, 97, 100, 55, 57, 99]]]
java.lang.NullPointerException: Cannot invoke "org.apache.activemq.artemis.core.protocol.mqtt.MQTTSessionState.getSession()" because the return value of "org.apache.activemq.artemis.core.protocol.mqtt.MQTTStateManager.getSessionState(String)" is null
at org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.handleLinkStealing(MQTTProtocolHandler.java:484)
at org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.handleConnect(MQTTProtocolHandler.java:258)
at org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.act(MQTTProtocolHandler.java:161)
at org.apache.activemq.artemis.utils.actors.Actor.doTask(Actor.java:32)
at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:69)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:120){noformat}
was:
{{I found this among my broker's logs:}}
{code:java}
2026-05-28 16:19:43,429 ERROR [org.apache.activemq.artemis.core.protocol.mqtt] AMQ834002: Error processing control packet: MqttConnectMessage[fixedHeader=MqttFixedHeader[messageType=CONNECT, isDup=false, qosLevel=AT_MOST_ONCE, isRetain=false, remainingLength=99], variableHeader=MqttConnectVariableHeader[name=MQTT, version=5, hasUserName=true, hasPassword=true, isWillRetain=false, isWillFlag=false, isCleanSession=false, keepAliveTimeSeconds=30], payload=MqttConnectPayload[clientIdentifier=xyz-1, willTopic=null, willMessage=null, userName=artemis, password=[99, 50, 56, 54, 100, 56, 51, 49, 48, 98, 99, 102, 98, 49, 99, 50, 102, 57, 101, 98, 48, 49, 57, 56, 102, 100, 101, 49, 49, 56, 102, 54, 97, 52, 53, 51, 48, 57, 56, 48, 98, 99, 48, 51, 51, 99, 99, 55, 56, 100, 97, 52, 57, 97, 56, 53, 54, 98, 99, 97, 100, 55, 57, 99]]]
java.lang.NullPointerException: Cannot invoke "org.apache.activemq.artemis.core.protocol.mqtt.MQTTSessionState.getSession()" because the return value of "org.apache.activemq.artemis.core.protocol.mqtt.MQTTStateManager.getSessionState(String)" is null
at org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.handleLinkStealing(MQTTProtocolHandler.java:484)
at org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.handleConnect(MQTTProtocolHandler.java:258)
at org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.act(MQTTProtocolHandler.java:161)
at org.apache.activemq.artemis.utils.actors.Actor.doTask(Actor.java:32)
at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:69)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:120){code}
> Null pointer exception calling `MQTTSessionState.getSession()`
> --------------------------------------------------------------
>
> Key: ARTEMIS-6085
> URL: https://issues.apache.org/jira/browse/ARTEMIS-6085
> Project: Artemis
> Issue Type: Bug
> Affects Versions: 2.42.0
> Reporter: Daniel Martin
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> I found this among my broker's logs:
> {noformat}
> 2026-05-28 16:19:43,429 ERROR [org.apache.activemq.artemis.core.protocol.mqtt] AMQ834002: Error processing control packet: MqttConnectMessage[fixedHeader=MqttFixedHeader[messageType=CONNECT, isDup=false, qosLevel=AT_MOST_ONCE, isRetain=false, remainingLength=99], variableHeader=MqttConnectVariableHeader[name=MQTT, version=5, hasUserName=true, hasPassword=true, isWillRetain=false, isWillFlag=false, isCleanSession=false, keepAliveTimeSeconds=30], payload=MqttConnectPayload[clientIdentifier=xyz-1, willTopic=null, willMessage=null, userName=artemis, password=[99, 50, 56, 54, 100, 56, 51, 49, 48, 98, 99, 102, 98, 49, 99, 50, 102, 57, 101, 98, 48, 49, 57, 56, 102, 100, 101, 49, 49, 56, 102, 54, 97, 52, 53, 51, 48, 57, 56, 48, 98, 99, 48, 51, 51, 99, 99, 55, 56, 100, 97, 52, 57, 97, 56, 53, 54, 98, 99, 97, 100, 55, 57, 99]]]
> java.lang.NullPointerException: Cannot invoke "org.apache.activemq.artemis.core.protocol.mqtt.MQTTSessionState.getSession()" because the return value of "org.apache.activemq.artemis.core.protocol.mqtt.MQTTStateManager.getSessionState(String)" is null
> at org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.handleLinkStealing(MQTTProtocolHandler.java:484)
> at org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.handleConnect(MQTTProtocolHandler.java:258)
> at org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.act(MQTTProtocolHandler.java:161)
> at org.apache.activemq.artemis.utils.actors.Actor.doTask(Actor.java:32)
> at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:69)
> at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:120){noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org