[
https://issues.apache.org/jira/browse/ARTEMIS-1952?focusedWorklogId=202147&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-202147
]
ASF GitHub Bot logged work on ARTEMIS-1952:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 21/Feb/19 18:38
Start Date: 21/Feb/19 18:38
Worklog Time Spent: 10m
Work Description: orpiske commented on pull request #2560: ARTEMIS-1952
NPE logged at warn if MQTT subscriber disconnects abruptly
URL: https://github.com/apache/activemq-artemis/pull/2560
Prevent a NullPointerException if no connection by the given clientId is
found on the cache of stored sessions
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 202147)
Time Spent: 10m
Remaining Estimate: 0h
> NPE logged at warn if MQTT subscriber disconnects abruptly
> ----------------------------------------------------------
>
> Key: ARTEMIS-1952
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1952
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: MQTT
> Affects Versions: 2.6.0, 2.6.1
> Reporter: Keith Wall
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> If I connect a python paso MQTT client, create a subscriber, then disconnect
> abruptly, the following stacktace appears in the Artemis log. I see the same
> defect on 2.6.0 and 2.6.1 (and master). 2.5.0 didn't exhibit the issue.
> If the client disconnects gracefully, or the client does not subscribe, the
> issue does not appear.
> Outwardly, it appears the broker is unaffected.
>
> {noformat}
> 2018-06-22 11:37:07,383 WARN
> [org.apache.activemq.artemis.utils.actors.OrderedExecutor] null:
> java.lang.NullPointerException
> at
> org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolManager.isClientConnected(MQTTProtocolManager.java:182)
> [artemis-mqtt-protocol-2.7.0-SNAPSHOT.jar:]
> at
> org.apache.activemq.artemis.core.protocol.mqtt.MQTTConnectionManager.disconnect(MQTTConnectionManager.java:150)
> [artemis-mqtt-protocol-2.7.0-SNAPSHOT.jar:]
> at
> org.apache.activemq.artemis.core.protocol.mqtt.MQTTFailureListener.connectionFailed(MQTTFailureListener.java:37)
> [artemis-mqtt-protocol-2.7.0-SNAPSHOT.jar:]
> at
> org.apache.activemq.artemis.core.protocol.mqtt.MQTTConnection.fail(MQTTConnection.java:147)
> [artemis-mqtt-protocol-2.7.0-SNAPSHOT.jar:]
> at
> org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl.issueFailure(RemotingServiceImpl.java:561)
> [artemis-server-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
> at
> org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl.connectionDestroyed(RemotingServiceImpl.java:542)
> [artemis-server-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
> at
> org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptor$Listener.connectionDestroyed(NettyAcceptor.java:845)
> [artemis-server-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
> at
> org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.lambda$channelInactive$0(ActiveMQChannelHandler.java:83)
> [artemis-core-client-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
> at
> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42)
> [artemis-commons-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
> at
> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31)
> [artemis-commons-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
> at
> org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:66)
> [artemis-commons-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> [rt.jar:1.8.0_171]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> [rt.jar:1.8.0_171]
> at
> org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
> [artemis-commons-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]{noformat}
>
> The program to reproduce the issue is simply:
>
> {code:java}
> import paho.mqtt.client as mqtt
> client = mqtt.Client()
> client.connect("localhost", 1883, 60)
> client.subscribe("any/old/thing")
> # if the following line is commented, the NPE is reported to the logs of the
> broker
> # client.disconnect(){code}
>
>
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)