[ 
https://issues.apache.org/jira/browse/ARTEMIS-1218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16050576#comment-16050576
 ] 

Francesco Padovani commented on ARTEMIS-1218:
---------------------------------------------

I've a similar problem (maybe related to this tkt).
Often it happens that after a client disconnects not gracefully (could be for 
many reasons: energy loss, network loss, etc.), Artemis doesn't accept anymore 
a connection with the same client id. This results, of course, in a situation 
where the client cannot connect any more (unless I restart Artemis). I seems 
like Artemis doesn't "really" disconnect the client.
Inside the log (set on TRACE level) I see all the activities that I expect:
1) client connects
2) client sends and receives messages correctly
3) client makes PINGREQ and receives PINGRESP correctly
4) Artemis checks the TTL of the specific connection id related to that client
5) When client goes down, after <keepaliveSetAtClientSide> * 1,5 seconds (which 
in our case result in 90 seconds) Artemis realizes that the specific connection 
id is broken, and it disconnects it.
But at this point the client cannot connect any more.
Every time I try to connect by using that specific client id, it is rejected. 
And I have no error inside the log. It seems simply as the broker "think" that 
a connection with that client id is still up and running. If I connect with 
another client id and try to send a message to a topic where the broken client 
id was subscribed to, I see inside the log that Artemis try to send the message 
to that client id:
MQTT(<clientid>): OUT >> PUBLISH(1) EXACTLY_ONCE
...but really there's no connection for that client id. Not more, anyway.
*NOTE:* when the client goes down (as I wrote above: not gracefully) Artemis 
does NOT send any lwt message. Actuallly, the client, on connection, indicates 
an lwt topic and message. And in case of gracefully disconnection Artemis sends 
it... In this case, instead, Artemis does NOT send it. Maybe can help.
Unfortunately I'm not yet able to reproduce the bug sistematically. But I'm 
hard working to do it, because it's pretty much blocker to us.

> Connecting with an MQTT client ID only works once
> -------------------------------------------------
>
>                 Key: ARTEMIS-1218
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1218
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: MQTT
>    Affects Versions: 2.1.0
>            Reporter: Jens Reimann
>
> Connecting to a default artemis instance (created with {artemis create --user 
> XX --password XX}) and connecting via MQTT with a client ID works only once.
> The second time the client connect it gets refused during the connect.
> Using an empty client ID works.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to