New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Received PUBREL for an unknown packet identifier #918
Comments
This test replicates what you are seeing for 1.4.15, if you gunzip both files and put them in test/broker, then run It seems as though it's related to a message being queued and I think it is already fixed in 1.5, I'm just making up that test now. |
Indeed, I cannot reproduce the issue on |
Argh, just closed and got it again 😡
I will investigate it further, maybe the reason is different. |
Yes, this is another case, here is the log:
Seems like this "unexpected" PUBREL is just a client's repeat, because it didn't receive PUBCOMP prior to disconnection. |
Can you say which client are you using, out of interest? Like I said before, this isn't necessarily a problem, it's just mosquitto saying "by the way, a client has sent me a PUBREL that I'm not expecting, I'm going to complete the message flow anyway to keep the client happy". |
It's my own tool for benchmarking MQTT brokers: RTB
You said that? 😁 OK, seems like I misread you
Yes, this is now mostly a cosmetic issue (to me). However, a warning assumes admin's attention and I don't see what admin can do seeing this message. But this is up to you of course, I don't insist. At least admins now will google this warning and will read this thread 😁 Close the ticket if you feel it's irrelevant anymore. |
Aaaand another problem with duplicated PUBREC (it's related, so I don't open a new issue):
This one really looks like a bug: after a completion with PUBCOMP the server sends yet another PUBREC with the same identifier. |
Note this one is on |
Could you post your broker configuration? |
Would you be able to try the attached patch? I don't think this will solve the problem, but I'm interested in whether it changes the behaviour.
|
The config:
|
Actually it did. At least I cannot reproduce it anymore after several hours of benchmarking. |
Sorry for annoyance, but after several benchmark restarts I got duplicated PUBREC again :/ |
OK, after playing with benchmarking parameters a bit, I found the configuration where I can reproduce it within the first minute. And this time I see a bit different behaviour:
|
I've been looking at this again and noticed that the line |
This was already reported in #374 but seems like the reason is different in my case.
I was able to catch the issue in a debug mode, here is the full log
TL;DR: The interesting part here is a PUBLISH packet with identifier 38300. Here is what happens:
However, Mosquitto treats the later PUBREL as mismatched and logs the corresponding warning.
My question here: is this an expected behaviour? From the perspective of MQTT 3.1.1 spec the server MUST reply to any duplicated PUBLISH packets with PUBREC:
On the other hand in this case the server should be prepared to handle duplicated PUBREL packets and, most likely, should not log a warning.
Another concern is why actually Mosquitto replies with PUBREC twice? The original PUBLISH packet was received before disconnection, so Mosquitto should probably just queue the packet and only reply to duplicates.
Mosquitto version is 1.4.15 (the latest available in Debian testing).
The text was updated successfully, but these errors were encountered: