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
Crash report when broker stops #1004
Comments
We can highlight the problem on version 1.6.2 of VerneMQ and a simple MQTT client (using Paho MQTT). when it is set to false: no crash report We use Wireshark to understand network exchanges and differences between this two types of connections. |
Hi, thanks for the report. Looks like there's a case we're not handling while shutting down VerneMQ. Do you have the output from the crash.log file available as well? |
Hi, You can find the outputs of the crash.log file below: (VerneMQ 1.6.2)
Feel free to ask us for more information. Thanks! |
If I understand it correctly I think we'd just have to protect the ets table lookup so this doesn't cause errors to be logged when shutting down the broker, but just for my further understanding, does this cause an operational problem for you? |
(I'm also in the team) |
No, for now there's a single broker. |
@dergraf I think this makes sense - we don't shut down the listeners before tearing down the server processes. I think the ideal solution would be to have the listeners (the client ones - we probably don't want to include the internal ones?) be the last thing to be started when the broker starts and the first thing to be stopped when the broker shuts down. I was wondering if we could split |
We did a partial fix for this by making sure to stop MQTT listeners before starting the shutdown of the rest of VerneMQ. It's still possible that an active connection can trigger the error if it subscribes/unsubscribes while VerneMQ is shutting down, but this edge case should be handled when we move the sessions themselves into the supervision hierarchy together with the listeners. |
Ok thanks. In which release will we be able to see it ? |
1.6.3 or 1.7.0. |
@larshesel I am also experiencing a similar issue. When there is two broker nodes are running successfully behind the haproxy and if i stop one (vernemq stop) all the client connections are refused and further no more clients could not establish a connection. |
@sriram05 please open a separate issue descrbing the exact details of your problem. |
VerneMQ version:
1.2.3
Problem:
When we stop VerneMQ broker (with
systemctl stop vernemq.service
orvernemq stop
commands), we have the following crash report inconsole.log
file:Each crash report matches one failed Erlang process associated with one MQTT client (
<0.482.0>
is a Erlang PID). In any case, the broker continues to operate. Only the client's process fails. Other clients are not affected by this problem.The configuration file is not in question. We can reproduce crash report with default config file of VerneMQ with the following changes:
The MQTT client seems to be the cause of the error. A process does not exit correctly when the broker stops or disconnects abruptly.
The text was updated successfully, but these errors were encountered: