summaryrefslogtreecommitdiffstats
path: root/health/guides/vernemq/vernemq_mqtt_pubrel_sent_reason_unsuccessful.md
blob: 18e85e12a02fb356aad776b7a61d58e9a6cbf629 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
### Understand the alert

This alert is related to VerneMQ, a high-performance MQTT broker. It monitors the number of unsuccessful v5 `PUBREL` packets sent in the last minute. If you receive this alert, it means that there was an issue with sending `PUBREL` packets in your VerneMQ instance.

### What does PUBREL mean?

`PUBREL` is a type of MQTT control packet that indicates the release of an application message from the server to the client. It is the third message in the QoS 2 (Quality of Service level 2) protocol exchange, where QoS 2 ensures that a message is delivered exactly once. An unsuccessful v5 `PUBREL` packet means that there was an error during the packet processing, and the message wasn't delivered to the client as expected.

### Troubleshoot the alert

1. Check the VerneMQ logs:
   
   VerneMQ logs can give you valuable information about possible errors that might have occurred during the processing of `PUBREL` packets. Look for any error messages or traces related to the `PUBREL` packets in the logs.

   ```
   sudo journalctl -u vernemq -f
   ```

   Alternatively, if you're using a custom log location:

   ```
   tail -f /path/to/custom/log
   ```

2. Check the MQTT client-side logs:

   Check the logs of the MQTT client that might have caused the unsuccessful `PUBREL` packets. Look for any connection issues, error messages, or traces related to the MQTT protocol exchanges.

3. Ensure proper configuration for VerneMQ:
   
   Verify that the VerneMQ configuration settings related to QoS 2 protocol timeouts and retries are correctly set. Check the VerneMQ [documentation](https://docs.vernemq.com/configuration) for guidance on the proper configuration.

   ```
   cat /etc/vernemq/vernemq.conf
   ```

4. Monitor VerneMQ metrics:

   Use Netdata to monitor VerneMQ metrics to analyze the MQTT server's performance and resource usage. This can help you identify possible issues with the server.

5. Address network or service issues:

   If the above steps don't resolve the alert, look for possible network or service-related issues that might be causing the unsuccessful `PUBREL` packets. This could require additional investigation based on your specific infrastructure and environment.

### Useful resources

1. [VerneMQ - Official Documentation](https://docs.vernemq.com/)
2. [MQTT Essentials: Quality of Service 2 (QoS 2)](https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels/)
3. [Netdata - VerneMQ monitoring](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/vernemq)