issue_owner_repo listlengths 2 2 | issue_body stringlengths 0 261k ⌀ | issue_title stringlengths 1 925 | issue_comments_url stringlengths 56 81 | issue_comments_count int64 0 2.5k | issue_created_at stringlengths 20 20 | issue_updated_at stringlengths 20 20 | issue_html_url stringlengths 37 62 | issue_github_id int64 387k 2.46B | issue_number int64 1 127k |
|---|---|---|---|---|---|---|---|---|---|
[
"emqx",
"nanomq"
] | **Describe the bug**
test os: windows server 2022 datacenter and 2019 datacenter
nanomq version: latest
log:
2024-03-29 17:48:48 [5720] WARN D:\a\nanomq\nanomq\nng\src\sp\protocol\mqtt\nmq_mqtt.c:240: Warning: close pipe & kick client due to KeepAlive timeout!
2024-03-29 17:48:48 [5720] WARN D:\a\nanomq\nanomq\nng\src\sp\transport\mqtt\broker_tcp.c:639: nni aio recv error!! Object closed
2024-03-29 17:48:48 [5720] WARN D:\a\nanomq\nanomq\nng\src\sp\transport\mqtt\broker_tcp.c:907: tcptran_pipe_recv_cb: parse error rv: 139
**Client SDK**
[LiamBindle](https://github.com/LiamBindle)/[MQTT-C](https://github.com/LiamBindle/MQTT-C)
both side run for a while, then the client lost the connection and show socket error: code 10054
| close pipe & kick client due to KeepAlive timeout! | https://api.github.com/repos/nanomq/nanomq/issues/1732/comments | 3 | 2024-03-29T09:53:22Z | 2024-07-29T08:45:43Z | https://github.com/nanomq/nanomq/issues/1732 | 2,215,033,287 | 1,732 |
[
"emqx",
"nanomq"
] | **Describe the bug**
We ran nanomq in docker, connected 300 clients, and docker stats looked at cpu103%, whereas top-c view was only used 25%
**Expected behavior**
Ability to use multiple cores
**To Reproduce**
If possible include actual reproduction test code here.
Minimal C test cases are perferred.
**Environment Details**
- NanoMQ 0.21.8-full
- Linux nanomq 3.10.0-1160.25.1.el7.x86_64 #1 SMP Wed Apr 28 21:49:45 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
| nanomq Only one cpu can be used | https://api.github.com/repos/nanomq/nanomq/issues/1731/comments | 2 | 2024-03-29T03:06:37Z | 2024-04-10T03:44:06Z | https://github.com/nanomq/nanomq/issues/1731 | 2,214,530,558 | 1,731 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Websocket will listen when nanomq is started by default.
But no configuration for WebSocket in nanomq.conf.
**Expected behavior**
No WebSocket start.
**Actual Behavior**
The web socket starts.
| Websocket will listen by default. | https://api.github.com/repos/nanomq/nanomq/issues/1728/comments | 0 | 2024-03-27T11:17:28Z | 2024-04-16T18:20:53Z | https://github.com/nanomq/nanomq/issues/1728 | 2,210,530,421 | 1,728 |
[
"emqx",
"nanomq"
] | To improve the security of our app, every time a connection is created, a new user will be created to connect to nanomq. And when deleting that connection, you also need to delete that user. Does nanomq support creating users via API yet? | Can create new user for authentication throw HTTP API? | https://api.github.com/repos/nanomq/nanomq/issues/1725/comments | 5 | 2024-03-27T03:54:06Z | 2024-05-09T03:21:42Z | https://github.com/nanomq/nanomq/issues/1725 | 2,209,790,248 | 1,725 |
[
"emqx",
"nanomq"
] | **Describe the bug**
A runtime error occurs in the topic_filtern function of the mqtt_parser.c file within the NanoMQ project. The function triggers an undefined behavior when the strncpy function is called with a null pointer as its second argument. This violates the non-null expectation for strncpy's arguments as declared in the standard library header string.h.
**Expected behavior**
The topic_filtern function is expected to safely copy a given number of characters from the input string to a newly allocated buffer. Before attempting to copy, the function should verify that the input pointer is not null to comply with the strncpy function's requirements.
**Actual Behavior**
When the topic_filtern function is invoked with a null input pointer, it proceeds to call strncpy without any checks for nullity. This results in a runtime error reported by the UndefinedBehaviorSanitizer, specifically stating "null pointer passed as argument 2, which is declared to never be null."
**To Reproduce**
Follow these steps to reproduce the issue:
1. Compile NanoMQ with ASan and UBSan enabled:
```bash
mkdir nanomq/build
cd build
cmake -DBUILD_BENCH=ON -DASAN=ON -DTSAN=ON \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_FLAGS="-g -fsanitize=address,undefined -fno-omit-frame-pointer" \
-DCMAKE_CXX_FLAGS="-g -fsanitize=address,undefined -fno-omit-frame-pointer" \
-DCMAKE_LD_FLAGS="-fsanitize=address,undefined" \
..
make clean
make -j 8
```
2. Start the NanoMQ server with the following command:
```bash
nanomq/build/nanomq/nanomq start --url nmq-tcp://0.0.0.0:5883 --url nmq-ws://localhost:5885 --max_tq_thread 8 -n 16
```
3. Send a series of hexstreams to the server in sequence, which are stored in the file `hexstream.txt` using the code:
```python
import socket
def send_packet(input):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s.connect(('127.0.0.1', 5883))
s.send(input)
except ConnectionResetError:
print("Connection was reset.")
except ConnectionRefusedError:
print("Connection refused.")
finally:
s.close()
with open('hexstream.txt', 'r') as f:
crash_log = f.read().splitlines()
for c in crash_log:
clean_c = ''.join(c.split())
packet = bytearray.fromhex(clean_c)
send_packet(packet)
```
All hexstreams that triggered the issue are in the file:
[hexstream.txt](https://github.com/nanomq/nanomq/files/14755758/hexstream.txt)
**Environment Details**
- NanoMQ version 0.21.7
- Operating system and version Ubuntu 20.04 LTS
- Compiler and language used clang version 12.0.0
- testing scenario
**Crash Report**
log of server:
```
2024-03-25 06:54:58 [391720] ERROR nanomq/nng/src/supplemental/nanolib/conf_ver2.c:1534 conf_parse_ver2: Configure file [(null)] or [/etc/nanomq.conf] not found or unreadable
NanoMQ Broker is started successfully!
2024-03-25 06:54:58 [391729] ERROR nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:456 tcptran_pipe_nego_cb: connect nego error rv: Unknown error #130(130)
2024-03-25 06:54:58 [391733] ERROR nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:456 tcptran_pipe_nego_cb: connect nego error rv: Unknown error #130(130)
2024-03-25 06:54:58 [391737] ERROR nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:1075 nano_pipe_recv_cb: Invalid subscribe packet!
2024-03-25 06:54:58 [391735] ERROR nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:1075 nano_pipe_recv_cb: Invalid subscribe packet!
2024-03-25 06:54:58 [391741] ERROR nanomq/nanomq/apps/broker.c:104 sig_handler: signal signumber: 6 received!
```
Here is the ASan report:
```
nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:1865:16: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:127:14: note: nonnull attribute specified here
#0 0x677646 in topic_filtern nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:1865:2
#1 0x67a850 in nano_ctx_send nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:415:8
#2 0x615318 in nni_ctx_send nanomq/nng/src/core/socket.c:1438:2
#3 0x5aef47 in nng_ctx_send nanomq/nng/src/nng.c:419:2
#4 0x58ae3e in server_cb nanomq/nanomq/apps/broker.c:418:4
#5 0x626485 in nni_task_exec nanomq/nng/src/core/taskq.c:144:3
#6 0x5d08c3 in nni_aio_finish_impl nanomq/nng/src/core/aio.c:469:3
#7 0x5d094c in nni_aio_finish_sync nanomq/nng/src/core/aio.c:484:2
#8 0x68d84b in nano_pipe_recv_cb nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:1217:2
#9 0x626485 in nni_task_exec nanomq/nng/src/core/taskq.c:144:3
#10 0x5d08c3 in nni_aio_finish_impl nanomq/nng/src/core/aio.c:469:3
#11 0x5d094c in nni_aio_finish_sync nanomq/nng/src/core/aio.c:484:2
#12 0x92f2a7 in tcptran_pipe_recv_cb nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:891:2
#13 0x6253ae in nni_taskq_thread nanomq/nng/src/core/taskq.c:50:4
#14 0x628eb8 in nni_thr_wrap nanomq/nng/src/core/thread.c:94:3
#15 0x63bb0b in nni_plat_thr_main nanomq/nng/src/platform/posix/posix_thread.c:266:2
#16 0x7ffae6287608 in start_thread /build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477:8
#17 0x7ffae6015292 in clone /build/glibc-eX1tMB/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:1865:16 in
```
| Null Pointer Dereference in Function topic_filtern at mqtt_parser.c Leading to Runtime Error | https://api.github.com/repos/nanomq/nanomq/issues/1723/comments | 1 | 2024-03-26T09:22:10Z | 2024-04-02T04:45:07Z | https://github.com/nanomq/nanomq/issues/1723 | 2,207,688,937 | 1,723 |
[
"emqx",
"nanomq"
] | **Describe the bug**
A heap-buffer-overflow error was detected by AddressSanitizer in the `nanomq` MQTT codec module. Specifically, the `read_byte` function attempted to access memory address, which lies just beyond the bounds of an allocated 387-byte buffer.
**Expected behavior**
The `read_byte` function is expected to check the bounds of the buffer before attempting to read data to ensure that it does not read beyond the allocated memory space.
**Actual Behavior**
At line 2871 in the `mqtt_codec.c` file, the `read_byte` function attempted to increment its `curpos` pointer and read the value at that position, resulting in an out-of-bounds read.
**To Reproduce**
Follow these steps to reproduce the issue:
1. Compile NanoMQ with ASan and UBSan enabled:
```bash
mkdir nanomq/build
cd build
cmake -DBUILD_BENCH=ON -DASAN=ON -DTSAN=ON \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_FLAGS="-g -fsanitize=address,undefined -fno-omit-frame-pointer" \
-DCMAKE_CXX_FLAGS="-g -fsanitize=address,undefined -fno-omit-frame-pointer" \
-DCMAKE_LD_FLAGS="-fsanitize=address,undefined" \
..
make clean
make -j 8
```
2. Start the NanoMQ server with the following command:
```bash
nanomq/build/nanomq/nanomq start --url nmq-tcp://0.0.0.0:5883 --url nmq-ws://localhost:5885 --max_tq_thread 8 -n 16
```
3. Send a series of hexstreams to the server in sequence, which are stored in the file `hexstream.txt` using the code:
```python
import socket
def send_packet(input):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s.connect(('127.0.0.1', 5883))
s.send(input)
except ConnectionResetError:
print("Connection was reset.")
except ConnectionRefusedError:
print("Connection refused.")
finally:
s.close()
with open('hexstream.txt', 'r') as f:
crash_log = f.read().splitlines()
for c in crash_log:
clean_c = ''.join(c.split())
packet = bytearray.fromhex(clean_c)
send_packet(packet)
```
[hexstream.txt](https://github.com/nanomq/nanomq/files/14754539/hexstream.txt)
**Environment Details**
- NanoMQ version 0.21.7
- Operating system and version Ubuntu 20.04 LTS
- Compiler and language used clang version 12.0.0
- testing scenario
**Crash Report**
log of server:
```
2024-03-24 23:53:21 [1895146] ERROR nanomq/nng/src/supplemental/nanolib/conf_ver2.c:1534 conf_parse_ver2: Configure file [(null)] or [/etc/nanomq.conf] not found or unreadable
NanoMQ Broker is started successfully!
2024-03-24 23:53:21 [1895157] ERROR nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:456 tcptran_pipe_nego_cb: connect nego error rv: Protocol error(13)
2024-03-24 23:53:21 [1895156] ERROR nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:456 tcptran_pipe_nego_cb: connect nego error rv: Unknown error #130(130)
2024-03-24 23:53:21 [1895155] ERROR nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:335 tcptran_pipe_nego_cb: Illegal CONNECT Packet type 34
2024-03-24 23:53:21 [1895155] ERROR nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:456 tcptran_pipe_nego_cb: connect nego error rv: Protocol error(13)
2024-03-24 23:53:21 [1895169] ERROR nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:456 tcptran_pipe_nego_cb: connect nego error rv: Unknown error #130(130)
2024-03-24 23:53:21 [1895160] WARN nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:639 tcptran_pipe_recv_cb: nni aio recv error!! Connection shutdown
2024-03-24 23:53:21 [1895160] WARN nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:907 tcptran_pipe_recv_cb: tcptran_pipe_recv_cb: parse error rv: 139
2024-03-24 23:53:21 [1895160] WARN nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:791 tcptran_pipe_recv_cb: 0 Packet ID in QoS Message!
2024-03-24 23:53:21 [1895160] WARN nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:907 tcptran_pipe_recv_cb: tcptran_pipe_recv_cb: parse error rv: 130
2024-03-24 23:53:21 [1895167] ERROR nanomq/nanomq/pub_handler.c:1139 handle_pub: Topic is NULL
2024-03-24 23:53:21 [1895159] WARN nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:639 tcptran_pipe_recv_cb: nni aio recv error!! Object closed
2024-03-24 23:53:21 [1895159] WARN nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:907 tcptran_pipe_recv_cb: tcptran_pipe_recv_cb: parse error rv: 139
2024-03-24 23:53:21 [1895168] ERROR nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:456 tcptran_pipe_nego_cb: connect nego error rv: Unknown error #130(130)
2024-03-24 23:53:21 [1895162] ERROR nanomq/nanomq/apps/broker.c:104 sig_handler: signal signumber: 6 received!
```
Here is the ASan report:
```
=================================================================
==1895146==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6140000001c3 at pc 0x0000006e70e5 bp 0x7fdadb493a90 sp 0x7fdadb493a88
READ of size 1 at 0x6140000001c3 thread T14 (nng:task)
#0 0x6e70e4 in read_byte nanomq/nng/src/supplemental/mqtt/mqtt_codec.c:2871:9
#1 0x6fd130 in decode_buf_properties nanomq/nng/src/supplemental/mqtt/mqtt_codec.c:3929:12
#2 0x6fd568 in decode_properties nanomq/nng/src/supplemental/mqtt/mqtt_codec.c:3952:9
#3 0x4fee61 in decode_pub_message nanomq/nanomq/pub_handler.c:1607:8
#4 0x4fa0f4 in handle_pub nanomq/nanomq/pub_handler.c:1093:11
#5 0x58bd55 in server_cb nanomq/nanomq/apps/broker.c:455:17
#6 0x626485 in nni_task_exec nanomq/nng/src/core/taskq.c:144:3
#7 0x5d08c3 in nni_aio_finish_impl nanomq/nng/src/core/aio.c:469:3
#8 0x5d094c in nni_aio_finish_sync nanomq/nng/src/core/aio.c:484:2
#9 0x68d84b in nano_pipe_recv_cb nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:1217:2
#10 0x626485 in nni_task_exec nanomq/nng/src/core/taskq.c:144:3
#11 0x5d08c3 in nni_aio_finish_impl nanomq/nng/src/core/aio.c:469:3
#12 0x5d094c in nni_aio_finish_sync nanomq/nng/src/core/aio.c:484:2
#13 0x92f2a7 in tcptran_pipe_recv_cb nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:891:2
#14 0x6253ae in nni_taskq_thread nanomq/nng/src/core/taskq.c:50:4
#15 0x628eb8 in nni_thr_wrap nanomq/nng/src/core/thread.c:94:3
#16 0x63bb0b in nni_plat_thr_main nanomq/nng/src/platform/posix/posix_thread.c:266:2
#17 0x7fdaec849608 in start_thread /build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477:8
#18 0x7fdaec5d7292 in clone /build/glibc-eX1tMB/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
0x6140000001c3 is located 0 bytes to the right of 387-byte region [0x614000000040,0x6140000001c3)
allocated by thread T14 (nng:task) here:
#0 0x4b1b3f in calloc /home/brian/src/llvm_releases/llvm-project/llvm/utils/release/final/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:154:3
Thread T14 (nng:task) created by T0 here:
#0 0x49bd4c in pthread_create /home/brian/src/llvm_releases/llvm-project/llvm/utils/release/final/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:205:3
#1 0x63b82c in nni_plat_thr_init nanomq/nng/src/platform/posix/posix_thread.c:279:7
#2 0x6287bb in nni_thr_init nanomq/nng/src/core/thread.c:121:12
#3 0x624bc6 in nni_taskq_init nanomq/nng/src/core/taskq.c:95:8
#4 0x627ee4 in nni_taskq_sys_init nanomq/nng/src/core/taskq.c:287:10
#5 0x5e5cfc in nni_init_helper nanomq/nng/src/core/init.c:35:13
#6 0x63c3ea in nni_plat_init nanomq/nng/src/platform/posix/posix_thread.c:422:12
#7 0x5e5ce2 in nni_init nanomq/nng/src/core/init.c:57:10
#8 0x695e8f in nni_proto_mqtt_open nanomq/nng/src/sp/protocol.c:36:12
#9 0x6783e7 in nng_nmq_tcp0_open nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:1403:10
#10 0x59b9f3 in broker nanomq/nanomq/apps/broker.c:937:25
#11 0x5a9407 in broker_start nanomq/nanomq/apps/broker.c:1742:7
#12 0x585ad6 in main nanomq/nanomq/nanomq.c:142:10
#13 0x7fdaec4dc0b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
SUMMARY: AddressSanitizer: heap-buffer-overflow nanomq/nng/src/supplemental/mqtt/mqtt_codec.c:2871:9 in read_byte
Shadow bytes around the buggy address:
0x0c287fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c287fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c287fff8000: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
0x0c287fff8010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c287fff8020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c287fff8030: 00 00 00 00 00 00 00 00[03]fa fa fa fa fa fa fa
0x0c287fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fff8080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==1895146==ABORTING
```
| Heap-Buffer-Overflow in read_byte Function of NanoMQ at mqtt_codec.c:2871 | https://api.github.com/repos/nanomq/nanomq/issues/1722/comments | 1 | 2024-03-26T08:03:39Z | 2024-04-02T04:45:19Z | https://github.com/nanomq/nanomq/issues/1722 | 2,207,520,886 | 1,722 |
[
"emqx",
"nanomq"
] | **Describe the bug**
A heap-buffer-overflow error was detected by AddressSanitizer in the `get_var_integer` function of `nanomq`. The function attempts to read beyond the allocated heap buffer, leading to undefined behavior. The issue occurs specifically at line 174 in `mqtt_parser.c`, where the function tries to access a byte that is just beyond the allocated memory block. This indicates that the bounds of the buffer are not being correctly respected, potentially due to incorrect assumptions about the size of the buffer or an error in the calculation of the index.
**Expected behavior**
`get_var_integer` should safely parse the variable integer within the bounds of the provided buffer. No overflow of the buffer should occur during normal operation.
**Actual Behavior**
The function `get_var_integer` caused a heap-buffer-overflow by reading past the end of a 14-byte allocated buffer. The buffer was expected to contain a variable-length integer, but the function continued to read past the buffer's end, resulting in undefined behavior and a runtime error. AddressSanitizer reported that the read operation occurred at an address that was beyond the allocated range, specifically 0 bytes to the right of a 14-byte region.
**To Reproduce**
Follow these steps to reproduce the issue:
1. Compile NanoMQ with ASan and UBSan enabled:
```bash
mkdir nanomq/build
cd build
cmake -DBUILD_BENCH=ON -DASAN=ON -DTSAN=ON \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_FLAGS="-g -fsanitize=address,undefined -fno-omit-frame-pointer" \
-DCMAKE_CXX_FLAGS="-g -fsanitize=address,undefined -fno-omit-frame-pointer" \
-DCMAKE_LD_FLAGS="-fsanitize=address,undefined" \
..
make clean
make -j 8
```
2. Start the NanoMQ server with the following command:
```bash
nanomq/build/nanomq/nanomq start --url nmq-tcp://0.0.0.0:5883 --url nmq-ws://localhost:5885 --max_tq_thread 8 -n 16
```
3. Send a series of hexstreams to the server in sequence, which are stored in the file `hexstream.txt` :
[hexstream.txt](https://github.com/nanomq/nanomq/files/14752229/hexstream.txt)
**Environment Details**
- NanoMQ version 0.21.7
- Operating system and version Ubuntu 20.04 LTS
- Compiler and language used clang version 12.0.0
- testing scenario
**Crash Report**
log of server:
```
2024-03-24 23:38:32 [1788480] ERROR nanomq/nng/src/supplemental/nanolib/conf_ver2.c:1534 conf_parse_ver2: Configure file [(null)] or [/etc/nanomq.conf] not found or unreadable
NanoMQ Broker is started successfully!
2024-03-24 23:38:32 [1788493] ERROR nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:335 tcptran_pipe_nego_cb: Illegal CONNECT Packet type 30
2024-03-24 23:38:32 [1788493] ERROR nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:456 tcptran_pipe_nego_cb: connect nego error rv: Protocol error(13)
2024-03-24 23:38:32 [1788498] ERROR nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:335 tcptran_pipe_nego_cb: Illegal CONNECT Packet type 80
2024-03-24 23:38:32 [1788498] ERROR nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:456 tcptran_pipe_nego_cb: connect nego error rv: Protocol error(13)
2024-03-24 23:38:32 [1788490] ERROR nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:456 tcptran_pipe_nego_cb: connect nego error rv: Unknown error #130(130)
2024-03-24 23:38:32 [1788489] WARN nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:639 tcptran_pipe_recv_cb: nni aio recv error!! Connection shutdown
2024-03-24 23:38:32 [1788489] WARN nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:907 tcptran_pipe_recv_cb: tcptran_pipe_recv_cb: parse error rv: 139
2024-03-24 23:38:32 [1788488] ERROR nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:1075 nano_pipe_recv_cb: Invalid subscribe packet!
2024-03-24 23:38:32 [1788494] ERROR nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:1075 nano_pipe_recv_cb: Invalid subscribe packet!
2024-03-24 23:38:33 [1788491] ERROR nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:335 tcptran_pipe_nego_cb: Illegal CONNECT Packet type 15
2024-03-24 23:38:33 [1788491] ERROR nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:456 tcptran_pipe_nego_cb: connect nego error rv: Protocol error(13)
2024-03-24 23:38:33 [1788502] ERROR nanomq/nanomq/apps/broker.c:104 sig_handler: signal signumber: 6 received!
```
Here is the ASan report:
```
=================================================================
==1788480==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000b01e at pc 0x000000656aa4 bp 0x7f304dee37a0 sp 0x7f304dee3798
READ of size 1 at 0x60200000b01e thread T20 (nng:task)
#0 0x656aa3 in get_var_integer nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:174:12
#1 0x65f604 in conn_handler nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:593:33
#2 0x931cb8 in tcptran_pipe_nego_cbnanomq/nng/src/sp/transport/mqtt/broker_tcp.c:374:13
#3 0x6253ae in nni_taskq_thread nanomq/nng/src/core/taskq.c:50:4
#4 0x628eb8 in nni_thr_wrap nanomq/nng/src/core/thread.c:94:3
#5 0x63bb0b in nni_plat_thr_main nanomq/nng/src/platform/posix/posix_thread.c:266:2
#6 0x7f306706d608 in start_thread /build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477:8
#7 0x7f3066dfb292 in clone /build/glibc-eX1tMB/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
0x60200000b01e is located 0 bytes to the right of 14-byte region [0x60200000b010,0x60200000b01e)
allocated by thread T20 (nng:task) here:
#0 0x4b19ca in malloc /home/brian/src/llvm_releases/llvm-project/llvm/utils/release/final/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
Thread T20 (nng:task) created by T0 here:
#0 0x49bd4c in pthread_create /home/brian/src/llvm_releases/llvm-project/llvm/utils/release/final/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:205:3
#1 0x63b82c in nni_plat_thr_init nanomq/nng/src/platform/posix/posix_thread.c:279:7
#2 0x6287bb in nni_thr_init nanomq/nng/src/core/thread.c:121:12
#3 0x624bc6 in nni_taskq_init nanomq/nng/src/core/taskq.c:95:8
#4 0x627ee4 in nni_taskq_sys_init nanomq/nng/src/core/taskq.c:287:10
#5 0x5e5cfc in nni_init_helper nanomq/nng/src/core/init.c:35:13
#6 0x63c3ea in nni_plat_init nanomq/nng/src/platform/posix/posix_thread.c:422:12
#7 0x5e5ce2 in nni_init nanomq/nng/src/core/init.c:57:10
#8 0x695e8f in nni_proto_mqtt_open nanomq/nng/src/sp/protocol.c:36:12
#9 0x6783e7 in nng_nmq_tcp0_open nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:1403:10
#10 0x59b9f3 in broker nanomq/nanomq/apps/broker.c:937:25
#11 0x5a9407 in broker_start nanomq/nanomq/apps/broker.c:1742:7
#12 0x585ad6 in main nanomq/nanomq/nanomq.c:142:10
#13 0x7f3066d000b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
SUMMARY: AddressSanitizer: heap-buffer-overflow nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:174:12 in get_var_integer
Shadow bytes around the buggy address:
0x0c047fff95b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff95c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff95d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff95e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff95f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c047fff9600: fa fa 00[06]fa fa 05 fa fa fa fa fa fa fa fa fa
0x0c047fff9610: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9620: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9630: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9640: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9650: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==1788480==ABORTING
```
| Heap-Buffer-Overflow in get_var_integer Function of NanoMQ at mqtt_parser.c:174 | https://api.github.com/repos/nanomq/nanomq/issues/1720/comments | 2 | 2024-03-26T04:23:26Z | 2024-04-02T04:45:32Z | https://github.com/nanomq/nanomq/issues/1720 | 2,207,217,825 | 1,720 |
[
"emqx",
"nanomq"
] | Hello! Today, I rechecked nanomq using the memory leak detection tool I developed and found several potential memory leak defects (there may be false positives). I conducted preliminary filtering of the error reports and uploaded the filtered reports of potentially genuine memory leak defects to the following link: https://gitee.com/yin-luming/nanomq_full_report.git. Please note that there are multiple HTML files in the repository, and one HTML file may contain reports for multiple defects (click on the Reports tab on the left side of the HTML page to switch views). When confirming, simply focus on defects labeled as memory leaks; almost all other types of defects are likely false positives. However, some memory leak types of defects may also be false positives. You only need to pull the repository to a Windows operating system and use a browser to view the reports.
| Several possible memory leak defects. | https://api.github.com/repos/nanomq/nanomq/issues/1719/comments | 1 | 2024-03-25T08:26:54Z | 2024-03-27T10:34:38Z | https://github.com/nanomq/nanomq/issues/1719 | 2,205,170,920 | 1,719 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Using /etc/nanomq_pwd.conf for storing username/password combinations.
1. If the password contains only numbers, the user is ignored
2. If the username contains one or more dots (.), the user is ignored.
**Expected behavior**
User/Password combination works as expected, even with only numbers in the password or dots in the username.
**Actual Behavior**
Users **test** and **test.test** are ignored.
```
2024-03-23 22:15:43 [823] INFO /nanomq/nng/src/supplemental/nanolib/conf.c:978 print_auth_conf: [0] username: test1
2024-03-23 22:15:43 [823] INFO /nanomq/nng/src/supplemental/nanolib/conf.c:978 print_auth_conf: [1] username: test2
```
**To Reproduce**
_/etc/nanomq_pwd.conf_
```
test1: ABCD
test: 12345
test2: ABCD
test.test: ABCD
```
**Environment Details**
- NanoMQ v0.21.8-7
- Docker image from official Docker Hub
| Users in pwd-file ignored | https://api.github.com/repos/nanomq/nanomq/issues/1716/comments | 3 | 2024-03-23T22:21:48Z | 2024-05-09T03:24:07Z | https://github.com/nanomq/nanomq/issues/1716 | 2,204,071,583 | 1,716 |
[
"emqx",
"nanomq"
] | **Describe the bug**
```
==2103492==ERROR: AddressSanitizer: heap-use-after-free on address 0x62e000000400 at pc 0x00000082b7cb bp 0x7f1c8329bac0 sp 0x7f1c8329bab8
READ of size 4 at 0x62e000000400 thread T62
#0 0x82b7ca in compute_new_index /home/wangha/Documents/nanomq/nng/src/supplemental/nanolib/parquet/parquet.cc:291
#1 0x82d83d in parquet_write(conf_parquet*, std::shared_ptr<parquet::schema::GroupNode>, parquet_object*) /home/wangha/Documents/nanomq/nng/src/supplemental/nanolib/parquet/parquet.cc:414
#2 0x82f158 in parquet_write_loop_v2(void*) /home/wangha/Documents/nanomq/nng/src/supplemental/nanolib/parquet/parquet.cc:531
#3 0x856930 in void std::__invoke_impl<void, void (*)(void*), conf_parquet*>(std::__invoke_other, void (*&&)(void*), conf_parquet*&&) /usr/include/c++/13/bits/invoke.h:61
#4 0x856865 in std::__invoke_result<void (*)(void*), conf_parquet*>::type std::__invoke<void (*)(void*), conf_parquet*>(void (*&&)(void*), conf_parquet*&&) /usr/include/c++/13/bits/invoke.h:96
#5 0x85679c in void std::thread::_Invoker<std::tuple<void (*)(void*), conf_parquet*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/include/c++/13/bits/std_thread.h:292
#6 0x85672b in std::thread::_Invoker<std::tuple<void (*)(void*), conf_parquet*> >::operator()() /usr/include/c++/13/bits/std_thread.h:299
#7 0x8565b7 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(void*), conf_parquet*> > >::_M_run() /usr/include/c++/13/bits/std_thread.h:244
#8 0x7f1ccf4e31b2 in execute_native_thread_routine ../../../../../libstdc++-v3/src/c++11/thread.cc:104
#9 0x7f1ccf2ae946 in start_thread (/lib64/libc.so.6+0x8c946) (BuildId: f888be5f5e7d58e04cabb8c675c7ab94e77dd68c)
#10 0x7f1ccf33485f in __clone3 (/lib64/libc.so.6+0x11285f) (BuildId: f888be5f5e7d58e04cabb8c675c7ab94e77dd68c)
0x62e000000400 is located 0 bytes inside of 40000-byte region [0x62e000000400,0x62e00000a040)
freed by thread T21 here:
#0 0x7f1cd02d7fb8 (/lib64/libasan.so.8+0xd7fb8) (BuildId: 542ad02088f38edfdba9d4bfa465b2299f512d3e)
#1 0x766f8d in nni_free /home/wangha/Documents/nanomq/nng/src/platform/posix/posix_alloc.c:33
#2 0x73830b in nng_free /home/wangha/Documents/nanomq/nng/src/nng.c:78
#3 0x71e8cb in flush_smsg_to_disk /home/wangha/Documents/nanomq/nanomq/webhook_post.c:490
#4 0x71ecb4 in send_exchange_cb /home/wangha/Documents/nanomq/nanomq/webhook_post.c:540
#5 0x761e17 in nni_taskq_thread /home/wangha/Documents/nanomq/nng/src/core/taskq.c:50
#6 0x7630b3 in nni_thr_wrap /home/wangha/Documents/nanomq/nng/src/core/thread.c:94
#7 0x76b048 in nni_plat_thr_main /home/wangha/Documents/nanomq/nng/src/platform/posix/posix_thread.c:266
#8 0x7f1ccf2ae946 in start_thread (/lib64/libc.so.6+0x8c946) (BuildId: f888be5f5e7d58e04cabb8c675c7ab94e77dd68c)
previously allocated by thread T21 here:
#0 0x7f1cd02d92ef in malloc (/lib64/libasan.so.8+0xd92ef) (BuildId: 542ad02088f38edfdba9d4bfa465b2299f512d3e)
#1 0x766f3b in nni_alloc /home/wangha/Documents/nanomq/nng/src/platform/posix/posix_alloc.c:20
#2 0x7382b1 in nng_alloc /home/wangha/Documents/nanomq/nng/src/nng.c:60
#3 0x71e5e1 in flush_smsg_to_disk /home/wangha/Documents/nanomq/nanomq/webhook_post.c:440
#4 0x71ecb4 in send_exchange_cb /home/wangha/Documents/nanomq/nanomq/webhook_post.c:540
#5 0x761e17 in nni_taskq_thread /home/wangha/Documents/nanomq/nng/src/core/taskq.c:50
#6 0x7630b3 in nni_thr_wrap /home/wangha/Documents/nanomq/nng/src/core/thread.c:94
#7 0x76b048 in nni_plat_thr_main /home/wangha/Documents/nanomq/nng/src/platform/posix/posix_thread.c:266
#8 0x7f1ccf2ae946 in start_thread (/lib64/libc.so.6+0x8c946) (BuildId: f888be5f5e7d58e04cabb8c675c7ab94e77dd68c)
Thread T62 created by T0 here:
#0 0x7f1cd0248956 in pthread_create (/lib64/libasan.so.8+0x48956) (BuildId: 542ad02088f38edfdba9d4bfa465b2299f512d3e)
#1 0x7f1ccf4e3288 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /usr/src/debug/gcc-13.2.1-4.fc38.x86_64/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/include/x86_64-redhat-linux/bits/gthr-default.h:663
#2 0x82f86c in parquet_write_launcher /home/wangha/Documents/nanomq/nng/src/supplemental/nanolib/parquet/parquet.cc:586
#3 0x71f320 in hook_exchange_sender_init /home/wangha/Documents/nanomq/nanomq/webhook_post.c:628
#4 0x7336a3 in broker /home/wangha/Documents/nanomq/nanomq/apps/broker.c:1089
#5 0x7372b4 in broker_start /home/wangha/Documents/nanomq/nanomq/apps/broker.c:1742
#6 0x72bc5c in main /home/wangha/Documents/nanomq/nanomq/nanomq.c:142
#7 0x7f1ccf249b89 in __libc_start_call_main (/lib64/libc.so.6+0x27b89) (BuildId: f888be5f5e7d58e04cabb8c675c7ab94e77dd68c)
#8 0x7f1ccf249c4a in __libc_start_main_alias_2 (/lib64/libc.so.6+0x27c4a) (BuildId: f888be5f5e7d58e04cabb8c675c7ab94e77dd68c)
#9 0x6e8914 in _start (/home/wangha/Documents/nanomq/build/nanomq/nanomq+0x6e8914) (BuildId: e287c7388a2fd3436fcad2420e2c145432ed2bd3)
Thread T21 created by T0 here:
#0 0x7f1cd0248956 in pthread_create (/lib64/libasan.so.8+0x48956) (BuildId: 542ad02088f38edfdba9d4bfa465b2299f512d3e)
#1 0x76b141 in nni_plat_thr_init /home/wangha/Documents/nanomq/nng/src/platform/posix/posix_thread.c:279
#2 0x763356 in nni_thr_init /home/wangha/Documents/nanomq/nng/src/core/thread.c:121
#3 0x762132 in nni_taskq_init /home/wangha/Documents/nanomq/nng/src/core/taskq.c:95
#4 0x762dbf in nni_taskq_sys_init /home/wangha/Documents/nanomq/nng/src/core/taskq.c:287
#5 0x74d3c8 in nni_init_helper /home/wangha/Documents/nanomq/nng/src/core/init.c:35
#6 0x76b448 in nni_plat_init /home/wangha/Documents/nanomq/nng/src/platform/posix/posix_thread.c:422
#7 0x74d432 in nni_init /home/wangha/Documents/nanomq/nng/src/core/init.c:57
#8 0x7a48c1 in nng_mtx_alloc /home/wangha/Documents/nanomq/nng/src/supplemental/util/platform.c:93
#9 0x7fc354 in conf_bridge_parse_ver2 /home/wangha/Documents/nanomq/nng/src/supplemental/nanolib/conf_ver2.c:1050
#10 0x800376 in conf_parse_ver2 /home/wangha/Documents/nanomq/nng/src/supplemental/nanolib/conf_ver2.c:1553
#11 0x736e17 in broker_start /home/wangha/Documents/nanomq/nanomq/apps/broker.c:1683
#12 0x72bc5c in main /home/wangha/Documents/nanomq/nanomq/nanomq.c:142
#13 0x7f1ccf249b89 in __libc_start_call_main (/lib64/libc.so.6+0x27b89) (BuildId: f888be5f5e7d58e04cabb8c675c7ab94e77dd68c)
#14 0x7f1ccf249c4a in __libc_start_main_alias_2 (/lib64/libc.so.6+0x27c4a) (BuildId: f888be5f5e7d58e04cabb8c675c7ab94e77dd68c)
#15 0x6e8914 in _start (/home/wangha/Documents/nanomq/build/nanomq/nanomq+0x6e8914) (BuildId: e287c7388a2fd3436fcad2420e2c145432ed2bd3)
SUMMARY: AddressSanitizer: heap-use-after-free /home/wangha/Documents/nanomq/nng/src/supplemental/nanolib/parquet/parquet.cc:291 in compute_new_index
Shadow bytes around the buggy address:
0x62e000000180: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x62e000000200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x62e000000280: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x62e000000300: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x62e000000380: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x62e000000400:[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62e000000480: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62e000000500: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62e000000580: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62e000000600: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62e000000680: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==2103492==ABORTING
```
| Heap use after free in parquet write. | https://api.github.com/repos/nanomq/nanomq/issues/1713/comments | 0 | 2024-03-21T08:52:53Z | 2024-03-22T03:05:15Z | https://github.com/nanomq/nanomq/issues/1713 | 2,199,565,445 | 1,713 |
[
"emqx",
"nanomq"
] | E:\Projects\DigitalShielding\nanomq\nng\build>cmake -G Ninja ..
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/Tools/MinGW/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/Tools/MinGW/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
NNG_TESTS=ON
NNG_TOOLS=ON
-- Configuring for NNG version 1.7.2
-- Building static libs.
-- Looking for strlcpy
-- Looking for strlcpy - not found
-- Looking for strnlen
-- Looking for strnlen - found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for strncasecmp
-- Looking for strncasecmp - found
-- Looking for InitializeConditionVariable
-- Looking for InitializeConditionVariable - found
-- Looking for snprintf
-- Looking for snprintf - found
Check MQTT_QUIC_CLIENT support:
Check MQTT_QUIC_TRANSPORT support:
-- Looking for nl_langinfo
-- Looking for nl_langinfo - not found
-- Test zt disabled (unconfigured)
-- Configuring done (3.2s)
-- Generating done (0.2s)
-- Build files have been written to: E:/Projects/DigitalShielding/nanomq/nng/build
E:\Projects\DigitalShielding\nanomq\nng\build>ninja
[1/506] Building C object CMakeFiles/nng.dir/src/core/dialer.c.obj
FAILED: CMakeFiles/nng.dir/src/core/dialer.c.obj
D:\Tools\MinGW\bin\gcc.exe -DNNG_ENABLE_COMPAT -DNNG_ENABLE_IPV6 -DNNG_ENABLE_STATS -DNNG_HAVE_BUS0 -DNNG_HAVE_CONDVAR=1 -DNNG_HAVE_MQTT_BROKER -DNNG_HAVE_MQTT_CLIENT -DNNG_HAVE_PAIR0 -DNNG_HAVE_PAIR1 -DNNG_HAVE_PUB0 -DNNG_HAVE_PULL0 -DNNG_HAVE_PUSH0 -DNNG_HAVE_REP0 -DNNG_HAVE_REQ0 -DNNG_HAVE_RESPONDENT0 -DNNG_HAVE_SNPRINTF=1 -DNNG_HAVE_STRCASECMP=1 -DNNG_HAVE_STRNCASECMP=1 -DNNG_HAVE_STRNLEN=1 -DNNG_HAVE_SUB0 -DNNG_HAVE_SURVEYOR0 -DNNG_MAX_EXPIRE_THREADS=8 -DNNG_MAX_POLLER_THREADS=8 -DNNG_MAX_TASKQ_THREADS=16 -DNNG_PLATFORM_WINDOWS -DNNG_PRIVATE -DNNG_RESOLV_CONCURRENCY=4 -DNNG_STATIC_LIB -DNNG_SUPP_HTTP -DNNG_TRANSPORT_FDC -DNNG_TRANSPORT_INPROC -DNNG_TRANSPORT_IPC -DNNG_TRANSPORT_MQTT_BROKER_TCP -DNNG_TRANSPORT_MQTT_BROKER_TLS -DNNG_TRANSPORT_MQTT_BROKER_WS -DNNG_TRANSPORT_MQTT_TCP -DNNG_TRANSPORT_MQTT_TLS -DNNG_TRANSPORT_TCP -DNNG_TRANSPORT_TLS -DNNG_TRANSPORT_WS -D_CRT_RAND_S -D_CRT_SECURE_NO_WARNINGS -D_WIN32_WINNT=0x0600 -IE:/Projects/DigitalShielding/nanomq/nng/src -IE:/Projects/DigitalShielding/nanomq/nng/include -IE:/Projects/DigitalShielding/nanomq/nng/nanolib/include -IE:/Projects/DigitalShielding/nanomq/nng/nanomq/include -Wall -Wextra -fno-omit-frame-pointer -std=gnu99 -MD -MT CMakeFiles/nng.dir/src/core/dialer.c.obj -MF CMakeFiles\nng.dir\src\core\dialer.c.obj.d -o CMakeFiles/nng.dir/src/core/dialer.c.obj -c E:/Projects/DigitalShielding/nanomq/nng/src/core/dialer.c
In file included from E:/Projects/DigitalShielding/nanomq/nng/src/core/platform.h:584:0,
from E:/Projects/DigitalShielding/nanomq/nng/src/core/nng_impl.h:29,
from E:/Projects/DigitalShielding/nanomq/nng/src/core/dialer.c:12:
E:/Projects/DigitalShielding/nanomq/nng/src/platform/windows/win_impl.h:44:3: error: 'SRWLOCK_INIT' undeclared here (not in a function)
SRWLOCK_INIT \
^
E:/Projects/DigitalShielding/nanomq/nng/src/core/dialer.c:24:32: note: in expansion of macro 'NNI_MTX_INITIALIZER'
static nni_mtx dialers_lk = NNI_MTX_INITIALIZER;
^~~~~~~~~~~~~~~~~~~
[2/506] Building C object CMakeFiles/nng.dir/src/core/device.c.obj
FAILED: CMakeFiles/nng.dir/src/core/device.c.obj
D:\Tools\MinGW\bin\gcc.exe -DNNG_ENABLE_COMPAT -DNNG_ENABLE_IPV6 -DNNG_ENABLE_STATS -DNNG_HAVE_BUS0 -DNNG_HAVE_CONDVAR=1 -DNNG_HAVE_MQTT_BROKER -DNNG_HAVE_MQTT_CLIENT -DNNG_HAVE_PAIR0 -DNNG_HAVE_PAIR1 -DNNG_HAVE_PUB0 -DNNG_HAVE_PULL0 -DNNG_HAVE_PUSH0 -DNNG_HAVE_REP0 -DNNG_HAVE_REQ0 -DNNG_HAVE_RESPONDENT0 -DNNG_HAVE_SNPRINTF=1 -DNNG_HAVE_STRCASECMP=1 -DNNG_HAVE_STRNCASECMP=1 -DNNG_HAVE_STRNLEN=1 -DNNG_HAVE_SUB0 -DNNG_HAVE_SURVEYOR0 -DNNG_MAX_EXPIRE_THREADS=8 -DNNG_MAX_POLLER_THREADS=8 -DNNG_MAX_TASKQ_THREADS=16 -DNNG_PLATFORM_WINDOWS -DNNG_PRIVATE -DNNG_RESOLV_CONCURRENCY=4 -DNNG_STATIC_LIB -DNNG_SUPP_HTTP -DNNG_TRANSPORT_FDC -DNNG_TRANSPORT_INPROC -DNNG_TRANSPORT_IPC -DNNG_TRANSPORT_MQTT_BROKER_TCP -DNNG_TRANSPORT_MQTT_BROKER_TLS -DNNG_TRANSPORT_MQTT_BROKER_WS -DNNG_TRANSPORT_MQTT_TCP -DNNG_TRANSPORT_MQTT_TLS -DNNG_TRANSPORT_TCP -DNNG_TRANSPORT_TLS -DNNG_TRANSPORT_WS -D_CRT_RAND_S -D_CRT_SECURE_NO_WARNINGS -D_WIN32_WINNT=0x0600 -IE:/Projects/DigitalShielding/nanomq/nng/src -IE:/Projects/DigitalShielding/nanomq/nng/include -IE:/Projects/DigitalShielding/nanomq/nng/nanolib/include -IE:/Projects/DigitalShielding/nanomq/nng/nanomq/include -Wall -Wextra -fno-omit-frame-pointer -std=gnu99 -MD -MT CMakeFiles/nng.dir/src/core/device.c.obj -MF CMakeFiles\nng.dir\src\core\device.c.obj.d -o CMakeFiles/nng.dir/src/core/device.c.obj -c E:/Projects/DigitalShielding/nanomq/nng/src/core/device.c
In file included from E:/Projects/DigitalShielding/nanomq/nng/src/core/platform.h:584:0,
from E:/Projects/DigitalShielding/nanomq/nng/src/core/nng_impl.h:29,
from E:/Projects/DigitalShielding/nanomq/nng/src/core/device.c:11:
E:/Projects/DigitalShielding/nanomq/nng/src/platform/windows/win_impl.h:44:3: error: 'SRWLOCK_INIT' undeclared here (not in a function)
SRWLOCK_INIT \
^
E:/Projects/DigitalShielding/nanomq/nng/src/core/device.c:40:36: note: in expansion of macro 'NNI_MTX_INITIALIZER'
static nni_mtx device_mtx = NNI_MTX_INITIALIZER;
^~~~~~~~~~~~~~~~~~~
[5/506] Building C object CMakeFiles/nng.dir/src/core/idhash.c.obj
FAILED: CMakeFiles/nng.dir/src/core/idhash.c.obj
D:\Tools\MinGW\bin\gcc.exe -DNNG_ENABLE_COMPAT -DNNG_ENABLE_IPV6 -DNNG_ENABLE_STATS -DNNG_HAVE_BUS0 -DNNG_HAVE_CONDVAR=1 -DNNG_HAVE_MQTT_BROKER -DNNG_HAVE_MQTT_CLIENT -DNNG_HAVE_PAIR0 -DNNG_HAVE_PAIR1 -DNNG_HAVE_PUB0 -DNNG_HAVE_PULL0 -DNNG_HAVE_PUSH0 -DNNG_HAVE_REP0 -DNNG_HAVE_REQ0 -DNNG_HAVE_RESPONDENT0 -DNNG_HAVE_SNPRINTF=1 -DNNG_HAVE_STRCASECMP=1 -DNNG_HAVE_STRNCASECMP=1 -DNNG_HAVE_STRNLEN=1 -DNNG_HAVE_SUB0 -DNNG_HAVE_SURVEYOR0 -DNNG_MAX_EXPIRE_THREADS=8 -DNNG_MAX_POLLER_THREADS=8 -DNNG_MAX_TASKQ_THREADS=16 -DNNG_PLATFORM_WINDOWS -DNNG_PRIVATE -DNNG_RESOLV_CONCURRENCY=4 -DNNG_STATIC_LIB -DNNG_SUPP_HTTP -DNNG_TRANSPORT_FDC -DNNG_TRANSPORT_INPROC -DNNG_TRANSPORT_IPC -DNNG_TRANSPORT_MQTT_BROKER_TCP -DNNG_TRANSPORT_MQTT_BROKER_TLS -DNNG_TRANSPORT_MQTT_BROKER_WS -DNNG_TRANSPORT_MQTT_TCP -DNNG_TRANSPORT_MQTT_TLS -DNNG_TRANSPORT_TCP -DNNG_TRANSPORT_TLS -DNNG_TRANSPORT_WS -D_CRT_RAND_S -D_CRT_SECURE_NO_WARNINGS -D_WIN32_WINNT=0x0600 -IE:/Projects/DigitalShielding/nanomq/nng/src -IE:/Projects/DigitalShielding/nanomq/nng/include -IE:/Projects/DigitalShielding/nanomq/nng/nanolib/include -IE:/Projects/DigitalShielding/nanomq/nng/nanomq/include -Wall -Wextra -fno-omit-frame-pointer -std=gnu99 -MD -MT CMakeFiles/nng.dir/src/core/idhash.c.obj -MF CMakeFiles\nng.dir\src\core\idhash.c.obj.d -o CMakeFiles/nng.dir/src/core/idhash.c.obj -c E:/Projects/DigitalShielding/nanomq/nng/src/core/idhash.c
In file included from E:/Projects/DigitalShielding/nanomq/nng/src/core/platform.h:584:0,
from E:/Projects/DigitalShielding/nanomq/nng/src/core/nng_impl.h:29,
from E:/Projects/DigitalShielding/nanomq/nng/src/core/idhash.c:11:
E:/Projects/DigitalShielding/nanomq/nng/src/platform/windows/win_impl.h:44:3: error: 'SRWLOCK_INIT' undeclared here (not in a function)
SRWLOCK_INIT \
^
E:/Projects/DigitalShielding/nanomq/nng/src/core/idhash.c:24:34: note: in expansion of macro 'NNI_MTX_INITIALIZER'
static nni_mtx id_reg_mtx = NNI_MTX_INITIALIZER;
^~~~~~~~~~~~~~~~~~~
[6/506] Building C object CMakeFiles/nng.dir/src/core/reap.c.obj
FAILED: CMakeFiles/nng.dir/src/core/reap.c.obj
D:\Tools\MinGW\bin\gcc.exe -DNNG_ENABLE_COMPAT -DNNG_ENABLE_IPV6 -DNNG_ENABLE_STATS -DNNG_HAVE_BUS0 -DNNG_HAVE_CONDVAR=1 -DNNG_HAVE_MQTT_BROKER -DNNG_HAVE_MQTT_CLIENT -DNNG_HAVE_PAIR0 -DNNG_HAVE_PAIR1 -DNNG_HAVE_PUB0 -DNNG_HAVE_PULL0 -DNNG_HAVE_PUSH0 -DNNG_HAVE_REP0 -DNNG_HAVE_REQ0 -DNNG_HAVE_RESPONDENT0 -DNNG_HAVE_SNPRINTF=1 -DNNG_HAVE_STRCASECMP=1 -DNNG_HAVE_STRNCASECMP=1 -DNNG_HAVE_STRNLEN=1 -DNNG_HAVE_SUB0 -DNNG_HAVE_SURVEYOR0 -DNNG_MAX_EXPIRE_THREADS=8 -DNNG_MAX_POLLER_THREADS=8 -DNNG_MAX_TASKQ_THREADS=16 -DNNG_PLATFORM_WINDOWS -DNNG_PRIVATE -DNNG_RESOLV_CONCURRENCY=4 -DNNG_STATIC_LIB -DNNG_SUPP_HTTP -DNNG_TRANSPORT_FDC -DNNG_TRANSPORT_INPROC -DNNG_TRANSPORT_IPC -DNNG_TRANSPORT_MQTT_BROKER_TCP -DNNG_TRANSPORT_MQTT_BROKER_TLS -DNNG_TRANSPORT_MQTT_BROKER_WS -DNNG_TRANSPORT_MQTT_TCP -DNNG_TRANSPORT_MQTT_TLS -DNNG_TRANSPORT_TCP -DNNG_TRANSPORT_TLS -DNNG_TRANSPORT_WS -D_CRT_RAND_S -D_CRT_SECURE_NO_WARNINGS -D_WIN32_WINNT=0x0600 -IE:/Projects/DigitalShielding/nanomq/nng/src -IE:/Projects/DigitalShielding/nanomq/nng/include -IE:/Projects/DigitalShielding/nanomq/nng/nanolib/include -IE:/Projects/DigitalShielding/nanomq/nng/nanomq/include -Wall -Wextra -fno-omit-frame-pointer -std=gnu99 -MD -MT CMakeFiles/nng.dir/src/core/reap.c.obj -MF CMakeFiles\nng.dir\src\core\reap.c.obj.d -o CMakeFiles/nng.dir/src/core/reap.c.obj -c E:/Projects/DigitalShielding/nanomq/nng/src/core/reap.c
In file included from E:/Projects/DigitalShielding/nanomq/nng/src/core/platform.h:584:0,
from E:/Projects/DigitalShielding/nanomq/nng/src/core/nng_impl.h:29,
from E:/Projects/DigitalShielding/nanomq/nng/src/core/reap.c:11:
E:/Projects/DigitalShielding/nanomq/nng/src/platform/windows/win_impl.h:44:3: error: 'SRWLOCK_INIT' undeclared here (not in a function)
SRWLOCK_INIT \
^
E:/Projects/DigitalShielding/nanomq/nng/src/core/reap.c:21:34: note: in expansion of macro 'NNI_MTX_INITIALIZER'
static nni_mtx reap_mtx = NNI_MTX_INITIALIZER;
^~~~~~~~~~~~~~~~~~~
E:/Projects/DigitalShielding/nanomq/nng/src/platform/windows/win_impl.h:64:30: error: 'CONDITION_VARIABLE_INIT' undeclared here (not in a function)
.srl = (void *) mxp, .cv = CONDITION_VARIABLE_INIT \
^
E:/Projects/DigitalShielding/nanomq/nng/src/core/reap.c:23:38: note: in expansion of macro 'NNI_CV_INITIALIZER'
static nni_cv reap_work_cv = NNI_CV_INITIALIZER(&reap_mtx);
^~~~~~~~~~~~~~~~~~
[8/506] Building C object CMakeFiles/nng.dir/src/core/listener.c.obj
FAILED: CMakeFiles/nng.dir/src/core/listener.c.obj
D:\Tools\MinGW\bin\gcc.exe -DNNG_ENABLE_COMPAT -DNNG_ENABLE_IPV6 -DNNG_ENABLE_STATS -DNNG_HAVE_BUS0 -DNNG_HAVE_CONDVAR=1 -DNNG_HAVE_MQTT_BROKER -DNNG_HAVE_MQTT_CLIENT -DNNG_HAVE_PAIR0 -DNNG_HAVE_PAIR1 -DNNG_HAVE_PUB0 -DNNG_HAVE_PULL0 -DNNG_HAVE_PUSH0 -DNNG_HAVE_REP0 -DNNG_HAVE_REQ0 -DNNG_HAVE_RESPONDENT0 -DNNG_HAVE_SNPRINTF=1 -DNNG_HAVE_STRCASECMP=1 -DNNG_HAVE_STRNCASECMP=1 -DNNG_HAVE_STRNLEN=1 -DNNG_HAVE_SUB0 -DNNG_HAVE_SURVEYOR0 -DNNG_MAX_EXPIRE_THREADS=8 -DNNG_MAX_POLLER_THREADS=8 -DNNG_MAX_TASKQ_THREADS=16 -DNNG_PLATFORM_WINDOWS -DNNG_PRIVATE -DNNG_RESOLV_CONCURRENCY=4 -DNNG_STATIC_LIB -DNNG_SUPP_HTTP -DNNG_TRANSPORT_FDC -DNNG_TRANSPORT_INPROC -DNNG_TRANSPORT_IPC -DNNG_TRANSPORT_MQTT_BROKER_TCP -DNNG_TRANSPORT_MQTT_BROKER_TLS -DNNG_TRANSPORT_MQTT_BROKER_WS -DNNG_TRANSPORT_MQTT_TCP -DNNG_TRANSPORT_MQTT_TLS -DNNG_TRANSPORT_TCP -DNNG_TRANSPORT_TLS -DNNG_TRANSPORT_WS -D_CRT_RAND_S -D_CRT_SECURE_NO_WARNINGS -D_WIN32_WINNT=0x0600 -IE:/Projects/DigitalShielding/nanomq/nng/src -IE:/Projects/DigitalShielding/nanomq/nng/include -IE:/Projects/DigitalShielding/nanomq/nng/nanolib/include -IE:/Projects/DigitalShielding/nanomq/nng/nanomq/include -Wall -Wextra -fno-omit-frame-pointer -std=gnu99 -MD -MT CMakeFiles/nng.dir/src/core/listener.c.obj -MF CMakeFiles\nng.dir\src\core\listener.c.obj.d -o CMakeFiles/nng.dir/src/core/listener.c.obj -c E:/Projects/DigitalShielding/nanomq/nng/src/core/listener.c
In file included from E:/Projects/DigitalShielding/nanomq/nng/src/core/platform.h:584:0,
from E:/Projects/DigitalShielding/nanomq/nng/src/core/nng_impl.h:29,
from E:/Projects/DigitalShielding/nanomq/nng/src/core/listener.c:12:
E:/Projects/DigitalShielding/nanomq/nng/src/platform/windows/win_impl.h:44:3: error: 'SRWLOCK_INIT' undeclared here (not in a function)
SRWLOCK_INIT \
^
E:/Projects/DigitalShielding/nanomq/nng/src/core/listener.c:25:34: note: in expansion of macro 'NNI_MTX_INITIALIZER'
static nni_mtx listeners_lk = NNI_MTX_INITIALIZER;
^~~~~~~~~~~~~~~~~~~
[9/506] Building C object CMakeFiles/nng.dir/src/core/stats.c.obj
FAILED: CMakeFiles/nng.dir/src/core/stats.c.obj
D:\Tools\MinGW\bin\gcc.exe -DNNG_ENABLE_COMPAT -DNNG_ENABLE_IPV6 -DNNG_ENABLE_STATS -DNNG_HAVE_BUS0 -DNNG_HAVE_CONDVAR=1 -DNNG_HAVE_MQTT_BROKER -DNNG_HAVE_MQTT_CLIENT -DNNG_HAVE_PAIR0 -DNNG_HAVE_PAIR1 -DNNG_HAVE_PUB0 -DNNG_HAVE_PULL0 -DNNG_HAVE_PUSH0 -DNNG_HAVE_REP0 -DNNG_HAVE_REQ0 -DNNG_HAVE_RESPONDENT0 -DNNG_HAVE_SNPRINTF=1 -DNNG_HAVE_STRCASECMP=1 -DNNG_HAVE_STRNCASECMP=1 -DNNG_HAVE_STRNLEN=1 -DNNG_HAVE_SUB0 -DNNG_HAVE_SURVEYOR0 -DNNG_MAX_EXPIRE_THREADS=8 -DNNG_MAX_POLLER_THREADS=8 -DNNG_MAX_TASKQ_THREADS=16 -DNNG_PLATFORM_WINDOWS -DNNG_PRIVATE -DNNG_RESOLV_CONCURRENCY=4 -DNNG_STATIC_LIB -DNNG_SUPP_HTTP -DNNG_TRANSPORT_FDC -DNNG_TRANSPORT_INPROC -DNNG_TRANSPORT_IPC -DNNG_TRANSPORT_MQTT_BROKER_TCP -DNNG_TRANSPORT_MQTT_BROKER_TLS -DNNG_TRANSPORT_MQTT_BROKER_WS -DNNG_TRANSPORT_MQTT_TCP -DNNG_TRANSPORT_MQTT_TLS -DNNG_TRANSPORT_TCP -DNNG_TRANSPORT_TLS -DNNG_TRANSPORT_WS -D_CRT_RAND_S -D_CRT_SECURE_NO_WARNINGS -D_WIN32_WINNT=0x0600 -IE:/Projects/DigitalShielding/nanomq/nng/src -IE:/Projects/DigitalShielding/nanomq/nng/include -IE:/Projects/DigitalShielding/nanomq/nng/nanolib/include -IE:/Projects/DigitalShielding/nanomq/nng/nanomq/include -Wall -Wextra -fno-omit-frame-pointer -std=gnu99 -MD -MT CMakeFiles/nng.dir/src/core/stats.c.obj -MF CMakeFiles\nng.dir\src\core\stats.c.obj.d -o CMakeFiles/nng.dir/src/core/stats.c.obj -c E:/Projects/DigitalShielding/nanomq/nng/src/core/stats.c
In file included from E:/Projects/DigitalShielding/nanomq/nng/src/core/platform.h:584:0,
from E:/Projects/DigitalShielding/nanomq/nng/src/core/nng_impl.h:29,
from E:/Projects/DigitalShielding/nanomq/nng/src/core/stats.c:14:
E:/Projects/DigitalShielding/nanomq/nng/src/platform/windows/win_impl.h:44:3: error: 'SRWLOCK_INIT' undeclared here (not in a function)
SRWLOCK_INIT \
^
E:/Projects/DigitalShielding/nanomq/nng/src/core/stats.c:45:33: note: in expansion of macro 'NNI_MTX_INITIALIZER'
static nni_mtx stats_lock = NNI_MTX_INITIALIZER;
^~~~~~~~~~~~~~~~~~~
[10/506] Building C object CMakeFiles/nng.dir/src/core/pipe.c.obj
FAILED: CMakeFiles/nng.dir/src/core/pipe.c.obj
D:\Tools\MinGW\bin\gcc.exe -DNNG_ENABLE_COMPAT -DNNG_ENABLE_IPV6 -DNNG_ENABLE_STATS -DNNG_HAVE_BUS0 -DNNG_HAVE_CONDVAR=1 -DNNG_HAVE_MQTT_BROKER -DNNG_HAVE_MQTT_CLIENT -DNNG_HAVE_PAIR0 -DNNG_HAVE_PAIR1 -DNNG_HAVE_PUB0 -DNNG_HAVE_PULL0 -DNNG_HAVE_PUSH0 -DNNG_HAVE_REP0 -DNNG_HAVE_REQ0 -DNNG_HAVE_RESPONDENT0 -DNNG_HAVE_SNPRINTF=1 -DNNG_HAVE_STRCASECMP=1 -DNNG_HAVE_STRNCASECMP=1 -DNNG_HAVE_STRNLEN=1 -DNNG_HAVE_SUB0 -DNNG_HAVE_SURVEYOR0 -DNNG_MAX_EXPIRE_THREADS=8 -DNNG_MAX_POLLER_THREADS=8 -DNNG_MAX_TASKQ_THREADS=16 -DNNG_PLATFORM_WINDOWS -DNNG_PRIVATE -DNNG_RESOLV_CONCURRENCY=4 -DNNG_STATIC_LIB -DNNG_SUPP_HTTP -DNNG_TRANSPORT_FDC -DNNG_TRANSPORT_INPROC -DNNG_TRANSPORT_IPC -DNNG_TRANSPORT_MQTT_BROKER_TCP -DNNG_TRANSPORT_MQTT_BROKER_TLS -DNNG_TRANSPORT_MQTT_BROKER_WS -DNNG_TRANSPORT_MQTT_TCP -DNNG_TRANSPORT_MQTT_TLS -DNNG_TRANSPORT_TCP -DNNG_TRANSPORT_TLS -DNNG_TRANSPORT_WS -D_CRT_RAND_S -D_CRT_SECURE_NO_WARNINGS -D_WIN32_WINNT=0x0600 -IE:/Projects/DigitalShielding/nanomq/nng/src -IE:/Projects/DigitalShielding/nanomq/nng/include -IE:/Projects/DigitalShielding/nanomq/nng/nanolib/include -IE:/Projects/DigitalShielding/nanomq/nng/nanomq/include -Wall -Wextra -fno-omit-frame-pointer -std=gnu99 -MD -MT CMakeFiles/nng.dir/src/core/pipe.c.obj -MF CMakeFiles\nng.dir\src\core\pipe.c.obj.d -o CMakeFiles/nng.dir/src/core/pipe.c.obj -c E:/Projects/DigitalShielding/nanomq/nng/src/core/pipe.c
In file included from E:/Projects/DigitalShielding/nanomq/nng/src/core/platform.h:584:0,
from E:/Projects/DigitalShielding/nanomq/nng/src/core/nng_impl.h:29,
from E:/Projects/DigitalShielding/nanomq/nng/src/core/pipe.c:12:
E:/Projects/DigitalShielding/nanomq/nng/src/platform/windows/win_impl.h:44:3: error: 'SRWLOCK_INIT' undeclared here (not in a function)
SRWLOCK_INIT \
^
E:/Projects/DigitalShielding/nanomq/nng/src/core/pipe.c:23:27: note: in expansion of macro 'NNI_MTX_INITIALIZER'
static nni_mtx pipes_lk = NNI_MTX_INITIALIZER;
^~~~~~~~~~~~~~~~~~~
[12/506] Building C object CMakeFiles/nng.dir/src/core/socket.c.obj
FAILED: CMakeFiles/nng.dir/src/core/socket.c.obj
D:\Tools\MinGW\bin\gcc.exe -DNNG_ENABLE_COMPAT -DNNG_ENABLE_IPV6 -DNNG_ENABLE_STATS -DNNG_HAVE_BUS0 -DNNG_HAVE_CONDVAR=1 -DNNG_HAVE_MQTT_BROKER -DNNG_HAVE_MQTT_CLIENT -DNNG_HAVE_PAIR0 -DNNG_HAVE_PAIR1 -DNNG_HAVE_PUB0 -DNNG_HAVE_PULL0 -DNNG_HAVE_PUSH0 -DNNG_HAVE_REP0 -DNNG_HAVE_REQ0 -DNNG_HAVE_RESPONDENT0 -DNNG_HAVE_SNPRINTF=1 -DNNG_HAVE_STRCASECMP=1 -DNNG_HAVE_STRNCASECMP=1 -DNNG_HAVE_STRNLEN=1 -DNNG_HAVE_SUB0 -DNNG_HAVE_SURVEYOR0 -DNNG_MAX_EXPIRE_THREADS=8 -DNNG_MAX_POLLER_THREADS=8 -DNNG_MAX_TASKQ_THREADS=16 -DNNG_PLATFORM_WINDOWS -DNNG_PRIVATE -DNNG_RESOLV_CONCURRENCY=4 -DNNG_STATIC_LIB -DNNG_SUPP_HTTP -DNNG_TRANSPORT_FDC -DNNG_TRANSPORT_INPROC -DNNG_TRANSPORT_IPC -DNNG_TRANSPORT_MQTT_BROKER_TCP -DNNG_TRANSPORT_MQTT_BROKER_TLS -DNNG_TRANSPORT_MQTT_BROKER_WS -DNNG_TRANSPORT_MQTT_TCP -DNNG_TRANSPORT_MQTT_TLS -DNNG_TRANSPORT_TCP -DNNG_TRANSPORT_TLS -DNNG_TRANSPORT_WS -D_CRT_RAND_S -D_CRT_SECURE_NO_WARNINGS -D_WIN32_WINNT=0x0600 -IE:/Projects/DigitalShielding/nanomq/nng/src -IE:/Projects/DigitalShielding/nanomq/nng/include -IE:/Projects/DigitalShielding/nanomq/nng/nanolib/include -IE:/Projects/DigitalShielding/nanomq/nng/nanomq/include -Wall -Wextra -fno-omit-frame-pointer -std=gnu99 -MD -MT CMakeFiles/nng.dir/src/core/socket.c.obj -MF CMakeFiles\nng.dir\src\core\socket.c.obj.d -o CMakeFiles/nng.dir/src/core/socket.c.obj -c E:/Projects/DigitalShielding/nanomq/nng/src/core/socket.c
In file included from E:/Projects/DigitalShielding/nanomq/nng/src/core/platform.h:584:0,
from E:/Projects/DigitalShielding/nanomq/nng/src/core/nng_impl.h:29,
from E:/Projects/DigitalShielding/nanomq/nng/src/core/socket.c:11:
E:/Projects/DigitalShielding/nanomq/nng/src/platform/windows/win_impl.h:44:3: error: 'SRWLOCK_INIT' undeclared here (not in a function)
SRWLOCK_INIT \
^
E:/Projects/DigitalShielding/nanomq/nng/src/core/socket.c:106:30: note: in expansion of macro 'NNI_MTX_INITIALIZER'
static nni_mtx sock_lk = NNI_MTX_INITIALIZER;
^~~~~~~~~~~~~~~~~~~
[26/506] Building C object CMakeFiles/nng.dir/src/core/tcp.c.obj
ninja: build stopped: subcommand failed.
| 编译NanoNNG 依赖失败 | https://api.github.com/repos/nanomq/nanomq/issues/1710/comments | 0 | 2024-03-20T03:42:26Z | 2024-03-20T09:11:31Z | https://github.com/nanomq/nanomq/issues/1710 | 2,196,607,427 | 1,710 |
[
"emqx",
"nanomq"
] | Hello, I am a graduate student, and my research focus is on static analysis of programs. Recently, when I conducted static analysis on NanoMQ, I detected several code locations that potentially have memory leak issues. Some of these defects are located within the NanoMQ codebase, while others are within the NanoMQ library, nng. Detailed information describing these defects can be found at the following link:
https://github.com/LuMingYinDetect/nanomq_defects/blob/main/nanomq_detect_2.md
https://github.com/LuMingYinDetect/nanomq_defects/blob/main/nanomq_detect_3.md
https://github.com/LuMingYinDetect/nanomq_defects/blob/main/nanomq_detect_4.md
https://github.com/LuMingYinDetect/nanomq_defects/blob/main/nanomq_detect_5.md | Several memory leak defects were detected in NanoMQ. | https://api.github.com/repos/nanomq/nanomq/issues/1709/comments | 2 | 2024-03-14T12:14:04Z | 2024-03-22T09:34:12Z | https://github.com/nanomq/nanomq/issues/1709 | 2,186,193,022 | 1,709 |
[
"emqx",
"nanomq"
] | **Describe the bug**
I am trying to configure the auth.http_auth.acl_req settings in nanomq.conf to delegate ACL checks to an external service, rather than use the static nanomq_acl.conf file. I did this before with the auth.http_auth.auth_req settings, and NanoMQ is calling my service as expected, and using the response status to allow/deny connections. But the acl endpoint never gets called, and all access is allowed.
**Expected behavior**
I expect NanoMQ to call the configured external endpoint, and accept or deny publish or subscribe requests based on the response (response code 20x vs 40X).
**Actual Behavior**
The configured endpoint is never called, all attempts to publish or subscribe to a topic are allowed.
**To Reproduce**
The relevant part of my nanomq.conf file looks like this:
```
auth {
allow_anonymous = false
no_match = deny
deny_action = disconnect
cache = {
max_size = 32
ttl = 1m
}
http_auth = {
auth_req {
url = "http://host.docker.internal:20080/mqtt/auth"
method = "POST"
headers.content-type = "application/x-www-form-urlencoded"
params = {clientid = "%c", username = "%u", password = "%P"}
}
super_req {
url = "http://host.docker.internal:20080/mqtt/superuser"
method = "POST"
headers.content-type = "application/x-www-form-urlencoded"
params = {clientid = "%c", username = "%u", password = "%P"}
}
acl_req {
url = "http://host.docker.internal:20080/mqtt/acl"
method = "POST"
headers.content-type = "application/x-www-form-urlencoded"
params = {clientid = "%c", username = "%u", access = "%A", ipaddr = "%a", topic = "%t", mountpoint = "%m"}
}
timeout = 5s
connect_timeout = 5s
pool_size = 32
}
}
```
**Environment Details**
- NanoMQ version: v0.21.6-6
- Operating system and version: Docker image from emqx/nanomq:latest
- Compiler and language used: N/A
**Client SDK**
- MQTTX client from https://mqttx.app/
- Python paho.mqtt.client
**Additional context**
NanoMQ log is attached, but shows no warnings or errors.
[nanomq.log](https://github.com/nanomq/nanomq/files/14587455/nanomq.log)
| HTTP Authentication: acl_req not working | https://api.github.com/repos/nanomq/nanomq/issues/1708/comments | 6 | 2024-03-13T12:13:46Z | 2024-07-22T06:20:54Z | https://github.com/nanomq/nanomq/issues/1708 | 2,183,854,355 | 1,708 |
[
"emqx",
"nanomq"
] | Run this HTTP https://nanomq.io/docs/en/latest/api/v4.html#update-configuration-file request and you will see the NanoMQ server crash
INFO /home/runner/work/nanomq/nanomq/nanomq/rest_api.c:2591 update_config: Writting new config to (null)
ERROR /home/runner/work/nanomq/nanomq/nanomq/apps/broker.c:104 sig_handler: signal signumber: 11 received!
| update config_update using Http server api/v4 crash server | https://api.github.com/repos/nanomq/nanomq/issues/1707/comments | 2 | 2024-03-13T10:14:22Z | 2024-03-27T10:40:00Z | https://github.com/nanomq/nanomq/issues/1707 | 2,183,611,093 | 1,707 |
[
"emqx",
"nanomq"
] | **Describe the bug**
A clear and concise description of what the bug is.
This reload function has the following problems:
When the client calls reload successfully, the server side reports an error and the configuration of Load does not take effect
```
nanomq reload --conf etc/nanomq.conf
reload succeed
```
When the incoming configuration to be reloaded is as follows, it will directly cause the SERVER print **error: syntax error**
```
auth {
allow_anonymous = true # add it first, no error
acl = {include "/etc/nanomq_acl.conf"} # add it next, error report
}
```
Then, the content of /etc/nanomq_acl.conf is default as follows:
```
rules = [
{"permit": "allow", "username": "#", "action": "subscribe", "topics": ["a/a"]}
# {"permit": "deny", "username": "#", "action": "publish", "topics": ["a/a"]}
# # 允许任何其他发布/订阅操作
{"permit": "allow"}
]
```
Does nanomq_acl.conf is not supported by the reload function?
**Expected behavior**
A clear and concise description of what you expected to happen.
**Actual Behavior**
Describe what occurred.
**To Reproduce**
If possible include actual reproduction test code here.
Minimal C test cases are perferred.
**Environment Details**
- NanoMQ v0.21.6-6
- Operating system and version
- Compiler and language used
- testing scenario
**Client SDK**
If possible include the mqtt sdk you used to connect to nanomq
Minimal C test cases are perferred.
**Additional context**
Add any other context about the problem here.
| syntax error in nanomq reload | https://api.github.com/repos/nanomq/nanomq/issues/1706/comments | 1 | 2024-03-13T02:35:09Z | 2024-04-02T04:46:42Z | https://github.com/nanomq/nanomq/issues/1706 | 2,182,999,740 | 1,706 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Process nanomq not starting in **daemon** mode. Null in logs. Bridge not works and make crash.
nanomq start --conf /etc/nanomq.conf -d
**Expected behavior**
Process nanomq starting
**Actual Behavior**
Proces not starting
**To Reproduce**
Reproduction config:
mqtt {
property_size = 32
max_packet_size = 10KB
max_mqueue_len = 2048
retry_interval = 10s
keepalive_multiplier = 1.25
max_inflight_window = 2048
max_awaiting_rel = 10s
await_rel_timeout = 10s
}
listeners.tcp {
bind = "0.0.0.0:1883"
}
listeners.ws {
bind = "0.0.0.0:8083/mqtt"
}
http_server {
port = 8081
limit_conn = 2
username = aqq
password = aqq
auth_type = basic
jwt {
public.keyfile = "/etc/certs/jwt/jwtRS256.key.pub"
}
}
auth {
allow_anonymous = false
no_match = allow
deny_action = ignore
cache = {
max_size = 32
ttl = 1m
}
password = {include "/etc/nanomq_pwd.conf"}
}
log {
to = [file, console]
level = error
dir = "/home/pi/logs"
file = "nanomq.log"
rotation {
size = 10MB
count = 3
}
}
bridges.mqtt.emqx1 {
server = "mqtt-tcp://146.XX.XX.XX:1883"
proto_ver = 4
keepalive = 60s
clean_start = false
username = null
password = aqq
forwards = aqq
{
remote_topic = ""
local_topic = "#"
qos = 0
}
]
max_parallel_processes = 4
max_send_queue_len = 128
max_recv_queue_len = 32
}
**Environment Details**
- NanoMQ version 0.21.6 arm64
- Rpi5 Rasbian bookworm
**Additional context**
When remove section bridges.mqtt.emqx1 process in daemon mode starting fine.
| Bridge not works and make crash nanomq on start (wrong config syntax) | https://api.github.com/repos/nanomq/nanomq/issues/1705/comments | 3 | 2024-03-10T21:37:26Z | 2024-03-12T10:36:06Z | https://github.com/nanomq/nanomq/issues/1705 | 2,177,916,000 | 1,705 |
[
"emqx",
"nanomq"
] | **Describe the bug**
After a couple of hours/days with the broker running, the broker restart due to errors, check the log file.
First it starts generating error `open /proc/stat failed', I am using the API to get statistics data from the broker.
After a little bit of time, it starts generating error `send aio error Out of files` until that after a couple of minutes (typically 5 minutes) the broker restarts.
**Expected behavior**
**Actual Behavior**
This seems to happen every 2~3 days of operation.
Log File, when the errors start happening
```
2024-03-07 18:43:27 [1831111] INFO /home/runner/work/nanomq/nanomq/nanomq/pub_handler.c:1172: acl allow
2024-03-07 18:43:27 [1831130] INFO /home/runner/work/nanomq/nanomq/nanomq/pub_handler.c:1172: acl allow
2024-03-07 18:43:28 [1831118] INFO /home/runner/work/nanomq/nanomq/nanomq/pub_handler.c:1172: acl allow
2024-03-07 18:43:28 [1831122] ERROR /home/runner/work/nanomq/nanomq/nanomq/rest_api.c:1387: open /proc/stat failed!
2024-03-07 18:43:28 [1831125] INFO /home/runner/work/nanomq/nanomq/nanomq/pub_handler.c:1172: acl allow
2024-03-07 18:43:28 [1831127] INFO /home/runner/work/nanomq/nanomq/nanomq/unsub_handler.c:189: UnSub topic [maquina/WHDNG23099-VNT/ACM] in client [NodeRed1]. pid [63266]
2024-03-07 18:43:28 [1831120] INFO /home/runner/work/nanomq/nanomq/nanomq/unsub_handler.c:189: UnSub topic [maquina/WHDNG23099-VNT/ACM/cmd] in client [NodeRed1]. pid [63267]
2024-03-07 18:43:28 [1831122] INFO /home/runner/work/nanomq/nanomq/nanomq/unsub_handler.c:189: UnSub topic [maquina/WHDNG23099-VNT/Software/Events] in client [NodeRed1]. pid [63268]
2024-03-07 18:43:28 [1831109] INFO /home/runner/work/nanomq/nanomq/nanomq/unsub_handler.c:189: UnSub topic [maquina/WHDNG23099-VNT/VNT] in client [NodeRed1]. pid [63269]
2024-03-07 18:43:28 [1831129] INFO /home/runner/work/nanomq/nanomq/nanomq/unsub_handler.c:189: UnSub topic [$SYS/#] in client [NodeRed1]. pid [63270]
2024-03-07 18:43:28 [1831122] INFO /home/runner/work/nanomq/nanomq/nanomq/unsub_handler.c:189: UnSub topic [maquina/WHDNG23099-VNT/VNT/cmd] in client [NodeRed1]. pid [63271]
2024-03-07 18:43:28 [1831114] INFO /home/runner/work/nanomq/nanomq/nanomq/pub_handler.c:1172: acl allow
2024-03-07 18:43:28 [1831116] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:1769: send aio error Out of files
2024-03-07 18:43:28 [1831121] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:1769: send aio error Out of files
2024-03-07 18:43:28 [1831114] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:1769: send aio error Out of files
2024-03-07 18:43:28 [1831115] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:1769: send aio error Out of files
2024-03-07 18:43:28 [1831130] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:1769: send aio error Out of files
2024-03-07 18:43:28 [1831130] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:1769: send aio error Out of files
2024-03-07 18:43:28 [1831116] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:1769: send aio error Out of files
2024-03-07 18:43:28 [1831123] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:1769: send aio error Out of files
2024-03-07 18:43:28 [1831113] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:1769: send aio error Out of files
2024-03-07 18:43:28 [1831128] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:1769: send aio error Out of files
2024-03-07 18:43:28 [1831125] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:1769: send aio error Out of files
2024-03-07 18:43:28 [1831117] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:1769: send aio error Out of files
2024-03-07 18:43:28 [1831125] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:1769: send aio error Out of files
2024-03-07 18:43:28 [1831116] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:1769: send aio error Out of files
```
**To Reproduce**
**Environment Details**
- NanoMQ version v0.21.6-6
- Operating system and version Ubuntu Server 22.04
- Compiler and language used, installed from file
**Client SDK**
**Additional context**
| Broker Restart - aio error | https://api.github.com/repos/nanomq/nanomq/issues/1703/comments | 17 | 2024-03-07T18:56:19Z | 2024-07-22T06:18:38Z | https://github.com/nanomq/nanomq/issues/1703 | 2,174,555,297 | 1,703 |
[
"emqx",
"nanomq"
] | GET /api/v4/clients Can we return the connection's will topic and payload,Without this, for some terminal devices connected to nanomq, it is not known whether there is a carrying will. | GET /api/v4/clients Can we return the connection's will topic and payload information | https://api.github.com/repos/nanomq/nanomq/issues/1702/comments | 1 | 2024-03-06T11:27:46Z | 2024-07-23T10:22:21Z | https://github.com/nanomq/nanomq/issues/1702 | 2,171,283,829 | 1,702 |
[
"emqx",
"nanomq"
] | **Describe the bug**
When I try to do subscribe with nng_mqtt_subscribe on a quic client. It stucks.
**Expected behavior**
No stuck.
**To Reproduce**
```
void
test_msquic_app_sub(void)
{
// Connect...
nng_socket sock;
nng_dialer dialer;
nng_msg *connmsg = create_connect_msg(MQTT_PROTOCOL_VERSION_v311,
true, (char *)quic_test_clientid);
NUTS_ASSERT(connmsg != NULL);
NUTS_PASS(nng_mqtt_quic_client_open(&sock));
NUTS_PASS(nng_dialer_create(&dialer, sock, quic_test_url));
NUTS_PASS(nng_dialer_set_ptr(dialer, NNG_OPT_MQTT_CONNMSG, connmsg));
NUTS_PASS(nng_socket_set_ptr(sock, NNG_OPT_MQTT_CONNMSG, connmsg));
//NUTS_PASS(nng_mqtt_set_connect_cb(sock, test_msquic_connect_cb, NULL));
NUTS_PASS(nng_mqtt_set_disconnect_cb(sock, test_msquic_disconnect_cb, connmsg));
NUTS_PASS(nng_dialer_start(dialer, NNG_FLAG_ALLOC));
// Same process to nng_mqtt_subscribe() !!!!!!!!!!!!
// Subscribe
nng_msg *submsg = create_subscribe_msg(quic_test_topic, quic_test_qos,
quic_test_nolocal, quic_test_rap, quic_test_rh, NULL);
NUTS_ASSERT(submsg != NULL);
NUTS_PASS(nng_mqtt_msg_encode(submsg));
printf("Wait here0\n");
NUTS_PASS(nng_sendmsg(sock, submsg, NNG_FLAG_ALLOC));
```
**Environment Details**
- NanoMQ version. Latest
- Operating system and version. fedora
- Compiler and language used gcc | QUIC Stuck on nng_mqtt_subscribe. | https://api.github.com/repos/nanomq/nanomq/issues/1700/comments | 1 | 2024-03-06T07:14:37Z | 2024-03-07T06:05:00Z | https://github.com/nanomq/nanomq/issues/1700 | 2,170,808,143 | 1,700 |
[
"emqx",
"nanomq"
] | 应用通过配置文件配置了mqtt auth的用户名和密码。
升级到最新的0.21.x以后,每次启动都会报错 HTTP Server Responded: 401 Unauthorized
查代码看时webhook内部起的mqtt client连接时用户名和密码为空,连上后因为未授权而被踢掉,然后不断重连。
请问要使用这个webhook,应该如何通过配置文件来配置?
报错日志:
2024-02-27 15:35:22 [5255] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:1619: tcptran_pipe_start!
2024-02-27 15:35:22 [5257] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:305: start tcptran_pipe_nego_cb max len 12 pipe_addr 0xae915798 gotrx 0 wantrx 12
2024-02-27 15:35:22 [5257] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:305: start tcptran_pipe_nego_cb max len 12 pipe_addr 0xae915798 gotrx 5 wantrx 26
2024-02-27 15:35:22 [5257] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:553: remaining length: 24
2024-02-27 15:35:22 [5257] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:564: pro_name: MQTT
2024-02-27 15:35:22 [5257] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:567: pro_ver: 4
2024-02-27 15:35:22 [5257] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:575: conn flag:0
2024-02-27 15:35:22 [5257] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:609: pos after property: [12]
2024-02-27 15:35:22 [5257] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:631: clientid: [hook-trigger] [12]
2024-02-27 15:35:22 [5257] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:632: pos after clientid: [26]
2024-02-27 15:35:22 [5257] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:715: pos: [26] len: [24]
2024-02-27 15:35:22 [5257] DEBUG /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:174: change p_id by hashing 2043922967 rv 0
2024-02-27 15:35:22 [5257] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:184: ************ tcptran_pipe_init [0xae915798] ************
2024-02-27 15:35:22 [5257] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:602: ##########nano_pipe_init###############
2024-02-27 15:35:22 [5257] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:638: ########## nano_pipe_start ##########
2024-02-27 15:35:22 [5257] DEBUG /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:670: client connected! addr [127.0.0.1 port [21646]
2024-02-27 15:35:22 [5257] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:1243: no valid entry in auth list
2024-02-27 15:35:22 [5257] ERROR /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/auth_http.c:314: HTTP Server Responded: 401 Unauthorized
2024-02-27 15:35:22 [5257] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:749: Invalid auth info.
2024-02-27 15:35:22 [5257] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:819: ############## nano_pipe_close ##############
配置文件:
[nanomq-0.21.0.conf.zip](https://github.com/nanomq/nanomq/files/14489217/nanomq-0.21.0.conf.zip)
| webhook auth 401 Unauthorized | https://api.github.com/repos/nanomq/nanomq/issues/1697/comments | 3 | 2024-03-05T01:42:27Z | 2024-03-26T02:43:32Z | https://github.com/nanomq/nanomq/issues/1697 | 2,168,104,786 | 1,697 |
[
"emqx",
"nanomq"
] | **Is your feature request related to a problem? Please describe.**
Config listeners.ssl on Linux (using Docker compose):
`listeners.ssl {
bind = "0.0.0.0:8883"
keyfile = "/etc/certs/key.pem"
certfile = "/etc/certs/cert.pem"
cacertfile = "/etc/certs/cacert.pem"
verify_peer = true
fail_if_no_peer_cert = true
}`
Run `docker start`, it reports error:
`FATAL /nanomq/nanomq/apps/broker.c:1122: nng_listener_create tls`
**Describe the solution you'd like**
Found from another issue: https://github.com/nanomq/nanomq/issues/1577.
This error may cause by cert level, but we can't change cert. Can nanomq switch cert verify level?
| Can we switch listeners.ssl cert generate level? | https://api.github.com/repos/nanomq/nanomq/issues/1693/comments | 2 | 2024-03-01T03:00:22Z | 2024-07-22T06:17:32Z | https://github.com/nanomq/nanomq/issues/1693 | 2,162,492,927 | 1,693 |
[
"emqx",
"nanomq"
] | I noticed CVE-2024-25767 has been published but I see no mention of it here - it's possible you haven't been properly informed by the reporter. Either way, I thought it best to have a place to discuss/track the issue (if it even is an issue). | Response to CVE-2024-25767? | https://api.github.com/repos/nanomq/nanomq/issues/1692/comments | 1 | 2024-03-01T00:16:15Z | 2024-03-22T12:11:01Z | https://github.com/nanomq/nanomq/issues/1692 | 2,162,308,146 | 1,692 |
[
"emqx",
"nanomq"
] | * nanomq version: 0.21.5
* start with the config failed, report: `Segmentation fault`
* config content:
```
# NanoMQ Configuration 0.19.1
# #============================================================
# # NanoMQ Broker
# #============================================================
system {
# # num_taskq_thread
# # Use a specified number of taskq threads
# #
# # Value: 1-255, Obtain automatically if 0
num_taskq_thread = 0
# # max_taskq_thread
# # Use a specified maximunm number of taskq threads
# #
# # Value: 1-255, Obtain automatically if 0
max_taskq_thread = 0
# # parallel
# # Handle a specified maximum number of outstanding requests
# #
# # Value: 1-255, Obtain automatically if 0
parallel = 0
}
mqtt {
# # max_packet_size
# # Defines the default max size of a packet that NanoMQ could accept and send
# #
# # Hot updatable
# # Value: 1 Byte-260 MB
max_packet_size = 10MB
# # max_mqueue_len
# # The queue length in-flight window
# # This is essential for performance and memory consumption
# #
# # Hot updatable
# # Value: 1-infinity
max_mqueue_len = 2048
# # Unsupported now
max_inflight_window = 2048
max_awaiting_rel = 10s
await_rel_timeout = 10s
# # retry_interval (s)
# # The retry interval is nano qos duration which also controls timer
# # interval of each pipe
# #
# # Hot updatable
# # Value: 1-infinity
retry_interval = 10s
# # The backoff for MQTT keepalive timeout.
# # broker will discolse client when there is no activity for
# # 'Keepalive * backoff * timeout.
# #
# # Hot updatable
# # Value: Float > 0.5
keepalive_multiplier = 1.25
# # property_size
# # The max size for a MQTT user property
# #
# # Hot updatable
# # Value: 1-infinity
property_size = 320000
}
listeners.tcp {
# # bind
# # Connect with the host and port
# #
# # Value: host:port
bind = "0.0.0.0:1883"
}
# #============================================================
# # TLS/SSL
# #============================================================
listeners.ssl {
# # tls url
# #
# # Value: "host:port"
bind = "0.0.0.0:8883"
# # tls key password
# # String containing the user's password. Only used if the private keyfile
# # is password-protected.
# #
# # Value: String
# key_password="yourpass"
# # tls keyfile
# # Path to the file containing the user's private PEM-encoded key.
# #
# # Value: File
keyfile = "/etc/nanomq/certs/server.key"
# # tls cert file
# # Path to a file containing the user certificate.
# #
# # Value: File
certfile = "/etc/nanomq/certs/server.crt"
# # tls ca cert file
# # Path to the file containing PEM-encoded CA certificates. The CA certificates
# # are used during server authentication and when building the client certificate chain.
# #
# # Value: File
cacertfile = "/etc/nanomq/certs/ca.crt"
# # A server only does x509-path validation in mode verify_peer,
# # as it then sends a certificate request to the client (this
# # message is not sent if the verify option is verify_none).
# # You can then also want to specify option fail_if_no_peer_cert.
# #
# # Value: true: verify_peer | false: verify_none
verify_peer = false
# # Used together with {verify, verify_peer} by an SSL server. If set to true,
# # the server fails if the client does not have a certificate to send, that is,
# # sends an empty certificate.
# #
# # Value: true | false
fail_if_no_peer_cert = false
}
# #============================================================
# # WebSocket
# #============================================================
listeners.ws {
# # websocket url
# #
# # Value: "host:port/path"
bind = "0.0.0.0:8083/mqtt"
}
# #============================================================
# # Http server
# #============================================================
http_server {
# # http server port
# #
# # Value: 0 - 65535
port = 8081
# # limit connector
# # Handle a specified maximum number of outstanding requests
# #
# # Value: 1-infinity
limit_conn = 32
# # http server username
# #
# # Value: String
username = admin
# # http server password
# #
# # Value: String
password = public
# # http server auth type
# # If set auth_type=jwt, make sure you have built JWT dependency with `-DENABLE_JWT=ON` first.
# #
# # Value: String basic | jwt
auth_type = basic
jwt {
# # http server jwt public key file
# # Used together with 'http_server.auth_type=jwt',
# # Path to the file containing the user's private key.
# #
# # Value: File
public.keyfile = "/etc/certs/jwt/jwtRS256.key.pub"
}
}
# # ------------------ Logging Config ------------------ ##
log {
# # Where to emit the logs.
# #
# # - file: write logs to file
# # - console: write logs to standard I/O
# # - syslog: write logs to syslog
# # Value: file | console | syslog
# # Example: file,console,syslog
to = [file, console]
# # The log severity level.
# #
# # Value: trace | debug | info | warn | error | fatal
# #
# # Note: Only the messages with severity level higher than or equal to
# # this level will be logged.
# #
# # Default: warn
level = debug
# # The dir for log files.
# #
# # Value: Folder
dir = "/tmp"
# # The log filename for logs of level specified in "log.level".
# #
# # Value: String
# # Default: nanomq.log
file = "nanomq.log"
rotation {
# # Maximum size of each log file.
# #
# # Value: Number
# # Default: 10M
# # Supported Unit: KB | MB | GB
size = 10MB
# # Maximum rotation count of log files.
# #
# # Value: Number
# # Default: 5
count = 5
}
}
# #============================================================
# # WebHook
# #============================================================
webhook {
url = "http://127.0.0.1:8888/mqtt/webhook"
headers.content-type = "application/json"
body.encoding = "plain"
pool_size = 32
events = [
# {
# # # Webhook event.
# # #
# # # Value: String
# # # Supported event list:
# # # event: on_client_connect
# # # event: on_client_connack
# # # event: on_client_connected
# # # event: on_client_disconnected
# # # event: on_client_subscribe
# # # event: on_client_unsubscribe
# # # event: on_session_subscribed
# # # event: on_session_unsubscribed
# # # event: on_session_terminated
# # # event: on_message_publish
# # # event: on_message_delivered
# # # event: on_message_acked
# event = "on_message_publish"
# # # Webhook topic.
# # #
# # # Value: String
# # # Support on message publish
# topic = "#"
# }
{
event = "on_message_publish"
topic = "$SYS/brokers/+"
}
{
event = "on_client_disconnected"
}
]
}
auth {
# # anonymous
# # allow anonymous login
# #
# # Hot updatable
# # Value: true | false
allow_anonymous = true
# # Allow or deny if no ACL rules matched.
# #
# # Value: allow | deny
no_match = allow
# # The action when acl check reject current operation
# #
# # Value: ignore | disconnect
# # Default: ignore
deny_action = ignore
cache = {
# # The maximum count of ACL entries can be cached for a client.
# #
# # Value: Integer greater than 0
# # Default: 32
max_size = 32
# # The time after which an ACL cache entry will be deleted
# #
# # Value: Duration
# # Default: 1 minute
ttl = 1m
}
# # This is password conf file.
# #
# # Value: path string
# # Default: "/etc/pwd.conf"
# password = {include "/etc/nanomq_pwd.conf"}
# # This is acl conf file.
# #
# # Value: path string
# # Default: "/etc/acl.conf"
# acl = {include "/etc/nanomq_acl.conf"}
http_auth = {
auth_req {
url = "http://127.0.0.1:8888/mqtt/auth"
method = POST
headers.content-type = "application/json"
params = {clientid = "%c", username = "%u", password = "%P"}
}
# # Time-out time for the request.
timeout = 10s
# # Connection time-out time, used during the initial request,
connect_timeout = 10s
# # Connection process pool size
pool_size = 32
}
}
```
- Why is the configuration file syntax changed but the document is not updated?
- May I ask what is wrong with this configuration file? It is correct in v0.20.x
| config Segmentation fault | https://api.github.com/repos/nanomq/nanomq/issues/1686/comments | 3 | 2024-02-22T06:55:02Z | 2024-03-26T02:43:55Z | https://github.com/nanomq/nanomq/issues/1686 | 2,148,351,463 | 1,686 |
[
"emqx",
"nanomq"
] | Is it possible to make the remote_topic of the bridge support wildcard?
Such as
```
{
remote_topic = "topic1/#"
local_topic = "topic1/#"
}
```
User can bridge the topic1/1 、topic1/2、 ...... topic/N to remote in one config.
This feature can reduce the amount of configuration work.
| Support wildcard in remote topic | https://api.github.com/repos/nanomq/nanomq/issues/1684/comments | 3 | 2024-02-22T05:40:55Z | 2024-04-13T16:50:39Z | https://github.com/nanomq/nanomq/issues/1684 | 2,148,244,698 | 1,684 |
[
"emqx",
"nanomq"
] | ### Discussed in https://github.com/nanomq/nanomq/discussions/1680
<div type='discussions-op-text'>
<sup>Originally posted by **furieuxjk** February 20, 2024</sup>
Hello!
Is it possible to enable MQTT broker statistics in SYS? For example to see:
the version of NanoMQ broker;
live connections;
subscriptions;
topics;
messages sent/received;
etc.</div> | Broker statistics | https://api.github.com/repos/nanomq/nanomq/issues/1682/comments | 0 | 2024-02-21T02:53:52Z | 2024-02-21T02:53:53Z | https://github.com/nanomq/nanomq/issues/1682 | 2,145,687,256 | 1,682 |
[
"emqx",
"nanomq"
] | **Is your feature request related to a problem? Please describe.**
Describe how to configure TLS certs for quic bridge.
https://github.com/nanomq/nanomq/blob/master/docs/en_US/bridges/quic-bridge.md
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Customer is asking that.
| doc: how to config QUIC bridge with TLS certs | https://api.github.com/repos/nanomq/nanomq/issues/1673/comments | 0 | 2024-02-12T08:18:12Z | 2024-03-01T08:44:31Z | https://github.com/nanomq/nanomq/issues/1673 | 2,129,619,895 | 1,673 |
[
"emqx",
"nanomq"
] | **Describe the bug**
After setting ssl/tls in bridge configuration.
Logs show that the key and cert not found.
```
2024-02-10 01:32:07 [1001288] WARN /home/wangha/Documents/nanomq/nng/src/supplemental/quic/msquic_dial.c:1123 msquic_load_config: No quic TLS/SSL credentials (cacert and key) was specified.
```
**Expected behavior**
TLS configuration for mqtt-quic bridge works.
| TLS configuration for mqtt-quic bridge not works. | https://api.github.com/repos/nanomq/nanomq/issues/1670/comments | 1 | 2024-02-10T06:34:03Z | 2024-02-18T06:30:04Z | https://github.com/nanomq/nanomq/issues/1670 | 2,128,138,708 | 1,670 |
[
"emqx",
"nanomq"
] | **Describe the bug**
I have a local simulation of an IoT deployment consisting of a bunch of containers.
4 brokers, 3 of which are running bridges to the fourth.
4 collectd instances pushing to their local brokers (each broker than pushes to the "remote" broker)
4 mqtt-stresser instances pushing loads of messages to their local brokers
I then tried to add a nanomq broker to the lot, with its set of collectd and mqtt-stresser.
Locally that works: collectd and mqtt-stresser are able to push their messages to their assigned nanomq broker.
But that broker is not able to push to the bridged one.
Here is a log
```
2024-02-08 15:10:06 [1] INFO /home/runner/work/nanomq/nanomq/nng/src/supplemental/nanolib/conf.c:3284 print_bridge_conf: bridge.mqtt.emqx1.subscription:
2024-02-08 15:10:06 [1] INFO /home/runner/work/nanomq/nanomq/nanomq/apps/broker.c:1417 store_pid: 1
NanoMQ Broker is started successfully!
2024-02-08 15:10:06 [16] INFO /home/runner/work/nanomq/nanomq/nanomq/bridge.c:918 bridge_tcp_connect_cb: Bridge [mqtt-tcp://10.5.1.1:1883] connected! RC [0]
2024-02-08 15:10:06 [16] INFO /home/runner/work/nanomq/nanomq/nanomq/bridge.c:950 bridge_tcp_connect_cb: No subscriptions were set.
2024-02-08 15:10:06 [16] INFO /home/runner/work/nanomq/nanomq/nanomq/apps/broker.c:324 server_cb: bridge client is connected!
2024-02-08 15:10:18 [18] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:311 tcptran_pipe_nego_cb: nego aio error: Connection shutdown
2024-02-08 15:10:18 [18] ERROR /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:458 tcptran_pipe_nego_cb: connect nego error rv: Connection shutdown(31)
2024-02-08 15:10:32 [22] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:311 tcptran_pipe_nego_cb: nego aio error: Connection shutdown
2024-02-08 15:10:32 [22] ERROR /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:458 tcptran_pipe_nego_cb: connect nego error rv: Connection shutdown(31)
2024-02-08 15:10:46 [21] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:311 tcptran_pipe_nego_cb: nego aio error: Connection shutdown
2024-02-08 15:10:46 [21] ERROR /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:458 tcptran_pipe_nego_cb: connect nego error rv: Connection shutdown(31)
2024-02-08 15:11:00 [22] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:311 tcptran_pipe_nego_cb: nego aio error: Connection shutdown
2024-02-08 15:11:00 [22] ERROR /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:458 tcptran_pipe_nego_cb: connect nego error rv: Connection shutdown(31)
2024-02-08 15:11:06 [10] INFO /home/runner/work/nanomq/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:180 mqtt_pipe_timer_cb: send pingreq!
2024-02-08 15:11:14 [14] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:311 tcptran_pipe_nego_cb: nego aio error: Connection shutdown
2024-02-08 15:11:14 [14] ERROR /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:458 tcptran_pipe_nego_cb: connect nego error rv: Connection shutdown(31)
2024-02-08 15:11:28 [12] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:311 tcptran_pipe_nego_cb: nego aio error: Connection shutdown
2024-02-08 15:11:28 [12] ERROR /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:458 tcptran_pipe_nego_cb: connect nego error rv: Connection shutdown(31)
2024-02-08 15:11:42 [18] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:311 tcptran_pipe_nego_cb: nego aio error: Connection shutdown
2024-02-08 15:11:42 [18] ERROR /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:458 tcptran_pipe_nego_cb: connect nego error rv: Connection shutdown(31)
2024-02-08 15:12:06 [21] INFO /home/runner/work/nanomq/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:180 mqtt_pipe_timer_cb: send pingreq!
2024-02-08 15:13:06 [16] INFO /home/runner/work/nanomq/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:180 mqtt_pipe_timer_cb: send pingreq!
2024-02-08 15:13:41 [21] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:238 nano_pipe_timer_cb: Warning: close pipe & kick client due to KeepAlive timeout!
2024-02-08 15:13:41 [15] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:641 tcptran_pipe_recv_cb: nni aio recv error!! Object closed
2024-02-08 15:13:41 [15] WARN /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:910 tcptran_pipe_recv_cb: tcptran_pipe_recv_cb: parse error rv: 139
2024-02-08 15:14:06 [12] INFO /home/runner/work/nanomq/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:180 mqtt_pipe_timer_cb: send pingreq!
2024-02-08 15:15:06 [11] INFO /home/runner/work/nanomq/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:180 mqtt_pipe_timer_cb: send pingreq!
2024-02-08 15:16:06 [13] INFO /home/runner/work/nanomq/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:180 mqtt_pipe_timer_cb: send pingreq!
2024-02-08 15:17:06 [15] INFO /home/runner/work/nanomq/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:180 mqtt_pipe_timer_cb: send pingreq!
2024-02-08 15:18:06 [10] INFO /home/runner/work/nanomq/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:180 mqtt_pipe_timer_cb: send pingreq!
2024-02-08 15:19:06 [10] INFO /home/runner/work/nanomq/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:180 mqtt_pipe_timer_cb: send pingreq!
2024-02-08 15:20:06 [22] INFO /home/runner/work/nanomq/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:180 mqtt_pipe_timer_cb: send pingreq!
2024-02-08 15:21:06 [11] INFO /home/runner/work/nanomq/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:180 mqtt_pipe_timer_cb: send pingreq!
2024-02-08 15:22:06 [12] INFO /home/runner/work/nanomq/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:180 mqtt_pipe_timer_cb: send pingreq!
2024-02-08 15:23:06 [16] INFO /home/runner/work/nanomq/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:180 mqtt_pipe_timer_cb: send pingreq!
2024-02-08 15:24:06 [13] INFO /home/runner/work/nanomq/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:180 mqtt_pipe_timer_cb: send pingreq!
2024-02-08 15:25:06 [19] INFO /home/runner/work/nanomq/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:180 mqtt_pipe_timer_cb: send pingreq!
2024-02-08 15:26:06 [12] INFO /home/runner/work/nanomq/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:180 mqtt_pipe_timer_cb: send pingreq!
2024-02-08 15:27:06 [24] INFO /home/runner/work/nanomq/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:180 mqtt_pipe_timer_cb: send pingreq!
```
The bridge configuration is the following
```
bridges.mqtt.emqx1 {
server = "mqtt-tcp://10.5.1.1:1883"
proto_ver = 5
keepalive = 60s
clean_start = false
forwards = [
{
remote_topic = ID4/stress-test/"
local_topic = "yadablada/"
qos = 0
},
{
remote_topic = "ID4/root/"
local_topic = "collectd/"
qos = 0
}
]
max_parallel_processes = 4
max_send_queue_len = 128
max_recv_queue_len = 32
}
```
**Expected behavior**
I would expect the bridge to come up with no errors
**Actual Behavior**
Nanomq is not able to connect the bridge and complains about connection
**To Reproduce**
Here is my docker compose yaml
```
version: "3.8"
networks:
mqtt-net:
external: true
# driver: local
# ipam:
# config:
# - subnet: 10.5.0.0/16
# gateway: 10.5.0.99
services:
ID1-broker:
image: eclipse-mosquitto
hostname: ID1-broker
container_name: ID1-broker
restart: unless-stopped
ports:
- "18831:1883"
- "19001:9001"
volumes:
- ./ID1/mosquitto-conf:/mosquitto/config
- ./ID1/data:/mosquitto/data
- ./logs:/mosquitto/log
networks:
mqtt-net:
ipv4_address: 10.5.0.1
ID2-broker:
image: eclipse-mosquitto
hostname: ID2-broker
container_name: ID2-broker
restart: unless-stopped
ports:
- "18832:1883"
- "19002:9001"
volumes:
- ./ID2/mosquitto-conf:/mosquitto/config
- ./ID2/data:/mosquitto/data
- ./logs:/mosquitto/log
networks:
mqtt-net:
ipv4_address: 10.5.0.2
ID3-broker:
image: eclipse-mosquitto
hostname: ID3-broker
container_name: ID3-broker
restart: unless-stopped
ports:
- "18833:1883"
- "19003:9001"
volumes:
- ./ID3/mosquitto-conf:/mosquitto/config
- ./ID3/data:/mosquitto/data
- ./logs:/mosquitto/log
networks:
mqtt-net:
ipv4_address: 10.5.0.3
ID4-broker:
image: emqx/nanomq:0.21-full
hostname: ID4-broker
container_name: ID4-broker
restart: unless-stopped
ports:
- "18834:1883"
- "19004:9001"
volumes:
- ./ID4/nanomq-conf/nanomq.conf:/etc/nanomq.conf
- ./logs/ID4-nanomq.log:/tmp/nanomq.log
networks:
mqtt-net:
ipv4_address: 10.5.0.4
ID1-collectd:
image: collectd:custom-mqtt
hostname: ID1-collectd
container_name: ID1-collectd
restart: unless-stopped
depends_on:
- ID1-broker
volumes:
- ./ID1/collectd-conf:/etc/collectd
- ./logs:/var/log
networks:
mqtt-net:
ipv4_address: 10.5.2.1
ID2-collectd:
image: collectd:custom-mqtt
hostname: ID2-collectd
container_name: ID2-collectd
restart: unless-stopped
depends_on:
- ID2-broker
volumes:
- ./ID2/collectd-conf:/etc/collectd
- ./logs:/var/log
networks:
mqtt-net:
ipv4_address: 10.5.2.2
ID3-collectd:
image: collectd:custom-mqtt
hostname: ID3-collectd
container_name: ID3-collectd
restart: unless-stopped
depends_on:
- ID3-broker
volumes:
- ./ID3/collectd-conf:/etc/collectd
- ./logs:/var/log
networks:
mqtt-net:
ipv4_address: 10.5.2.3
ID4-collectd:
image: collectd:custom-mqtt
hostname: ID4-collectd
container_name: ID4-collectd
restart: unless-stopped
depends_on:
- ID4-broker
volumes:
- ./ID4/collectd-conf:/etc/collectd
- ./logs:/var/log
networks:
mqtt-net:
ipv4_address: 10.5.2.4
ID1-stresser:
image: inovex/mqtt-stresser
hostname: ID1-stresser
container_name: ID1-stresser
command: "-broker tcp://10.5.0.1:1883 -num-clients 11 -num-messages 110 -rampup-delay 3s -rampup-size 20 -global-timeout 180s -timeout 20s -log-level 2 -topic-base-path yadablada"
depends_on:
- ID1-broker
logging:
driver: none
networks:
- mqtt-net
deploy:
restart_policy:
condition: any
delay: 5s
ID2-stresser:
image: inovex/mqtt-stresser
hostname: ID2-stresser
container_name: ID2-stresser
command: "-broker tcp://10.5.0.2:1883 -num-clients 12 -num-messages 120 -rampup-delay 3s -rampup-size 20 -global-timeout 180s -timeout 20s -log-level 2 -topic-base-path yadablada"
depends_on:
- ID2-broker
logging:
driver: none
networks:
- mqtt-net
deploy:
restart_policy:
condition: any
delay: 6s
ID3-stresser:
image: inovex/mqtt-stresser
hostname: ID3-stresser
container_name: ID3-stresser
command: "-broker tcp://10.5.0.3:1883 -num-clients 13 -num-messages 130 -rampup-delay 3s -rampup-size 20 -global-timeout 180s -timeout 20s -log-level 2 -topic-base-path yadablada"
depends_on:
- ID3-broker
logging:
driver: none
networks:
- mqtt-net
deploy:
restart_policy:
condition: any
delay: 7s
ID4-stresser:
image: inovex/mqtt-stresser
hostname: ID4-stresser
container_name: ID4-stresser
command: "-broker tcp://10.5.0.4:1883 -num-clients 15 -num-messages 130 -rampup-delay 3s -rampup-size 20 -global-timeout 180s -timeout 20s -log-level 2 -topic-base-path yadablada"
depends_on:
- ID4-broker
logging:
driver: none
networks:
- mqtt-net
deploy:
restart_policy:
condition: any
delay: 4s
cloud-bridge:
image: eclipse-mosquitto
hostname: cloud-bridge
container_name: cloud-bridge
restart: unless-stopped
ports:
- "1883:1883"
- "9001:9001"
volumes:
- ./cloud-bridge/conf:/mosquitto/config
- ./cloud-bridge/data:/mosquitto/data
- ./logs:/mosquitto/log
networks:
mqtt-net:
ipv4_address: 10.5.1.1
```
**Environment Details**
- NanoMQ version: 0.21-full
- Operating system and version: ubuntu 22.04 and docker compose
- Compiler and language used: none
- testing scenario: docker
**Client SDK**
collectd with mqtt plugin and mqtt-stresser
| nanomq not maintaining connection to mosquitto broker | https://api.github.com/repos/nanomq/nanomq/issues/1668/comments | 11 | 2024-02-08T15:22:51Z | 2024-03-27T10:35:22Z | https://github.com/nanomq/nanomq/issues/1668 | 2,125,439,907 | 1,668 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Error occurs while trying to connect the client using MQTT on Node.js. Using the properties requestResponseInformation and requestProblemInformation.
**Expected behavior**
The client should connect with no errors and send back the responseTopic on the packet when a client is subscribed to some topic.
**Actual Behavior**
Connection error occurs. Cannot parse the property code type, resulting in the client being unable to connect
**To Reproduce**
Try to connect with the broker using protocolVersion: 5 and the following properties:
{
requestResponseInformation: true,
requestProblemInformation: true
}
**Environment Details**
NanoMQ version: Latest version
Same issue on Windows, Linux, and Docker image latest versions
Client SDK
Node.js version: v21.5.0
SDK MQTT version: 5.3.5 [Link to npm package](https://www.npmjs.com/package/mqtt)
**Additional context**
const clientOptions: mqtt.IClientOptions = {
keepalive: 60,
protocolVersion: 5,
properties: {
requestResponseInformation: true,
requestProblemInformation: true,
},
};
mqtt.connect("mqtt://XXX.XXX.XXX.XXX", clientOptions)
**RESULT**
Error: Cannot parse property code type | Error connection with MQTT V5.0 : Cannot parse property code type | https://api.github.com/repos/nanomq/nanomq/issues/1667/comments | 8 | 2024-02-08T08:04:26Z | 2024-05-05T00:58:48Z | https://github.com/nanomq/nanomq/issues/1667 | 2,124,573,387 | 1,667 |
[
"emqx",
"nanomq"
] | **Describe the bug**
A clear and concise description of what the bug is.
nanomq server get stuck, can not be connected by any mqtts/mqtt client.
**Expected behavior**
A clear and concise description of what you expected to happen.
server can be connected by mqtt client.
**Actual Behavior**
Describe what occurred.
**To Reproduce**
If possible include actual reproduction test code here.
Minimal C test cases are perferred.
An android paho-mqttv3 client connect to the nanomq server twice at the same time (interval millisecond).
**Environment Details**
- NanoMQ version release 0.21.2
- Operating system and version
- Compiler and language used
- testing scenario
**Client SDK**
An android paho-mqttv3 client
**Additional context**
Add any other context about the problem here.
/tmp/nanomq.log
2024-02-07 11:53:06 [1054] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtts/broker_tls.c:535: ############### tlstran_pipe_send_cb [0xae994350] ################
2024-02-07 11:53:06 [1054] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtts/broker_tls.c:549: tls over tcp socket sent 155 bytes iov 0
2024-02-07 11:53:06 [1054] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtts/broker_tls.c:1477: ########### tlstran_pipe_send_start ###########
2024-02-07 11:53:06 [1052] INFO /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:452: pipe 1853715459 occupied! resending in cb!
2024-02-07 11:53:06 [1052] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:375: #### nano_ctx_send with ctx 0x633fb0 msg type 30 ####
2024-02-07 11:53:06 [1055] DEBUG /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:670: client connected! addr [192.168.31.176 port [29903]
2024-02-07 11:53:06 [1054] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtts/broker_tls.c:1487: aio not functioning
2024-02-07 11:53:06 [1054] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:946: ******** nano_pipe_send_cb 96152714 ****
2024-02-07 11:53:06 [1055] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:1243: no valid entry in auth list
2024-02-07 11:53:06 [1054] DEBUG /home/runner/work/nanomq/nanomq/nanomq/apps/broker.c:631: SEND ^^^^ ctx4 ^^^^
2024-02-07 11:53:06 [1053] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:375: #### nano_ctx_send with ctx 0x635378 msg type 30 ####
2024-02-07 11:53:06 [1054] DEBUG /home/runner/work/nanomq/nanomq/nanomq/pub_handler.c:1286: free topic
2024-02-07 11:53:06 [1054] DEBUG /home/runner/work/nanomq/nanomq/nanomq/pub_handler.c:1302: free payload
2024-02-07 11:53:06 [1054] DEBUG /home/runner/work/nanomq/nanomq/nanomq/pub_handler.c:1308: free pub_packet
2024-02-07 11:53:06 [1054] DEBUG /home/runner/work/nanomq/nanomq/nanomq/pub_handler.c:88: pub_handler: init pipe_info
2024-02-07 11:53:06 [1054] TRACE /home/runner/work/nanomq/nanomq/nng/src/nng.c:390: ######## nng_ctx_recv context id 4 ########
2024-02-07 11:53:06 [1054] TRACE /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:1003: nano_ctx_recv start 0x636690
2024-02-07 11:53:07 [1089] ERROR /home/runner/work/nanomq/nanomq/nanomq/webhook_inproc.c:201: Connect failed: Timed out
2024-02-07 11:53:11 [1055] ERROR /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/auth_http.c:281: Connect failed: Timed out
root@sgw7000:~# gdb nanomq 1045
GNU gdb (GDB) 9.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-ostl-linux-gnueabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from nanomq...
(No debugging symbols found in nanomq)
Attaching to program: /usr/local/bin/nanomq, process 1045
[New LWP 1050]
[New LWP 1051]
[New LWP 1052]
[New LWP 1053]
[New LWP 1054]
[New LWP 1055]
[New LWP 1056]
[New LWP 1057]
[New LWP 1058]
[New LWP 1059]
[New LWP 1060]
[New LWP 1064]
[New LWP 1065]
[New LWP 1066]
[New LWP 1067]
[New LWP 1068]
[New LWP 1069]
[New LWP 1070]
[New LWP 1071]
[New LWP 1072]
[New LWP 1073]
[New LWP 1074]
[New LWP 1075]
[New LWP 1076]
[New LWP 1077]
[New LWP 1078]
[New LWP 1079]
[New LWP 1080]
[New LWP 1081]
[New LWP 1082]
[New LWP 1083]
[New LWP 1084]
[New LWP 1085]
[New LWP 1086]
[New LWP 1087]
[New LWP 1088]
[New LWP 1089]
[New LWP 1090]
[New LWP 1091]
[New LWP 1092]
[New LWP 1093]
[New LWP 1094]
[New LWP 1095]
[New LWP 1096]
[New LWP 1103]
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
--Type <RET> for more, q to quit, c to continue without paging--
0xb6e85024 in ?? () from /lib/libc.so.6
(gdb) bt
#0 0xb6e85024 in ?? () from /lib/libc.so.6
#1 0xb6edcad8 in ?? () from /lib/libc.so.6
#2 0xb6edcb48 in clock_nanosleep () from /lib/libc.so.6
#3 0xb6ee08be in nanosleep () from /lib/libc.so.6
#4 0x00508f00 in nni_msleep ()
#5 0x0051cec6 in nng_msleep ()
#6 0x004f6bca in broker ()
#7 0x004f79c8 in broker_start ()
#8 0x004f7eee in broker_restart ()
#9 0x004f43e4 in main ()
(gdb) info threads
Id Target Id Frame
* 1 LWP 1045 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
2 LWP 1050 "nng:poll:epoll" 0xb6e85026 in ?? () from /lib/libc.so.6
3 LWP 1051 "nng:resolver" 0xb6f6dc14 in ?? () from /lib/libpthread.so.0
4 LWP 1052 "nng:task" 0xb6f6dc14 in ?? () from /lib/libpthread.so.0
5 LWP 1053 "nng:task" 0xb6f6dc14 in ?? () from /lib/libpthread.so.0
6 LWP 1054 "nng:task" 0xb6f6dc14 in ?? () from /lib/libpthread.so.0
7 LWP 1055 "nng:task" 0xb6f6dc14 in ?? () from /lib/libpthread.so.0
8 LWP 1056 "nng:reap2" 0xb6f6dc14 in ?? () from /lib/libpthread.so.0
9 LWP 1057 "nng:aio:expire" 0xb6f6dc14 in ?? () from /lib/libpthread.so.0
10 LWP 1058 "nng:aio:expire" 0xb6f6dc14 in ?? () from /lib/libpthread.so.0
11 LWP 1059 "nng:aio:expire" 0xb6f6dc14 in ?? () from /lib/libpthread.so.0
12 LWP 1060 "nng:aio:expire" 0xb6f6dc14 in ?? () from /lib/libpthread.so.0
13 LWP 1064 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
14 LWP 1065 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
15 LWP 1066 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
16 LWP 1067 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
17 LWP 1068 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
18 LWP 1069 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
19 LWP 1070 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
20 LWP 1071 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
21 LWP 1072 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
22 LWP 1073 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
--Type <RET> for more, q to quit, c to continue without paging--
23 LWP 1074 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
24 LWP 1075 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
25 LWP 1076 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
26 LWP 1077 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
27 LWP 1078 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
28 LWP 1079 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
29 LWP 1080 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
30 LWP 1081 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
31 LWP 1082 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
32 LWP 1083 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
33 LWP 1084 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
34 LWP 1085 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
35 LWP 1086 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
36 LWP 1087 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
37 LWP 1088 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
38 LWP 1089 "nanomq" 0xb6f6dc14 in ?? () from /lib/libpthread.so.0
39 LWP 1090 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
40 LWP 1091 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
41 LWP 1092 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
42 LWP 1093 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
43 LWP 1094 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
44 LWP 1095 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
45 LWP 1096 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
--Type <RET> for more, q to quit, c to continue without paging--
46 LWP 1103 "nanomq" 0xb6e85024 in ?? () from /lib/libc.so.6
(gdb)
| Add timeout to HTTP Auth | https://api.github.com/repos/nanomq/nanomq/issues/1666/comments | 13 | 2024-02-07T09:30:58Z | 2024-07-22T06:16:40Z | https://github.com/nanomq/nanomq/issues/1666 | 2,122,577,974 | 1,666 |
[
"emqx",
"nanomq"
] | **Describe the bug**
When emqx is shutdown, nanomq (the QUIC bridge client), exits with signal number 11. Also, when emqx bridge never has been present for nanomq, the action of subscribing to a topic also results in this error.
**Expected behavior**
Loss of connection with emqx should not result in the stopping of nanomq. Works fine for tcp bridging.
**Actual Behavior**
Loss of connection with emqx does result in failure of nanomq.
**Environment Details**
- NanoMQ version (0.21.2)
- Operating system and version (docker 0.21.2-full)
- Compiler and language used (n/a)
- testing scenario ([see nanomq_bridge.conf here](https://github.com/nanomq/nanomq/discussions/1656#discussioncomment-8385299))
**Additional context**
Nanomq logs:
<details>
```
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1258 print_conf: This NanoMQ instance configured as:
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1261 print_conf: tcp url: nmq-tcp://0.0.0.0:1883
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1264 print_conf: websocket url: nmq-ws://0.0.0.0:1884
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1282 print_conf: daemon: false
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1284 print_conf: num_taskq_thread: 8
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1286 print_conf: max_taskq_thread: 8
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1288 print_conf: parallel: 8
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1289 print_conf: property_size: 32
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1290 print_conf: max_packet_size: 102400
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1291 print_conf: client_max_packet_size: 102400
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1293 print_conf: max_mqueue_len: 2048
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1294 print_conf: max_inflight_window: 2048
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1295 print_conf: max_awaiting_rel: 10s
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1296 print_conf: await_rel_timeout: 10s
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1297 print_conf: retry_interval: 10s
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1298 print_conf: keepalive_multiplier: 1.250000
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1321 print_conf: sqlite:
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1322 print_conf: disk_cache_size: 102400
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1328 print_conf: flush_mem_threshold: 100
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1330 print_conf: resend_interval: 5000
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1334 print_conf: allow_anonymous: true
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1338 print_conf: acl_nomatch: allow
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1340 print_conf: enable_acl_cache: on
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1342 print_conf: acl_cache_max_size: 32
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1344 print_conf: acl_cache_ttl: 60
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1345 print_conf: acl_deny_action: ignore
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3222 print_bridge_conf: bridge.mqtt.emqx1.address: mqtt-quic://10.42.0.1:14567
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3224 print_bridge_conf: bridge.mqtt.emqx1.proto_ver: 5
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3226 print_bridge_conf: bridge.mqtt.emqx1.clientid: tpu_nanomq
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3228 print_bridge_conf: bridge.mqtt.emqx1.clean_start: 1
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3230 print_bridge_conf: bridge.mqtt.emqx1.username: (null)
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3232 print_bridge_conf: bridge.mqtt.emqx1.password: (null)
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3234 print_bridge_conf: bridge.mqtt.emqx1.keepalive: 60
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3236 print_bridge_conf: bridge.mqtt.emqx1.backoff_max: 60
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3238 print_bridge_conf: bridge.mqtt.emqx1.max_parallel_processes: 2
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3242 print_bridge_conf: bridge.mqtt.emqx1.quic_multi_stream: false
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3244 print_bridge_conf: bridge.mqtt.emqx1.quic_keepalive: 120
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3246 print_bridge_conf: bridge.mqtt.emqx1.quic_handshake_timeout: 60
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3248 print_bridge_conf: bridge.mqtt.emqx1.quic_discon_timeout: 20
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3250 print_bridge_conf: bridge.mqtt.emqx1.qidle_timeout: 120
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3252 print_bridge_conf: bridge.mqtt.emqx1.qsend_idle_timeout: 2
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3254 print_bridge_conf: bridge.mqtt.emqx1.qinitial_rtt_ms: 48000
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3256 print_bridge_conf: bridge.mqtt.emqx1.qmax_ack_delay_ms: 48000
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3258 print_bridge_conf: bridge.mqtt.emqx1.qcongestion_control: 0
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3260 print_bridge_conf: bridge.mqtt.emqx1.quic_0rtt: false
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3264 print_bridge_conf: bridge.mqtt.emqx1.tls.enable: false
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3272 print_bridge_conf: bridge.mqtt.emqx1.forwards:
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3275 print_bridge_conf: [0] remote topic:
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3279 print_bridge_conf: [0] local topic: #
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3284 print_bridge_conf: bridge.mqtt.emqx1.subscription:
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3303 print_bridge_conf: bridge.sqlite.disk_cache_size: 102400
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3305 print_bridge_conf: bridge.sqlite.mounted_file_path: (null)
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3307 print_bridge_conf: bridge.sqlite.flush_mem_threshold: 100
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:3309 print_bridge_conf: bridge.sqlite.resend_interval: 5000
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1173 print_plugin_conf: plugin path: /usr/lib/nanomq/plugin_user_property_timestamp.so
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1206 print_rule_engine_conf: rule engine sqlite:
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1207 print_rule_engine_conf: path: /var/log/nanomq_backup.db
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1211 print_rule_engine_conf: [0] sql: SELECT * FROM *
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/nanolib/conf.c:1212 print_rule_engine_conf: [0] table: broker
2024-02-07 04:57:04 [2999] INFO ../nanomq/apps/broker.c:1417 store_pid: 2999
2024-02-07 04:57:04 [2999] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:385 dbtree_node_new: New node: []
2024-02-07 04:57:04 [2999] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:385 dbtree_node_new: New node: []
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/apps/broker.c:932 broker: db init finished
2024-02-07 04:57:04 [2999] DEBUG ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1397 nng_nmq_tcp0_open: open up nmq tcp0 protocol.
2024-02-07 04:57:04 [2999] DEBUG ../nng/src/sp/protocol.c:40 nni_proto_mqtt_open: nng internal init finished! Listener start
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:321 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5578cff428 &&&&&&&&&
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:523 nano_sock_init: ************* nano_sock_init 0x5578cff308 *************
2024-02-07 04:57:04 [2999] DEBUG ../nng/src/sp/protocol.c:42 nni_proto_mqtt_open: mqtt socket opened!
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/apps/broker.c:941 broker: listener init finished
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/apps/broker.c:947 broker: HTTP service initialization
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/apps/broker.c:958 broker: HTTP init finished
2024-02-07 04:57:04 [2999] TRACE ../nanomq/apps/broker.c:1003 broker: total ctx num: 12
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/bridge.c:856 bridge_quic_client: Quic bridge service start.
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/quic/msquic_dial.c:270 nni_quic_dial: begin dialing!
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/quic/msquic_dial.c:1090 msquic_open: Msquic is enabled
2024-02-07 04:57:04 [2999] WARN ../nng/src/supplemental/quic/msquic_dial.c:1123 msquic_load_config: No quic TLS/SSL credentials (cacert and key) was specified.
2024-02-07 04:57:04 [2999] INFO ../nng/src/supplemental/quic/msquic_dial.c:1201 msquic_conn_open: Quic connecting... 10.42.0.1:14567
2024-02-07 04:57:04 [2999] DEBUG ../nng/src/supplemental/quic/quic_api.c:144 quic_dialer_dial: [quic dialer dial] end
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/bridge.c:1210 bridge_client: parallel 12
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/apps/broker.c:1024 broker: bridge init finished
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:321 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5578d76db0 &&&&&&&&&
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/pub_handler.c:88 init_pipe_content: pub_handler: init pipe_info
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:321 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5578d77150 &&&&&&&&&
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/pub_handler.c:88 init_pipe_content: pub_handler: init pipe_info
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:321 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5578d77420 &&&&&&&&&
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/pub_handler.c:88 init_pipe_content: pub_handler: init pipe_info
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:321 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5578d776f0 &&&&&&&&&
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/pub_handler.c:88 init_pipe_content: pub_handler: init pipe_info
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:321 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5578d77a60 &&&&&&&&&
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/pub_handler.c:88 init_pipe_content: pub_handler: init pipe_info
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:321 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5578d77dd0 &&&&&&&&&
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/pub_handler.c:88 init_pipe_content: pub_handler: init pipe_info
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:321 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5578d782d0 &&&&&&&&&
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/pub_handler.c:88 init_pipe_content: pub_handler: init pipe_info
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:321 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5578d78640 &&&&&&&&&
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/pub_handler.c:88 init_pipe_content: pub_handler: init pipe_info
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/apps/broker.c:1038 broker: MQTT bridging service initialization
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:321 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5578d789b0 &&&&&&&&&
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/pub_handler.c:88 init_pipe_content: pub_handler: init pipe_info
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:321 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5578d78dd0 &&&&&&&&&
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/pub_handler.c:88 init_pipe_content: pub_handler: init pipe_info
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/apps/broker.c:292 server_cb: INIT ^^^^^^^^ ctx [1] ^^^^^^^^
2024-02-07 04:57:04 [2999] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 1 ########
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:973 nano_ctx_recv: nano_ctx_recv start 0x5578d76db0
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/apps/broker.c:292 server_cb: INIT ^^^^^^^^ ctx [2] ^^^^^^^^
2024-02-07 04:57:04 [2999] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 2 ########
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:973 nano_ctx_recv: nano_ctx_recv start 0x5578d77150
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/apps/broker.c:292 server_cb: INIT ^^^^^^^^ ctx [3] ^^^^^^^^
2024-02-07 04:57:04 [2999] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 3 ########
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:973 nano_ctx_recv: nano_ctx_recv start 0x5578d77420
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/apps/broker.c:292 server_cb: INIT ^^^^^^^^ ctx [4] ^^^^^^^^
2024-02-07 04:57:04 [2999] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 4 ########
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:973 nano_ctx_recv: nano_ctx_recv start 0x5578d776f0
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/apps/broker.c:292 server_cb: INIT ^^^^^^^^ ctx [5] ^^^^^^^^
2024-02-07 04:57:04 [2999] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 5 ########
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:973 nano_ctx_recv: nano_ctx_recv start 0x5578d77a60
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/apps/broker.c:292 server_cb: INIT ^^^^^^^^ ctx [6] ^^^^^^^^
2024-02-07 04:57:04 [2999] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 6 ########
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:973 nano_ctx_recv: nano_ctx_recv start 0x5578d77dd0
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/apps/broker.c:292 server_cb: INIT ^^^^^^^^ ctx [7] ^^^^^^^^
2024-02-07 04:57:04 [2999] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 7 ########
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:973 nano_ctx_recv: nano_ctx_recv start 0x5578d782d0
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/apps/broker.c:292 server_cb: INIT ^^^^^^^^ ctx [8] ^^^^^^^^
2024-02-07 04:57:04 [2999] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 8 ########
2024-02-07 04:57:04 [2999] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:973 nano_ctx_recv: nano_ctx_recv start 0x5578d78640
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/apps/broker.c:295 server_cb: INIT ^^^^^^^^ extra ctx [10] ^^^^^^^^
2024-02-07 04:57:04 [2999] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 10 ########
2024-02-07 04:57:04 [2999] DEBUG ../nanomq/apps/broker.c:295 server_cb: INIT ^^^^^^^^ extra ctx [12] ^^^^^^^^
2024-02-07 04:57:04 [2999] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 12 ########
2024-02-07 04:57:04 [2999] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 13 ########
2024-02-07 04:57:04 [2999] INFO ../nanomq/plugin/plugin.c:120 plugin_init: plugin_init init: /usr/lib/nanomq/plugin_user_property_timestamp.so successfully
2024-02-07 04:57:04 [2999] INFO ../nanomq/plugin/plugin.c:80 plugin_register: plugin_register: /usr/lib/nanomq/plugin_user_property_timestamp.so successfully
NanoMQ Broker is started successfully!
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:760 msquic_connection_cb: msquic_connection_cb triggered! 10
2024-02-07 04:57:04 [3020] INFO ../nng/src/supplemental/quic/msquic_dial.c:858 msquic_connection_cb: QUIC_CONNECTION_EVENT_DATAGRAM_STATE_CHANGED
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:760 msquic_connection_cb: msquic_connection_cb triggered! 0
2024-02-07 04:57:04 [3020] INFO ../nng/src/supplemental/quic/msquic_dial.c:765 msquic_connection_cb: [conn][0x5578d73fe0] is Connected. Resumed Session 0
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:760 msquic_connection_cb: msquic_connection_cb triggered! 7
2024-02-07 04:57:04 [3002] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:1236 msquic_strm_open: [strm][(nil)] Starting...
2024-02-07 04:57:04 [3020] INFO ../nng/src/supplemental/quic/msquic_dial.c:861 msquic_connection_cb: QUIC_CONNECTION_EVENT_STREAMS_AVAILABLE
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:760 msquic_connection_cb: msquic_connection_cb triggered! 7
2024-02-07 04:57:04 [3002] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:1263 msquic_strm_open: [strm][0x7f9c000b70] Done...
2024-02-07 04:57:04 [3020] INFO ../nng/src/supplemental/quic/msquic_dial.c:861 msquic_connection_cb: QUIC_CONNECTION_EVENT_STREAMS_AVAILABLE
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:889 msquic_strm_cb: quic_strm_cb triggered! 0 conn 0x5578d4ff50 strm 0x7f9c000b70
2024-02-07 04:57:04 [3020] INFO ../nng/src/supplemental/quic/msquic_dial.c:1015 msquic_strm_cb: QUIC_STREAM_EVENT_START_COMPLETE [0x7f9c000b70] ID: 0 Status: 0
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:409 quic_stream_cb: [quic cb] start 0
2024-02-07 04:57:04 [3003] INFO ../nng/src/mqtt/transport/quic/mqtt_quic.c:1444 mqtt_quictran_dial_cb: main pipe 0x5578d4ff50
2024-02-07 04:57:04 [3003] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:609 quic_stream_dowrite: [quic dowrite] start 0x7f9c000b70
2024-02-07 04:57:04 [3003] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:628 quic_stream_dowrite: buf0 sz 2
2024-02-07 04:57:04 [3003] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:628 quic_stream_dowrite: buf1 sz 77
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:469 quic_stream_cb: [quic cb] end
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:889 msquic_strm_cb: quic_strm_cb triggered! 2 conn 0x5578d4ff50 strm 0x7f9c000b70
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:892 msquic_strm_cb: QUIC_STREAM_EVENT_SEND_COMPLETE!
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:409 quic_stream_cb: [quic cb] start 2
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:609 quic_stream_dowrite: [quic dowrite] start 0x7f9c000b70
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:469 quic_stream_cb: [quic cb] end
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:760 msquic_connection_cb: msquic_connection_cb triggered! 14
2024-02-07 04:57:04 [3020] WARN ../nng/src/supplemental/quic/msquic_dial.c:825 msquic_connection_cb: [conn][0x5578d73fe0] Resumption ticket received (1764 bytes):
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:889 msquic_strm_cb: quic_strm_cb triggered! 8 conn 0x5578d4ff50 strm 0x7f9c000b70
2024-02-07 04:57:04 [3020] INFO ../nng/src/supplemental/quic/msquic_dial.c:1028 msquic_strm_cb: QUIC_STREAM_EVENT_IDEAL_SEND_BUFFER_SIZE
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:889 msquic_strm_cb: quic_strm_cb triggered! 1 conn 0x5578d4ff50 strm 0x7f9c000b70
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:923 msquic_strm_cb: [strm][0x7f9c000b70] Data received Flag: 0
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:889 msquic_strm_cb: quic_strm_cb triggered! 1 conn 0x5578d4ff50 strm 0x7f9c000b70
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:923 msquic_strm_cb: [strm][0x7f9c000b70] Data received Flag: 0
2024-02-07 04:57:04 [3007] DEBUG ../nng/src/supplemental/mqtt/mqtt_codec.c:3907 decode_buf_properties: remain len 19 prop len 16 curpos 0x7f94000c43 endpos 0x7f94000c53
2024-02-07 04:57:04 [3007] TRACE ../nng/src/supplemental/mqtt/mqtt_codec.c:3655 property_parse: id: 39, value: 1048576 (U32)
2024-02-07 04:57:04 [3007] TRACE ../nng/src/supplemental/mqtt/mqtt_codec.c:3645 property_parse: id: 37, value: 1 (U8)
2024-02-07 04:57:04 [3007] TRACE ../nng/src/supplemental/mqtt/mqtt_codec.c:3645 property_parse: id: 42, value: 1 (U8)
2024-02-07 04:57:04 [3007] TRACE ../nng/src/supplemental/mqtt/mqtt_codec.c:3645 property_parse: id: 41, value: 1 (U8)
2024-02-07 04:57:04 [3007] TRACE ../nng/src/supplemental/mqtt/mqtt_codec.c:3650 property_parse: id: 34, value: 65535 (U16)
2024-02-07 04:57:04 [3007] TRACE ../nng/src/supplemental/mqtt/mqtt_codec.c:3645 property_parse: id: 40, value: 1 (U8)
2024-02-07 04:57:04 [3007] INFO ../nanomq/bridge.c:747 bridge_quic_connect_cb: Bridge client connected! RC [0]
2024-02-07 04:57:04 [3009] DEBUG ../nng/src/supplemental/mqtt/mqtt_codec.c:3907 decode_buf_properties: remain len 19 prop len 16 curpos 0x7f94000c43 endpos 0x7f94000c53
2024-02-07 04:57:04 [3007] INFO ../nanomq/bridge.c:748 bridge_quic_connect_cb: Local ip4 address [127.0.0.0] port [136]
2024-02-07 04:57:04 [3009] TRACE ../nng/src/supplemental/mqtt/mqtt_codec.c:3655 property_parse: id: 39, value: 1048576 (U32)
2024-02-07 04:57:04 [3009] TRACE ../nng/src/supplemental/mqtt/mqtt_codec.c:3645 property_parse: id: 37, value: 1 (U8)
2024-02-07 04:57:04 [3009] TRACE ../nng/src/supplemental/mqtt/mqtt_codec.c:3645 property_parse: id: 42, value: 1 (U8)
2024-02-07 04:57:04 [3009] TRACE ../nng/src/supplemental/mqtt/mqtt_codec.c:3645 property_parse: id: 41, value: 1 (U8)
2024-02-07 04:57:04 [3009] TRACE ../nng/src/supplemental/mqtt/mqtt_codec.c:3650 property_parse: id: 34, value: 65535 (U16)
2024-02-07 04:57:04 [3009] TRACE ../nng/src/supplemental/mqtt/mqtt_codec.c:3645 property_parse: id: 40, value: 1 (U8)
2024-02-07 04:57:04 [3009] DEBUG ../nanomq/apps/broker.c:300 server_cb: RECV ^^^^ ctx9 ^^^^
2024-02-07 04:57:04 [3009] INFO ../nanomq/apps/broker.c:324 server_cb: bridge client is connected!
2024-02-07 04:57:04 [3009] DEBUG ../nanomq/pub_handler.c:1540 decode_pub_message: cmd: 3, retain: 0, qos: 0, dup: 0, remaining length: 179
2024-02-07 04:57:04 [3009] DEBUG ../nanomq/pub_handler.c:1588 decode_pub_message: topic: [$SYS/brokers/connected], len: [22], qos: 0
2024-02-07 04:57:04 [3009] DEBUG ../nanomq/pub_handler.c:1633 decode_pub_message: used pos: [24]
2024-02-07 04:57:04 [3009] DEBUG ../nanomq/pub_handler.c:1645 decode_pub_message: payload: [], len = 155
2024-02-07 04:57:04 [3009] DEBUG ../nanomq/pub_handler.c:1190 handle_pub: pipe_info size: [0]
2024-02-07 04:57:04 [3009] DEBUG ../nanomq/apps/broker.c:548 server_cb: WAIT ^^^^ ctx9 ^^^^
2024-02-07 04:57:04 [3009] TRACE ../nanomq/apps/broker.c:558 server_cb: total pipes: 0
2024-02-07 04:57:04 [3009] DEBUG ../nanomq/bridge.c:202 bridge_publish_msg: bridge: publish to '$SYS/brokers/connected'
2024-02-07 04:57:04 [3009] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:609 quic_stream_dowrite: [quic dowrite] start 0x7f9c000b70
2024-02-07 04:57:04 [3009] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:628 quic_stream_dowrite: buf0 sz 3
2024-02-07 04:57:04 [3009] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:628 quic_stream_dowrite: buf1 sz 180
2024-02-07 04:57:04 [3003] DEBUG ../nanomq/bridge.c:1159 bridge_send_cb: bridge to mqtt-quic://10.42.0.1:14567 msg sent
2024-02-07 04:57:04 [3009] DEBUG ../nanomq/apps/broker.c:627 server_cb: SEND ^^^^ ctx9 ^^^^
2024-02-07 04:57:04 [3009] DEBUG ../nanomq/pub_handler.c:1286 free_pub_packet: free topic
2024-02-07 04:57:04 [3009] DEBUG ../nanomq/pub_handler.c:1302 free_pub_packet: free payload
2024-02-07 04:57:04 [3009] DEBUG ../nanomq/pub_handler.c:1308 free_pub_packet: free pub_packet
2024-02-07 04:57:04 [3009] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 10 ########
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:889 msquic_strm_cb: quic_strm_cb triggered! 2 conn 0x5578d4ff50 strm 0x7f9c000b70
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:892 msquic_strm_cb: QUIC_STREAM_EVENT_SEND_COMPLETE!
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:409 quic_stream_cb: [quic cb] start 2
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:609 quic_stream_dowrite: [quic dowrite] start 0x7f9c000b70
2024-02-07 04:57:04 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:469 quic_stream_cb: [quic cb] end
2024-02-07 04:57:16 [3002] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1620 tcptran_pipe_start: tcptran_pipe_start!
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:305 tcptran_pipe_nego_cb: start tcptran_pipe_nego_cb max len 12 pipe_addr 0x7f9c001f90 gotrx 0 wantrx 12
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:305 tcptran_pipe_nego_cb: start tcptran_pipe_nego_cb max len 12 pipe_addr 0x7f9c001f90 gotrx 5 wantrx 34
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:553 conn_handler: remaining length: 32
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:564 conn_handler: pro_name: MQTT
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:567 conn_handler: pro_ver: 5
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:575 conn_handler: conn flag:2
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:590 conn_handler: Decoding MQTT V5 Properties
2024-02-07 04:57:16 [3004] DEBUG ../nng/src/sp/protocol/mqtt/mqtt_parser.c:597 conn_handler: remain len 32 max len 34 prop len 5 pos 12
2024-02-07 04:57:16 [3004] DEBUG ../nng/src/supplemental/mqtt/mqtt_codec.c:3907 decode_buf_properties: remain len 32 prop len 5 curpos 0x7f84000b7d endpos 0x7f84000b82
2024-02-07 04:57:16 [3004] TRACE ../nng/src/supplemental/mqtt/mqtt_codec.c:3655 property_parse: id: 17, value: 0 (U32)
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:609 conn_handler: pos after property: [18]
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:631 conn_handler: clientid: [mqttx_9000472c] [14]
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:632 conn_handler: pos after clientid: [34]
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:715 conn_handler: pos: [34] len: [32]
2024-02-07 04:57:16 [3004] DEBUG ../nng/src/sp/transport/mqtt/broker_tcp.c:174 tcptran_pipe_init: change p_id by hashing 136942251 rv 0
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:184 tcptran_pipe_init: ************ tcptran_pipe_init [0x7f9c001f90] ************
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:602 nano_pipe_init: ##########nano_pipe_init###############
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:638 nano_pipe_start: ########## nano_pipe_start ##########
2024-02-07 04:57:16 [3004] DEBUG ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:670 nano_pipe_start: client connected! addr [10.42.0.1 port [51384]
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:1243 verify_connect: no valid entry in auth list
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1049 nano_pipe_recv_cb: ######### nano_pipe_recv_cb #########
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1584 tcptran_pipe_recv_start: *** tcptran_pipe_recv_start ***
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1207 nano_pipe_recv_cb: currently processing pipe_id: 136942251
2024-02-07 04:57:16 [3004] DEBUG ../nanomq/apps/broker.c:300 server_cb: RECV ^^^^ ctx1 ^^^^
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:375 nano_ctx_send: #### nano_ctx_send with ctx 0x5578d76db0 msg type 20 ####
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:390 nano_ctx_send: ******** working with pipe id : 136942251 ctx ********
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1504 tcptran_pipe_send: ########### tcptran_pipe_send ###########
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1463 tcptran_pipe_send_start: ########### tcptran_pipe_send_start ###########
2024-02-07 04:57:16 [3004] DEBUG ../nanomq/pub_handler.c:1540 decode_pub_message: cmd: 3, retain: 0, qos: 0, dup: 0, remaining length: 198
2024-02-07 04:57:16 [3004] DEBUG ../nanomq/pub_handler.c:1588 decode_pub_message: 2024-02-07 04:57:16 [3009] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:544 nmq_tcptran_pipe_send_cb: ############### nmq_tcptran_pipe_send_cb [0x7f9c001f90] ################
topic: [$SYS/brokers/connected], len: [22], qos: 0
2024-02-07 04:57:16 [3004] DEBUG ../nanomq/pub_handler.c:1633 decode_pub_message: used pos: [24]
2024-02-07 04:57:16 [3004] DEBUG ../nanomq/pub_handler.c:1645 decode_pub_message: payload: [], len = 174
2024-02-07 04:57:16 [3004] DEBUG ../nanomq/pub_handler.c:1190 handle_pub: pipe_info size: [0]
2024-02-07 04:57:16 [3009] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:560 nmq_tcptran_pipe_send_cb: tcp socket sent 21 bytes iov 0
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1213 nano_pipe_recv_cb: 2024-02-07 04:57:16 [3006] DEBUG ../nanomq/apps/broker.c:548 server_cb: WAIT ^^^^ ctx1 ^^^^
end of nano_pipe_recv_cb 0x5578d76db0
2024-02-07 04:57:16 [3009] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1463 tcptran_pipe_send_start: ########### tcptran_pipe_send_start ###########
2024-02-07 04:57:16 [3006] TRACE ../nanomq/apps/broker.c:558 server_cb: total pipes: 0
2024-02-07 04:57:16 [3009] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1473 tcptran_pipe_send_start: aio not functioning
2024-02-07 04:57:16 [3006] DEBUG ../nanomq/bridge.c:202 bridge_publish_msg: bridge: publish to '$SYS/brokers/connected'
2024-02-07 04:57:16 [3009] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:916 nano_pipe_send_cb: ******** nano_pipe_send_cb 136942251 ****
2024-02-07 04:57:16 [3006] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:609 quic_stream_dowrite: [quic dowrite] start 0x7f9c000b70
2024-02-07 04:57:16 [3006] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:628 quic_stream_dowrite: buf0 sz 3
2024-02-07 04:57:16 [3006] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:628 quic_stream_dowrite: buf1 sz 199
2024-02-07 04:57:16 [3006] DEBUG ../nanomq/bridge.c:1159 bridge_send_cb: bridge to mqtt-quic://10.42.0.1:14567 msg sent
2024-02-07 04:57:16 [3008] DEBUG ../nanomq/apps/broker.c:627 server_cb: SEND ^^^^ ctx1 ^^^^
2024-02-07 04:57:16 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:889 msquic_strm_cb: quic_strm_cb triggered! 2 conn 0x5578d4ff50 strm 0x7f9c000b70
2024-02-07 04:57:16 [3008] DEBUG ../nanomq/pub_handler.c:1286 free_pub_packet: free topic
2024-02-07 04:57:16 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:892 msquic_strm_cb: QUIC_STREAM_EVENT_SEND_COMPLETE!
2024-02-07 04:57:16 [3008] DEBUG ../nanomq/pub_handler.c:1302 free_pub_packet: free payload
2024-02-07 04:57:16 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:409 quic_stream_cb: [quic cb] start 2
2024-02-07 04:57:16 [3008] DEBUG ../nanomq/pub_handler.c:1308 free_pub_packet: free pub_packet
2024-02-07 04:57:16 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:609 quic_stream_dowrite: [quic dowrite] start 0x7f9c000b70
2024-02-07 04:57:16 [3008] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 1 ########
2024-02-07 04:57:16 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:469 quic_stream_cb: [quic cb] end
2024-02-07 04:57:16 [3008] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:973 nano_ctx_recv: nano_ctx_recv start 0x5578d76db0
2024-02-07 04:57:16 [3003] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:635 tcptran_pipe_recv_cb: tcptran_pipe_recv_cb 0x7f9c001f90
2024-02-07 04:57:16 [3003] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:658 tcptran_pipe_recv_cb: newly recevied 2 totoal received: 2
2024-02-07 04:57:16 [3003] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:709 tcptran_pipe_recv_cb: pipe 0x7f9c001f90 header got: 82 d 0 4 4d, 15!!
2024-02-07 04:57:16 [3003] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:635 tcptran_pipe_recv_cb: tcptran_pipe_recv_cb 0x7f9c001f90
2024-02-07 04:57:16 [3003] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:658 tcptran_pipe_recv_cb: newly recevied 13 totoal received: 15
2024-02-07 04:57:16 [3003] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:764 tcptran_pipe_recv_cb: The type of msg is 80
2024-02-07 04:57:16 [3003] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1049 nano_pipe_recv_cb: ######### nano_pipe_recv_cb #########
2024-02-07 04:57:16 [3003] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:1521 nmq_subinfo_decode: prop len 0 varint 1 remain 13
2024-02-07 04:57:16 [3003] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:1572 nmq_subinfo_decode: The current process topic is abc/123
2024-02-07 04:57:16 [3003] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1584 tcptran_pipe_recv_start: *** tcptran_pipe_recv_start ***
2024-02-07 04:57:16 [3003] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1207 nano_pipe_recv_cb: currently processing pipe_id: 136942251
2024-02-07 04:57:16 [3003] DEBUG ../nanomq/apps/broker.c:300 server_cb: RECV ^^^^ ctx2 ^^^^
2024-02-07 04:57:16 [3003] DEBUG ../nanomq/sub_handler.c:65 decode_sub_msg: remainLen: [13] packetid : [61507]
2024-02-07 04:57:16 [3003] INFO ../nanomq/sub_handler.c:86 decode_sub_msg: topic: [abc/123] len: [7] pid [61507]
2024-02-07 04:57:16 [3003] DEBUG ../nanomq/sub_handler.c:248 sub_ctx_handle: topicLen: [7] body: [abc/123]
2024-02-07 04:57:16 [3003] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:385 dbtree_node_new: New node: [abc]
2024-02-07 04:57:16 [3003] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:385 dbtree_node_new: New node: [123]
2024-02-07 04:57:16 [3003] DEBUG ../nanomq/sub_handler.c:341 sub_ctx_handle: end of sub ctx handle.
2024-02-07 04:57:16 [3003] DEBUG ../nanomq/sub_handler.c:188 encode_suback_msg: reason_code: [2]
2024-02-07 04:57:16 [3003] DEBUG ../nanomq/sub_handler.c:214 encode_suback_msg: remain: [4] varint: [4 221 213 120] len: [1] packetid: [f0 43]
2024-02-07 04:57:16 [3003] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:375 nano_ctx_send: #### nano_ctx_send with ctx 0x5578d77150 msg type 90 ####
2024-02-07 04:57:16 [3003] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:390 nano_ctx_send: ******** working with pipe id : 136942251 ctx ********
2024-02-07 04:57:16 [3003] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1504 tcptran_pipe_send: ########### tcptran_pipe_send ###########
2024-02-07 04:57:16 [3003] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1463 tcptran_pipe_send_start: ########### tcptran_pipe_send_start ###########
2024-02-07 04:57:16 [3003] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1213 nano_pipe_recv_cb: end of nano_pipe_recv_cb 0x5578d77150
2024-02-07 04:57:16 [3009] DEBUG ../nanomq/apps/broker.c:627 server_cb: 2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:544 nmq_tcptran_pipe_send_cb: SEND ^^^^ ctx2 ^^^^############### nmq_tcptran_pipe_send_cb [0x7f9c001f90] ################
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:560 nmq_tcptran_pipe_send_cb: tcp socket sent 6 bytes iov 0
2024-02-07 04:57:16 [3009] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 2 ########
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1463 tcptran_pipe_send_start: ########### tcptran_pipe_send_start ###########
2024-02-07 04:57:16 [3003] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:895 tcptran_pipe_recv_cb: end of tcptran_pipe_recv_cb: synch! 0x7f9c001f90
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1473 tcptran_pipe_send_start: aio not functioning
2024-02-07 04:57:16 [3009] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:973 nano_ctx_recv: nano_ctx_recv start 0x5578d77150
2024-02-07 04:57:16 [3004] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:916 nano_pipe_send_cb: ******** nano_pipe_send_cb 136942251 ****
2024-02-07 04:57:18 [3007] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:635 tcptran_pipe_recv_cb: tcptran_pipe_recv_cb 0x7f9c001f90
2024-02-07 04:57:18 [3007] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:658 tcptran_pipe_recv_cb: newly recevied 2 totoal received: 2
2024-02-07 04:57:18 [3007] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:709 tcptran_pipe_recv_cb: pipe 0x7f9c001f90 header got: 30 13 0 4 4d, 21!!
2024-02-07 04:57:18 [3007] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:635 tcptran_pipe_recv_cb: tcptran_pipe_recv_cb 0x7f9c001f90
2024-02-07 04:57:18 [3007] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:658 tcptran_pipe_recv_cb: newly recevied 19 totoal received: 21
2024-02-07 04:57:18 [3007] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:764 tcptran_pipe_recv_cb: The type of msg is 30
2024-02-07 04:57:18 [3007] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1049 nano_pipe_recv_cb: ######### nano_pipe_recv_cb #########
2024-02-07 04:57:18 [3007] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1584 tcptran_pipe_recv_start: *** tcptran_pipe_recv_start ***
2024-02-07 04:57:18 [3007] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1207 nano_pipe_recv_cb: currently processing pipe_id: 136942251
2024-02-07 04:57:18 [3007] DEBUG ../nanomq/apps/broker.c:300 server_cb: RECV ^^^^ ctx3 ^^^^
2024-02-07 04:57:18 [3007] DEBUG ../nanomq/pub_handler.c:1540 decode_pub_message: cmd: 3, retain: 0, qos: 0, dup: 0, remaining length: 19
2024-02-07 04:57:18 [3007] DEBUG ../nanomq/pub_handler.c:1588 decode_pub_message: topic: [abc/123], len: [7], qos: 0
2024-02-07 04:57:18 [3007] DEBUG ../nng/src/supplemental/mqtt/mqtt_codec.c:3907 decode_buf_properties: remain len 19 prop len 2 curpos 0x7f88001dea endpos 0x7f88001dec
2024-02-07 04:57:18 [3007] TRACE ../nng/src/supplemental/mqtt/mqtt_codec.c:3645 property_parse: id: 1, value: 0 (U8)
2024-02-07 04:57:18 [3007] DEBUG ../nanomq/pub_handler.c:1610 decode_pub_message: property len: 2
2024-02-07 04:57:18 [3007] DEBUG ../nanomq/pub_handler.c:1633 decode_pub_message: used pos: [12]
2024-02-07 04:57:18 [3007] DEBUG ../nanomq/pub_handler.c:1645 decode_pub_message: payload: [acde
dd], len = 7
2024-02-07 04:57:18 [3007] TRACE ../nanomq/pub_handler.c:1111 handle_pub: len: 7, topic: abc/123
2024-02-07 04:57:18 [3007] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:734 collect_clients: Searching client: abc
2024-02-07 04:57:18 [3007] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:754 collect_clients: Searching client: abc
2024-02-07 04:57:18 [3007] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:756 collect_clients: add node_t: abc
2024-02-07 04:57:18 [3007] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:734 collect_clients: Searching client: 123
2024-02-07 04:57:18 [3007] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:737 collect_clients: Searching client: 123
2024-02-07 04:57:18 [3007] DEBUG ../nanomq/pub_handler.c:1190 handle_pub: pipe_info size: [1]
2024-02-07 04:57:18 [3002] DEBUG ../nanomq/apps/broker.c:548 server_cb: WAIT ^^^^ ctx3 ^^^^
2024-02-07 04:57:18 [3002] TRACE ../nanomq/apps/broker.c:558 server_cb: total pipes: 1
2024-02-07 04:57:18 [3002] DEBUG ../nanomq/pub_handler.c:1351 encode_pub_message: start encode message
2024-02-07 04:57:18 [3002] DEBUG ../nanomq/pub_handler.c:1388 encode_pub_message: after topic and id len in msg already [9]
2024-02-07 04:57:18 [3002] DEBUG ../nanomq/pub_handler.c:1448 encode_pub_message: after payload len in msg already [39]
2024-02-07 04:57:18 [3002] DEBUG ../nanomq/pub_handler.c:1458 encode_pub_message: header len [2] remain len [39]
2024-02-07 04:57:18 [3002] DEBUG ../nanomq/pub_handler.c:1510 encode_pub_message: end encode message
2024-02-07 04:57:18 [3007] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1213 nano_pipe_recv_cb: end of nano_pipe_recv_cb 0x5578d77420
2024-02-07 04:57:18 [3002] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:375 nano_ctx_send: #### nano_ctx_send with ctx 0x5578d77420 msg type 30 ####
2024-02-07 04:57:18 [3007] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:895 tcptran_pipe_recv_cb: end of tcptran_pipe_recv_cb: synch! 0x7f9c001f90
2024-02-07 04:57:18 [3002] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:390 nano_ctx_send: ******** working with pipe id : 136942251 ctx ********
2024-02-07 04:57:18 [3002] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1504 tcptran_pipe_send: ########### tcptran_pipe_send ###########
2024-02-07 04:57:18 [3002] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1463 tcptran_pipe_send_start: ########### tcptran_pipe_send_start ###########
2024-02-07 04:57:18 [3002] DEBUG ../nanomq/bridge.c:202 bridge_publish_msg: bridge: publish to 'abc/123'
2024-02-07 04:57:18 [3002] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:609 quic_stream_dowrite: [quic dowrite] start 0x7f9c000b70
2024-02-07 04:57:18 [3008] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:544 nmq_tcptran_pipe_send_cb: ############### nmq_tcptran_pipe_send_cb [0x7f9c001f90] ################
2024-02-07 04:57:18 [3002] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:628 quic_stream_dowrite: buf0 sz 2
2024-02-07 04:57:18 [3008] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:560 nmq_tcptran_pipe_send_cb: tcp socket sent 41 bytes iov 0
2024-02-07 04:57:18 [3002] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:628 quic_stream_dowrite: buf1 sz 39
2024-02-07 04:57:18 [3008] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1463 tcptran_pipe_send_start: ########### tcptran_pipe_send_start ###########
2024-02-07 04:57:18 [3008] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1473 tcptran_pipe_send_start: aio not functioning
2024-02-07 04:57:18 [3008] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:916 nano_pipe_send_cb: ******** nano_pipe_send_cb 136942251 ****
2024-02-07 04:57:18 [3002] DEBUG ../nanomq/apps/broker.c:627 server_cb: 2024-02-07 04:57:18 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:889 msquic_strm_cb: quic_strm_cb triggered! 2 conn 0x5578d4ff50 strm 0x7f9c000b70
2024-02-07 04:57:18 [3005] DEBUG ../nanomq/bridge.c:1159 bridge_send_cb: bridge to mqtt-quic://10.42.0.1:14567 msg sent
SEND ^^^^ ctx3 ^^^^
2024-02-07 04:57:18 [3002] DEBUG ../nanomq/pub_handler.c:1286 free_pub_packet: free topic
2024-02-07 04:57:18 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:892 msquic_strm_cb: QUIC_STREAM_EVENT_SEND_COMPLETE!
2024-02-07 04:57:18 [3002] DEBUG ../nanomq/pub_handler.c:1293 free_pub_packet: free properties
2024-02-07 04:57:18 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:409 quic_stream_cb: [quic cb] start 2
2024-02-07 04:57:18 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:609 quic_stream_dowrite: [quic dowrite] start 0x7f9c000b70
2024-02-07 04:57:18 [3002] DEBUG ../nanomq/pub_handler.c:1302 free_pub_packet: free payload
2024-02-07 04:57:18 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:469 quic_stream_cb: [quic cb] end
2024-02-07 04:57:18 [3002] DEBUG ../nanomq/pub_handler.c:1308 free_pub_packet: free pub_packet
2024-02-07 04:57:18 [3002] DEBUG ../nanomq/pub_handler.c:88 init_pipe_content: pub_handler: init pipe_info
2024-02-07 04:57:18 [3002] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 3 ########
2024-02-07 04:57:18 [3002] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:973 nano_ctx_recv: nano_ctx_recv start 0x5578d77420
2024-02-07 04:57:19 [3009] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:635 tcptran_pipe_recv_cb: tcptran_pipe_recv_cb 0x7f9c001f90
2024-02-07 04:57:19 [3009] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:658 tcptran_pipe_recv_cb: newly recevied 2 totoal received: 2
2024-02-07 04:57:19 [3009] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:709 tcptran_pipe_recv_cb: pipe 0x7f9c001f90 header got: 30 13 0 4 4d, 21!!
2024-02-07 04:57:19 [3009] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:635 tcptran_pipe_recv_cb: tcptran_pipe_recv_cb 0x7f9c001f90
2024-02-07 04:57:19 [3009] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:658 tcptran_pipe_recv_cb: newly recevied 19 totoal received: 21
2024-02-07 04:57:19 [3009] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:764 tcptran_pipe_recv_cb: The type of msg is 30
2024-02-07 04:57:19 [3009] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1049 nano_pipe_recv_cb: ######### nano_pipe_recv_cb #########
2024-02-07 04:57:19 [3009] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1584 tcptran_pipe_recv_start: *** tcptran_pipe_recv_start ***
2024-02-07 04:57:19 [3009] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1207 nano_pipe_recv_cb: currently processing pipe_id: 136942251
2024-02-07 04:57:19 [3009] DEBUG ../nanomq/apps/broker.c:300 server_cb: RECV ^^^^ ctx4 ^^^^
2024-02-07 04:57:19 [3009] DEBUG ../nanomq/pub_handler.c:1540 decode_pub_message: cmd: 3, retain: 0, qos: 0, dup: 0, remaining length: 19
2024-02-07 04:57:19 [3009] DEBUG ../nanomq/pub_handler.c:1588 decode_pub_message: topic: [abc/123], len: [7], qos: 0
2024-02-07 04:57:19 [3009] DEBUG ../nng/src/supplemental/mqtt/mqtt_codec.c:3907 decode_buf_properties: remain len 19 prop len 2 curpos 0x7f8c00154a endpos 0x7f8c00154c
2024-02-07 04:57:19 [3009] TRACE ../nng/src/supplemental/mqtt/mqtt_codec.c:3645 property_parse: id: 1, value: 0 (U8)
2024-02-07 04:57:19 [3009] DEBUG ../nanomq/pub_handler.c:1610 decode_pub_message: property len: 2
2024-02-07 04:57:19 [3009] DEBUG ../nanomq/pub_handler.c:1633 decode_pub_message: used pos: [12]
2024-02-07 04:57:19 [3009] DEBUG ../nanomq/pub_handler.c:1645 decode_pub_message: payload: [acde
dd], len = 7
2024-02-07 04:57:19 [3009] TRACE ../nanomq/pub_handler.c:1111 handle_pub: len: 7, topic: abc/123
2024-02-07 04:57:19 [3009] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:734 collect_clients: Searching client: abc
2024-02-07 04:57:19 [3009] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:754 collect_clients: Searching client: abc
2024-02-07 04:57:19 [3009] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:756 collect_clients: add node_t: abc
2024-02-07 04:57:19 [3009] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:734 collect_clients: Searching client: 123
2024-02-07 04:57:19 [3009] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:737 collect_clients: Searching client: 123
2024-02-07 04:57:19 [3009] DEBUG ../nanomq/pub_handler.c:1190 handle_pub: pipe_info size: [1]
2024-02-07 04:57:19 [3009] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1213 nano_pipe_recv_cb: 2024-02-07 04:57:19 [3007] DEBUG ../nanomq/apps/broker.c:548 server_cb: WAIT ^^^^ ctx4 ^^^^
end of nano_pipe_recv_cb 0x5578d776f0
2024-02-07 04:57:19 [3007] TRACE ../nanomq/apps/broker.c:558 server_cb: total pipes: 1
2024-02-07 04:57:19 [3009] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:895 tcptran_pipe_recv_cb: end of tcptran_pipe_recv_cb: synch! 0x7f9c001f90
2024-02-07 04:57:19 [3007] DEBUG ../nanomq/pub_handler.c:1351 encode_pub_message: start encode message
2024-02-07 04:57:19 [3007] DEBUG ../nanomq/pub_handler.c:1388 encode_pub_message: after topic and id len in msg already [9]
2024-02-07 04:57:19 [3007] DEBUG ../nanomq/pub_handler.c:1448 encode_pub_message: after payload len in msg already [39]
2024-02-07 04:57:19 [3007] DEBUG ../nanomq/pub_handler.c:1458 encode_pub_message: header len [2] remain len [39]
2024-02-07 04:57:19 [3007] DEBUG ../nanomq/pub_handler.c:1510 encode_pub_message: end encode message
2024-02-07 04:57:19 [3007] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:375 nano_ctx_send: #### nano_ctx_send with ctx 0x5578d776f0 msg type 30 ####
2024-02-07 04:57:19 [3007] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:390 nano_ctx_send: ******** working with pipe id : 136942251 ctx ********
2024-02-07 04:57:19 [3007] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1504 tcptran_pipe_send: ########### tcptran_pipe_send ###########
2024-02-07 04:57:19 [3007] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1463 tcptran_pipe_send_start: ########### tcptran_pipe_send_start ###########
2024-02-07 04:57:19 [3007] DEBUG ../nanomq/bridge.c:202 bridge_publish_msg: bridge: publish to 'abc/123'
2024-02-07 04:57:19 [3003] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:544 nmq_tcptran_pipe_send_cb: ############### nmq_tcptran_pipe_send_cb [0x7f9c001f90] ################
2024-02-07 04:57:19 [3007] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:609 quic_stream_dowrite: [quic dowrite] start 0x7f9c000b70
2024-02-07 04:57:19 [3003] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:560 nmq_tcptran_pipe_send_cb: tcp socket sent 41 bytes iov 0
2024-02-07 04:57:19 [3003] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1463 tcptran_pipe_send_start: ########### tcptran_pipe_send_start ###########
2024-02-07 04:57:19 [3007] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:628 quic_stream_dowrite: buf0 sz 2
2024-02-07 04:57:19 [3003] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1473 tcptran_pipe_send_start: aio not functioning
2024-02-07 04:57:19 [3007] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:628 quic_stream_dowrite: 2024-02-07 04:57:19 [3003] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:916 nano_pipe_send_cb: ******** nano_pipe_send_cb 136942251 ****
buf1 sz 39
2024-02-07 04:57:19 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:889 msquic_strm_cb: 2024-02-07 04:57:19 [3008] DEBUG ../nanomq/bridge.c:1159 bridge_send_cb: quic_strm_cb triggered! 2 conn 0x5578d4ff50 strm 0x7f9c000b70bridge to mqtt-quic://10.42.0.1:14567 msg sent
2024-02-07 04:57:19 [3007] DEBUG ../nanomq/apps/broker.c:627 server_cb: SEND ^^^^ ctx4 ^^^^
2024-02-07 04:57:19 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:892 msquic_strm_cb: QUIC_STREAM_EVENT_SEND_COMPLETE!
2024-02-07 04:57:19 [3007] DEBUG ../nanomq/pub_handler.c:1286 free_pub_packet: free topic
2024-02-07 04:57:19 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:409 quic_stream_cb: [quic cb] start 2
2024-02-07 04:57:19 [3007] DEBUG ../nanomq/pub_handler.c:1293 free_pub_packet: free properties
2024-02-07 04:57:19 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:609 quic_stream_dowrite: [quic dowrite] start 0x7f9c000b70
2024-02-07 04:57:19 [3007] DEBUG ../nanomq/pub_handler.c:1302 free_pub_packet: free payload
2024-02-07 04:57:19 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:469 quic_stream_cb: [quic cb] end
2024-02-07 04:57:19 [3007] DEBUG ../nanomq/pub_handler.c:1308 free_pub_packet: free pub_packet
2024-02-07 04:57:19 [3007] DEBUG ../nanomq/pub_handler.c:88 init_pipe_content: pub_handler: init pipe_info
2024-02-07 04:57:19 [3007] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 4 ########
2024-02-07 04:57:19 [3007] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:973 nano_ctx_recv: nano_ctx_recv start 0x5578d776f0
2024-02-07 04:57:31 [3003] DEBUG ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:235 nano_pipe_timer_cb: check pipe keepalive interval 60 backoff -75000.000000, ka 0
2024-02-07 04:57:39 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:760 msquic_connection_cb: msquic_connection_cb triggered! 2
2024-02-07 04:57:39 [3020] WARN ../nng/src/supplemental/quic/msquic_dial.c:799 msquic_connection_cb: [conn][0x5578d73fe0] QUIC_CONNECTION_EVENT_SHUTDOWN_INITIATED_BY_PEER, 0x0
2024-02-07 04:57:39 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:889 msquic_strm_cb: quic_strm_cb triggered! 6 conn 0x5578d4ff50 strm 0x7f9c000b70
2024-02-07 04:57:39 [3020] WARN ../nng/src/supplemental/quic/msquic_dial.c:1001 msquic_strm_cb: [strm][0x7f9c000b70] QUIC_STREAM_EVENT_SEND_SHUTDOWN_COMPLETE.
2024-02-07 04:57:39 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:889 msquic_strm_cb: quic_strm_cb triggered! 7 conn 0x5578d4ff50 strm 0x7f9c000b70
2024-02-07 04:57:39 [3020] WARN ../nng/src/supplemental/quic/msquic_dial.c:1007 msquic_strm_cb: [strm][0x7f9c000b70] QUIC_STREAM_EVENT shutdown: All done.
2024-02-07 04:57:39 [3020] INFO ../nng/src/supplemental/quic/msquic_dial.c:1009 msquic_strm_cb: close stream with Error Code: 0
2024-02-07 04:57:39 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:409 quic_stream_cb: [quic cb] start 7
2024-02-07 04:57:39 [3020] INFO ../nng/src/supplemental/quic/msquic_dial.c:1281 msquic_strm_fini: stream 0x7f9c000b70 fini
2024-02-07 04:57:39 [3020] DEBUG ../nng/src/supplemental/quic/msquic_dial.c:469 quic_stream_cb: [quic cb] end
2024-02-07 04:57:39 [3008] INFO ../nng/src/mqtt/protocol/mqtt/mqttv5_quic_client.c:724 mqtt_quic_recv_cb: nni pipe close!
2024-02-07 04:57:39 [3008] ERROR ../nanomq/apps/broker.c:104 sig_handler: signal signumber: 11 received!
```
</details>
| Nanomq instability when EMQX QUIC bridge is not connected | https://api.github.com/repos/nanomq/nanomq/issues/1665/comments | 5 | 2024-02-07T05:20:46Z | 2024-02-22T05:25:37Z | https://github.com/nanomq/nanomq/issues/1665 | 2,122,213,022 | 1,665 |
[
"emqx",
"nanomq"
] | **Describe the bug**
A clear and concise description of what the bug is.
version num not changed (still 0.21.1-3) in release 0.21.2
in file include/version.h
#define NANO_VER_MAJOR 0
#define NANO_VER_MINOR 21
#define NANO_VER_PATCH 1
#define NANO_VER_ID_SHORT "3"
**Expected behavior**
A clear and concise description of what you expected to happen.
Update version to 0.21.2
**Actual Behavior**
Describe what occurred.
**To Reproduce**
If possible include actual reproduction test code here.
Minimal C test cases are perferred.
nanomq -v
**Environment Details**
- NanoMQ version: release 0.21.2
- Operating system and version
- Compiler and language used
- testing scenario
**Client SDK**
If possible include the mqtt sdk you used to connect to nanomq
Minimal C test cases are perferred.
**Additional context**
Add any other context about the problem here.
| nanomq version num incorrect | https://api.github.com/repos/nanomq/nanomq/issues/1664/comments | 1 | 2024-02-07T02:11:52Z | 2024-02-26T08:17:58Z | https://github.com/nanomq/nanomq/issues/1664 | 2,122,021,293 | 1,664 |
[
"emqx",
"nanomq"
] | **Describe the bug**
It seems like for some reason sqlite data is not being saved into the db.
**Expected behavior**
Sqlite data should be persisted in the db using the rule engine.
**Actual Behavior**
The rule engine creates the table and initializes the columns correctly, but never writes message data.
**To Reproduce**
```
rules.sqlite {
# # SQLite3 database path
# # Rule engine db path, default is exec path.
# #
# # Value: File
path = "/var/log/nanomq_backup.db"
rules = [
{
# # sql
# # Rule engine sql clause.
# #
# # Value: String
sql = "SELECT * FROM *" # ***
# # SQLite3 database table name
# # Rule engine db table name.
# #
# # Value: String
table = broker
}
]
}
```
**Environment Details**
- NanoMQ version `0.21.1-full (docker)`
- Operating system and version `NixOS`
- Compiler and language used n/a
- testing scenario (using conf above on docker, reading the db file using `sqlitebrowser`)
**Additional context**
This statement is being saved to the db file, by the looks of it correctly.
`CREATE TABLE broker(RowId INTEGER PRIMARY KEY AUTOINCREMENT, Qos INT, Id INT, Topic TEXT, Clientid TEXT, Username TEXT, Password TEXT, Timestamp INT, Payload TEXT)`
Additionally, if I make an error in the `sql=` syntax the log of nanomq reports such an error. When the sql is correct the logs leave no mention of sql.
| Sqlite persistence not saving messages published on NixOS | https://api.github.com/repos/nanomq/nanomq/issues/1663/comments | 9 | 2024-02-06T20:58:36Z | 2024-03-05T01:06:01Z | https://github.com/nanomq/nanomq/issues/1663 | 2,121,655,124 | 1,663 |
[
"emqx",
"nanomq"
] | log like that..

| mqtt client can't connect | https://api.github.com/repos/nanomq/nanomq/issues/1657/comments | 2 | 2024-02-04T02:47:17Z | 2024-05-09T04:08:22Z | https://github.com/nanomq/nanomq/issues/1657 | 2,116,842,949 | 1,657 |
[
"emqx",
"nanomq"
] | **Describe the bug**
There will be memleak if I duplicate the same configuration.
**To Reproduce**
Write any configuration twice like webhook or http sever.
| MemLeak in parse conf | https://api.github.com/repos/nanomq/nanomq/issues/1652/comments | 2 | 2024-01-31T09:46:32Z | 2024-02-26T08:18:58Z | https://github.com/nanomq/nanomq/issues/1652 | 2,109,691,156 | 1,652 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Sometimes when starting nanomq, from our process manager it hangs and thinks their is a zombie process, killing our process manager and restarting it is able to successfully start nanomq.
**Expected behavior**
We are able to start nanomq on the first try.
**Actual Behavior**
Nanomq shows up as a zombie process in ps and fails to start.
**To Reproduce**
We kill nanomq with this:
`kill(<pid>, SIGINT);`
**Environment Details**
- NanoMQ version: 0.8.3
- Operating system and version: linux
- Compiler and language used: armv7a_gcc_6_5_0
- testing scenario
**Client SDK**
**Additional context**
| Issues with Killing Nanomq From another process sometimes causing a Zombie process. | https://api.github.com/repos/nanomq/nanomq/issues/1639/comments | 6 | 2024-01-26T21:51:35Z | 2024-02-05T03:14:49Z | https://github.com/nanomq/nanomq/issues/1639 | 2,102,952,919 | 1,639 |
[
"emqx",
"nanomq"
] | **Describe the bug**
```
./nanomq_cli/nanomq_cli sub -t topic1 -V 5
connect_cb: mqtt-tcp://127.0.0.1:1883 connect result: 0
disconnected reason : 136
connect_cb: mqtt-tcp://127.0.0.1:1883 connect result: 0
=================================================================
==35178==ERROR: AddressSanitizer: heap-use-after-free on address 0x606000000178 at pc 0x0000004e7cdd bp 0x7f401865bcd0 sp 0x7f401865bcc8
READ of size 8 at 0x606000000178 thread T19
#0 0x4e7cdc in get_properties_len /home/wangha/Documents/nanomq/nng/src/supplemental/mqtt/mqtt_codec.c:3949
#1 0x4e88dc in encode_properties /home/wangha/Documents/nanomq/nng/src/supplemental/mqtt/mqtt_codec.c:4090
#2 0x4d9357 in nni_mqttv5_msg_encode_subscribe /home/wangha/Documents/nanomq/nng/src/supplemental/mqtt/mqtt_codec.c:1137
#3 0x4d44c6 in nni_mqttv5_msg_encode /home/wangha/Documents/nanomq/nng/src/supplemental/mqtt/mqtt_codec.c:195
#4 0x48e8f8 in mqtt_ctx_send /home/wangha/Documents/nanomq/nng/src/mqtt/protocol/mqtt/mqttv5_client.c:1011
#5 0x48bb55 in mqtt_sock_send /home/wangha/Documents/nanomq/nng/src/mqtt/protocol/mqtt/mqttv5_client.c:257
#6 0x475fc8 in nni_sock_send /home/wangha/Documents/nanomq/nng/src/core/socket.c:885
#7 0x452e54 in nng_sendmsg /home/wangha/Documents/nanomq/nng/src/nng.c:235
#8 0x4d3d15 in nng_mqtt_subscribe /home/wangha/Documents/nanomq/nng/src/supplemental/mqtt/mqtt_public.c:971
#9 0x428a51 in connect_cb /home/wangha/Documents/nanomq/nanomq_cli/client.c:1434
#10 0x479c0b in nni_pipe_run_cb /home/wangha/Documents/nanomq/nng/src/core/socket.c:1789
#11 0x479012 in nni_dialer_add_pipe /home/wangha/Documents/nanomq/nng/src/core/socket.c:1588
#12 0x464792 in dialer_connect_cb /home/wangha/Documents/nanomq/nng/src/core/dialer.c:383
#13 0x47c95c in nni_taskq_thread /home/wangha/Documents/nanomq/nng/src/core/taskq.c:50
#14 0x47dbf8 in nni_thr_wrap /home/wangha/Documents/nanomq/nng/src/core/thread.c:94
#15 0x485b8d in nni_plat_thr_main /home/wangha/Documents/nanomq/nng/src/platform/posix/posix_thread.c:266
#16 0x7f402f6ae946 in start_thread (/lib64/libc.so.6+0x8c946) (BuildId: f888be5f5e7d58e04cabb8c675c7ab94e77dd68c)
#17 0x7f402f73485f in __clone3 (/lib64/libc.so.6+0x11285f) (BuildId: f888be5f5e7d58e04cabb8c675c7ab94e77dd68c)
0x606000000178 is located 56 bytes inside of 64-byte region [0x606000000140,0x606000000180)
freed by thread T14 here:
#0 0x7f40306d7fb8 (/lib64/libasan.so.8+0xd7fb8) (BuildId: 542ad02088f38edfdba9d4bfa465b2299f512d3e)
#1 0x4e73be in property_free /home/wangha/Documents/nanomq/nng/src/supplemental/mqtt/mqtt_codec.c:3848
#2 0x4d5308 in mqtt_msg_content_free /home/wangha/Documents/nanomq/nng/src/supplemental/mqtt/mqtt_codec.c:377
#3 0x4d55a3 in nni_mqtt_msg_free /home/wangha/Documents/nanomq/nng/src/supplemental/mqtt/mqtt_codec.c:427
#4 0x46cff5 in nni_msg_free /home/wangha/Documents/nanomq/nng/src/core/message.c:463
#5 0x527783 in mqtt_tcptran_pipe_send_cb /home/wangha/Documents/nanomq/nng/src/mqtt/transport/tcp/mqtt_tcp.c:598
#6 0x47c95c in nni_taskq_thread /home/wangha/Documents/nanomq/nng/src/core/taskq.c:50
#7 0x47dbf8 in nni_thr_wrap /home/wangha/Documents/nanomq/nng/src/core/thread.c:94
#8 0x485b8d in nni_plat_thr_main /home/wangha/Documents/nanomq/nng/src/platform/posix/posix_thread.c:266
#9 0x7f402f6ae946 in start_thread (/lib64/libc.so.6+0x8c946) (BuildId: f888be5f5e7d58e04cabb8c675c7ab94e77dd68c)
previously allocated by thread T0 here:
#0 0x7f40306d8cc7 in calloc (/lib64/libasan.so.8+0xd8cc7) (BuildId: 542ad02088f38edfdba9d4bfa465b2299f512d3e)
#1 0x481aad in nni_zalloc /home/wangha/Documents/nanomq/nng/src/platform/posix/posix_alloc.c:26
#2 0x4e572a in property_alloc /home/wangha/Documents/nanomq/nng/src/supplemental/mqtt/mqtt_codec.c:3480
#3 0x4d2c64 in mqtt_property_alloc /home/wangha/Documents/nanomq/nng/src/supplemental/mqtt/mqtt_public.c:727
#4 0x4251e0 in properties_classify /home/wangha/Documents/nanomq/nanomq_cli/client.c:878
#5 0x429bb3 in client /home/wangha/Documents/nanomq/nanomq_cli/client.c:1596
#6 0x42a194 in subscribe_start /home/wangha/Documents/nanomq/nanomq_cli/client.c:1678
#7 0x43a9c3 in main /home/wangha/Documents/nanomq/nanomq_cli/main.c:112
#8 0x7f402f649b89 in __libc_start_call_main (/lib64/libc.so.6+0x27b89) (BuildId: f888be5f5e7d58e04cabb8c675c7ab94e77dd68c)
#9 0x7f402f649c4a in __libc_start_main_alias_2 (/lib64/libc.so.6+0x27c4a) (BuildId: f888be5f5e7d58e04cabb8c675c7ab94e77dd68c)
#10 0x41ef84 in _start (/home/wangha/Documents/nanomq/build/nanomq_cli/nanomq_cli+0x41ef84) (BuildId: 31c52caf19ff0398e1dd2dd5ced842281c78bb09)
Thread T19 created by T0 here:
#0 0x7f4030648956 in pthread_create (/lib64/libasan.so.8+0x48956) (BuildId: 542ad02088f38edfdba9d4bfa465b2299f512d3e)
#1 0x485c86 in nni_plat_thr_init /home/wangha/Documents/nanomq/nng/src/platform/posix/posix_thread.c:279
#2 0x47de9b in nni_thr_init /home/wangha/Documents/nanomq/nng/src/core/thread.c:121
#3 0x47cc77 in nni_taskq_init /home/wangha/Documents/nanomq/nng/src/core/taskq.c:95
#4 0x47d904 in nni_taskq_sys_init /home/wangha/Documents/nanomq/nng/src/core/taskq.c:287
#5 0x467f20 in nni_init_helper /home/wangha/Documents/nanomq/nng/src/core/init.c:35
#6 0x485f8d in nni_plat_init /home/wangha/Documents/nanomq/nng/src/platform/posix/posix_thread.c:422
#7 0x467f8a in nni_init /home/wangha/Documents/nanomq/nng/src/core/init.c:57
#8 0x474c8c in nni_sock_open /home/wangha/Documents/nanomq/nng/src/core/socket.c:638
#9 0x4b61b1 in nni_proto_open /home/wangha/Documents/nanomq/nng/src/sp/protocol.c:22
#10 0x48edc6 in nng_mqttv5_client_open /home/wangha/Documents/nanomq/nng/src/mqtt/protocol/mqtt/mqttv5_client.c:1171
#11 0x429319 in create_client /home/wangha/Documents/nanomq/nanomq_cli/client.c:1520
#12 0x42a0c4 in client /home/wangha/Documents/nanomq/nanomq_cli/client.c:1635
#13 0x42a194 in subscribe_start /home/wangha/Documents/nanomq/nanomq_cli/client.c:1678
#14 0x43a9c3 in main /home/wangha/Documents/nanomq/nanomq_cli/main.c:112
#15 0x7f402f649b89 in __libc_start_call_main (/lib64/libc.so.6+0x27b89) (BuildId: f888be5f5e7d58e04cabb8c675c7ab94e77dd68c)
#16 0x7f402f649c4a in __libc_start_main_alias_2 (/lib64/libc.so.6+0x27c4a) (BuildId: f888be5f5e7d58e04cabb8c675c7ab94e77dd68c)
#17 0x41ef84 in _start (/home/wangha/Documents/nanomq/build/nanomq_cli/nanomq_cli+0x41ef84) (BuildId: 31c52caf19ff0398e1dd2dd5ced842281c78bb09)
Thread T14 created by T0 here:
#0 0x7f4030648956 in pthread_create (/lib64/libasan.so.8+0x48956) (BuildId: 542ad02088f38edfdba9d4bfa465b2299f512d3e)
#1 0x485c86 in nni_plat_thr_init /home/wangha/Documents/nanomq/nng/src/platform/posix/posix_thread.c:279
#2 0x47de9b in nni_thr_init /home/wangha/Documents/nanomq/nng/src/core/thread.c:121
#3 0x47cc77 in nni_taskq_init /home/wangha/Documents/nanomq/nng/src/core/taskq.c:95
#4 0x47d904 in nni_taskq_sys_init /home/wangha/Documents/nanomq/nng/src/core/taskq.c:287
#5 0x467f20 in nni_init_helper /home/wangha/Documents/nanomq/nng/src/core/init.c:35
#6 0x485f8d in nni_plat_init /home/wangha/Documents/nanomq/nng/src/platform/posix/posix_thread.c:422
#7 0x467f8a in nni_init /home/wangha/Documents/nanomq/nng/src/core/init.c:57
#8 0x474c8c in nni_sock_open /home/wangha/Documents/nanomq/nng/src/core/socket.c:638
#9 0x4b61b1 in nni_proto_open /home/wangha/Documents/nanomq/nng/src/sp/protocol.c:22
#10 0x48edc6 in nng_mqttv5_client_open /home/wangha/Documents/nanomq/nng/src/mqtt/protocol/mqtt/mqttv5_client.c:1171
#11 0x429319 in create_client /home/wangha/Documents/nanomq/nanomq_cli/client.c:1520
#12 0x42a0c4 in client /home/wangha/Documents/nanomq/nanomq_cli/client.c:1635
#13 0x42a194 in subscribe_start /home/wangha/Documents/nanomq/nanomq_cli/client.c:1678
#14 0x43a9c3 in main /home/wangha/Documents/nanomq/nanomq_cli/main.c:112
#15 0x7f402f649b89 in __libc_start_call_main (/lib64/libc.so.6+0x27b89) (BuildId: f888be5f5e7d58e04cabb8c675c7ab94e77dd68c)
#16 0x7f402f649c4a in __libc_start_main_alias_2 (/lib64/libc.so.6+0x27c4a) (BuildId: f888be5f5e7d58e04cabb8c675c7ab94e77dd68c)
#17 0x41ef84 in _start (/home/wangha/Documents/nanomq/build/nanomq_cli/nanomq_cli+0x41ef84) (BuildId: 31c52caf19ff0398e1dd2dd5ced842281c78bb09)
SUMMARY: AddressSanitizer: heap-use-after-free /home/wangha/Documents/nanomq/nng/src/supplemental/mqtt/mqtt_codec.c:3949 in get_properties_len
Shadow bytes around the buggy address:
0x605ffffffe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x605fffffff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x605fffffff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x606000000000: fa fa fa fa fd fd fd fd fd fd fd fa fa fa fa fa
0x606000000080: fd fd fd fd fd fd fd fd fa fa fa fa 00 00 00 00
=>0x606000000100: 00 00 00 00 fa fa fa fa fd fd fd fd fd fd fd[fd]
0x606000000180: fa fa fa fa 00 00 00 00 00 00 00 00 fa fa fa fa
0x606000000200: 00 00 00 00 00 00 00 00 fa fa fa fa fa fa fa fa
0x606000000280: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x606000000300: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x606000000380: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==35178==ABORTING
```
**To Reproduce**
1. start nanomq
2. start nanomq_cli sub
3. restart nanomq
| Nanomq_cli heap-use-after-free when broker restart. | https://api.github.com/repos/nanomq/nanomq/issues/1634/comments | 0 | 2024-01-25T09:02:33Z | 2024-02-07T11:46:32Z | https://github.com/nanomq/nanomq/issues/1634 | 2,099,897,720 | 1,634 |
[
"emqx",
"nanomq"
] | 测试的时候发现:
1、连接时,可以跑到auth,这部分正常
2、无法跑到super_req这个,请问这个接口是何时才会被调用?
3、使用MQTTX工具进行发布订阅时,都无法跑进acl接口,是否需求其他配置



具体的日志:[nanomq.log](https://github.com/nanomq/nanomq/files/14048602/nanomq.log)
nanomq版本:
用的docker镜像:emqx/nanomq:latest

| Feature Request: HTTP Interface of acl_req | https://api.github.com/repos/nanomq/nanomq/issues/1633/comments | 4 | 2024-01-25T08:00:10Z | 2024-07-17T07:36:49Z | https://github.com/nanomq/nanomq/issues/1633 | 2,099,794,818 | 1,633 |
[
"emqx",
"nanomq"
] | **Question**
Can retained messages be persisted so that they are still available after a nanomq Broker restart?
**Environment Details**
- NanoMQ v0.20.8-4
- Windows Server 2019
| Retained messages behavior at broker restart | https://api.github.com/repos/nanomq/nanomq/issues/1632/comments | 11 | 2024-01-24T17:25:58Z | 2024-01-31T06:46:17Z | https://github.com/nanomq/nanomq/issues/1632 | 2,098,748,163 | 1,632 |
[
"emqx",
"nanomq"
] | **Question**
Is the DLL libwinpthread-1.dll required for operation on Windows? I cannot see that the DLL is loaded in processexplorer.

**Environment Details**
- NanoMQ v0.20.8-4
- Windows 10
| Windows: Is the libwinpthread-1.dll necessary for running nanomq broker | https://api.github.com/repos/nanomq/nanomq/issues/1631/comments | 2 | 2024-01-24T14:40:47Z | 2024-01-25T08:54:37Z | https://github.com/nanomq/nanomq/issues/1631 | 2,098,418,633 | 1,631 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Error occurs when using internal IP addresses in URLs for the HTTP authentication feature.
When using internal IP addresses, Node.js returns a 400 status without the request being processed, most probably because of an error in the request header. When using fully qualified domain names or outside IP addresses, the requests are processed without a problem.
**To Reproduce**
1) Clean install NanoMQ
2) Add to configuration:
http_auth = {
auth_req {
url = "http://10.1.0.1:8080/nanomq/auth/"
method = "post"
headers.content-type = "application/json"
params = {username="%u",password="%P"}
}
}
3) On the machine 10.1.0.1 initialize a Node.js app and edit index.js:
require('http').createServer({maxHeaderSize:64000},function(request,response,error){
if (error) console.log("ERROR:",error);
const bodyStream = [];
response.on("error", (error) => {
console.log("ERROR:", error);
response.statusCode = 500;
return response.end();
});
request.on("data",(chunk)=>{
bodyStream.push(chunk);
}).on('end',()=>{
const bufferData = Buffer.concat(bodyStream);
const requestBody = JSON.parse(bufferData) || {};
console.log("BODY:",requestBody);
});
response.statusCode=200;
response.end();
}).listen(8080,"0.0.0.0",()=>{console.log("LOG: server started")});
4) Run Node app on 10.1.0.1
5) Tail the log of NanoMQ and look for this error:
ERROR /home/runner/work/nanomq/nanomq/nng/src/sp/protocol/mqtt/auth_http.c:314 send_request: HTTP Server Responded: 400 Bad Request
6) Notice also that request do not reach processing in Node.js
**Environment Details**
- NanoMQ version: v0.20.8-4
- Operating system and version: Debian 11
- Web server: Node.js v12.22.12
**Additional context**
Problem occurs with Node.js only. PHP processes the requests without problem.
Problem persists also when using the same server and 127.0.0.1 in the auth_req URL.
After reading about oversize headers and Node.js, I added the maxHeaderSize:64000 option to rule out this as the source of the problem. | HTTP authentication requests with local IP addresses in URL makes Node.js respond with bad request | https://api.github.com/repos/nanomq/nanomq/issues/1625/comments | 7 | 2024-01-23T18:34:43Z | 2024-02-06T17:38:10Z | https://github.com/nanomq/nanomq/issues/1625 | 2,096,734,039 | 1,625 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Two client connected with the same client id
**Expected behavior**
Close the previous connection before a new connection with same client id created.
**Actual Behavior**
Two client can be connected.
**To Reproduce**
1. Start broker: nanomq start
2. Client1 connet with MQTTX, clientid: mqttx_1234
3. Client2 connet with MQTTX, clientid: mqttx_1234
**Environment Details**
- NanoMQ nanomq-0.19.5-linux-armhf-sqlite.deb
- Operating system and version: STOpenLinux
**Client SDK**
MQTTX
SSL/TLS disabled
**Additional context**
| Clientid not checked when create new client connection | https://api.github.com/repos/nanomq/nanomq/issues/1619/comments | 3 | 2024-01-22T06:52:53Z | 2024-01-25T08:11:34Z | https://github.com/nanomq/nanomq/issues/1619 | 2,093,215,432 | 1,619 |
[
"emqx",
"nanomq"
] | **Is your feature request related to a problem? Please describe.**
很多时候客户端只能订阅指定topic。所以在 `nanomq_acl.conf` 里设置权限时,topics 可以像HTTP认证里一样,可以放一些占位符吗?
比如所有客户端都能订阅 : `/device/%c/` 主题。其中 [%c] 为当前登录的client id
**Describe the solution you'd like**
`nanomq_acl.conf` 里的 topics增加各种占位符。

| Feature : Add placeholder symbol to ACL rules. | https://api.github.com/repos/nanomq/nanomq/issues/1618/comments | 5 | 2024-01-21T10:27:49Z | 2024-07-22T06:22:17Z | https://github.com/nanomq/nanomq/issues/1618 | 2,092,522,927 | 1,618 |
[
"emqx",
"nanomq"
] | publish msg via HTTP API to trigger bridge would cause crash. | bridge aio overflow | https://api.github.com/repos/nanomq/nanomq/issues/1616/comments | 0 | 2024-01-19T12:24:01Z | 2024-01-22T07:56:13Z | https://github.com/nanomq/nanomq/issues/1616 | 2,090,448,128 | 1,616 |
[
"emqx",
"nanomq"
] | **Is your feature request related to a problem? Please describe.**
Unmatched CycloneDDS version may lead communication error.
**Describe the solution you'd like**
Check the version of cyclonedds based and the real version in the system before starting ddsproxy
| Check version of cyclonedds ddsproxy is using. | https://api.github.com/repos/nanomq/nanomq/issues/1611/comments | 0 | 2024-01-19T09:24:40Z | 2024-01-19T12:27:59Z | https://github.com/nanomq/nanomq/issues/1611 | 2,090,061,186 | 1,611 |
[
"emqx",
"nanomq"
] | null | nanomq stop cmd does not work. | https://api.github.com/repos/nanomq/nanomq/issues/1610/comments | 0 | 2024-01-19T09:10:19Z | 2024-01-19T12:26:09Z | https://github.com/nanomq/nanomq/issues/1610 | 2,090,030,466 | 1,610 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Nanomq segfaults (with debug on/off, quic on/off, shared lib off) when connected to paho-mqtt rust in target environment (aarch64).
Nanomq is fine with a host build (x86_64) when connected to host or target paho-mqtt.
Nanomq does not segfault with MQTTX test runs, only paho-mqtt generated connections.
More info, also opened in nanonngL https://github.com/nanomq/NanoNNG/issues/812.
**Expected behavior**
No segmentation fault.
**Actual Behavior**
A segmentation fault.
**To Reproduce**
Build with `-Os` on aarch64. **Building with `-O1` and `-O0` does have the issue.**
**Environment Details**
- NanoMQ version past 0.20.8 (sha 9828d7b0c432d9495c5f940d75df0a621203b814). I can bump the version to whatever however the code that failed has not been touched in a while.
- Operating system and version (aarch64 buildroot)
- Compiler and language used (gcc v13)
- testing scenario (connect with paho-mqtt)
**Client SDK**
paho-mqtt
**Additional context**
```
(gdb) bt full
#0 get_var_integer (buf=buf@entry=0x7f780012a2 "\340", pos=pos@entry=0x7f9129e710) at ../nng/src/sp/protocol/mqtt/mqtt_parser.c:174
temp = <optimized out>
result = 0
p = 2013270640
i = 0
#1 0x00000055910a3cc4 in fixed_header_adaptor (packet=packet@entry=0x7f780012a2 "\340", dst=dst@entry=0x7f680013b0) at ../nng/src/sp/protocol/mqtt/mqtt_parser.c:414
m = 0x7f680013b0
rv = <optimized out>
len = <optimized out>
pos = 547474117232
#2 0x0000005591165924 in tcptran_pipe_recv_cb (arg=0x7f78001270) at ../nng/src/sp/transport/mqtt/broker_tcp.c:726
aio = 0x7f70001a80
iov = {{iov_buf = 0x2, iov_len = 547887841280}, {iov_buf = 0x7f9129f1a0, iov_len = 547887841280}}
type = 224 '\340'
rv = <optimized out>
pos = 2
len = 0
n = 0
msg = 0x7f680013b0
qmsg = 0x55c0b19ad8
p = 0x7f78001270
rxaio = 0x7f78001980
cparam = 0x7f700013e0
ack = false
__FUNCTION__ = "tcptran_pipe_recv_cb"
packet_id = 49329
reason_code = 154 '\232'
prop = 0x55c0b23b78
ack_cmd = <optimized out>
#3 0x000000559109403c in nni_taskq_thread (self=<optimized out>) at ../nng/src/core/taskq.c:50
thr = <optimized out>
tq = 0x55c0b19ac0
task = 0x7f780019a0
#4 0x0000005591094704 in nni_thr_wrap (arg=0x55c0b19ce8) at ../nng/src/core/thread.c:94
thr = 0x55c0b19ce8
start = 1
#5 0x00000055910969dc in nni_plat_thr_main (arg=0x55c0b19ce8) at ../nng/src/platform/posix/posix_thread.c:266
thr = 0x55c0b19ce8
set = {__val = {4096, 0 <repeats 15 times>}}
#6 0x0000007f94b90ce4 in ?? () from /lib64/libc.so.6
No symbol table info available.
#7 0x0000007f94bf6b8c in ?? () from /lib64/libc.so.6
No symbol table info available.
```
```
==3403== Thread 8 nng:task:
==3403== Use of uninitialised value of size 8
==3403== at 0x14B88C: get_var_integer (mqtt_parser.c:174)
==3403== by 0x14BCC3: fixed_header_adaptor (mqtt_parser.c:414)
==3403== by 0x20D923: tcptran_pipe_recv_cb (broker_tcp.c:726)
==3403== by 0x13C03B: nni_taskq_thread (taskq.c:50)
==3403== by 0x13C703: nni_thr_wrap (thread.c:94)
==3403== by 0x13E9DB: nni_plat_thr_main (posix_thread.c:266)
==3403== by 0x4BD0CE3: ??? (in /lib/libc.so.6)
==3403== by 0x4C3699B: ??? (in /lib/libc.so.6)
==3403== Uninitialised value was created by a stack allocation
==3403== at 0x14BC90: fixed_header_adaptor (mqtt_parser.c:407)
==3403==
```
```
(gdb) disas
Dump of assembler code for function get_var_integer:
0x0000005592090168 <+0>: ldr w3, [x1]
0x000000559209016c <+4>: mov x5, x0
0x0000005592090170 <+8>: mov w4, #0x0 // #0
0x0000005592090174 <+12>: mov w0, #0x0 // #0
=> 0x0000005592090178 <+16>: ldrb w7, [x5, w3, uxtw]
0x000000559209017c <+20>: mov w6, #0x0 // #0
0x0000005592090180 <+24>: mov x2, #0x1 // #1
0x0000005592090184 <+28>: and w8, w7, #0x7f
0x0000005592090188 <+32>: add w6, w6, #0x1
0x000000559209018c <+36>: lsl x2, x2, #7
0x0000005592090190 <+40>: cmp w6, w4
0x0000005592090194 <+44>: b.ls 0x5592090188 <get_var_integer+32> // b.plast
0x0000005592090198 <+48>: lsr x2, x2, #7
0x000000559209019c <+52>: add w3, w3, #0x1
0x00000055920901a0 <+56>: madd w0, w8, w2, w0
0x00000055920901a4 <+60>: tbz w7, #7, 0x55920901b4 <get_var_integer+76>
0x00000055920901a8 <+64>: add w4, w4, #0x1
0x00000055920901ac <+68>: cmp w4, #0x5
0x00000055920901b0 <+72>: b.ne 0x5592090178 <get_var_integer+16> // b.any
0x00000055920901b4 <+76>: str w3, [x1]
0x00000055920901b8 <+80>: ret
End of assembler dump.
```
Nanomq logs:
<details>
<summary></summary>
```
2024-01-13 20:04:50 [3354] TRACE ../nng/src/core/taskq.c:289 nni_taskq_sys_init: result is 8
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1144 print_conf: This NanoMQ instance configured as:
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1147 print_conf: tcp url: nmq-tcp://0.0.0.0:1883
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1150 print_conf: websocket url: nmq-ws://0.0.0.0:8083/mqtt
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1168 print_conf: daemon: false
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1170 print_conf: num_taskq_thread: 8
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1172 print_conf: max_taskq_thread: 8
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1174 print_conf: parallel: 8
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1175 print_conf: property_size: 32
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1176 print_conf: max_packet_size: 10240
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1177 print_conf: client_max_packet_size: 10240
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1179 print_conf: max_mqueue_len: 2048
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1180 print_conf: max_inflight_window: 2048
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1181 print_conf: max_awaiting_rel: 10s
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1182 print_conf: await_rel_timeout: 10s
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1183 print_conf: retry_interval: 10s
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1184 print_conf: keepalive_multiplier: 1250.000000
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1188 print_conf: http server port: 8081
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1189 print_conf: http server limit_conn: 2
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1190 print_conf: http server username: admin
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1192 print_conf: http server auth type: basic
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1200 print_conf: public key file: /etc/certs/jwt/jwtRS256.key.pub
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1220 print_conf: allow_anonymous: true
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1224 print_conf: acl_nomatch: allow
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1226 print_conf: enable_acl_cache: on
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1228 print_conf: acl_cache_max_size: 32
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1230 print_conf: acl_cache_ttl: 60
2024-01-13 20:04:50 [3354] INFO ../nng/src/supplemental/nanolib/conf.c:1231 print_conf: acl_deny_action: ignore
2024-01-13 20:04:50 [3354] INFO ../nanomq/apps/broker.c:1340 store_pid: 3354
2024-01-13 20:04:50 [3354] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:385 dbtree_node_new: New node: []
2024-01-13 20:04:50 [3354] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:385 dbtree_node_new: New node: []
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:912 broker: db init finished
2024-01-13 20:04:50 [3354] DEBUG ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1360 nng_nmq_tcp0_open: open up nmq tcp0 protocol.
2024-01-13 20:04:50 [3354] DEBUG ../nng/src/sp/protocol.c:40 nni_proto_mqtt_open: nng internal init finished! Listener start
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5576d44328 &&&&&&&&&
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:527 nano_sock_init: ************* nano_sock_init 0x5576d44218 *************
2024-01-13 20:04:50 [3354] DEBUG ../nng/src/sp/protocol.c:42 nni_proto_mqtt_open: mqtt socket opened!
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:921 broker: listener init finished
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:927 broker: HTTP service initialization
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:937 broker: HTTP init finished
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:943 broker: webhook init finished
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5576d45e70 &&&&&&&&&
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5576d46250 &&&&&&&&&
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5576d465c0 &&&&&&&&&
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5576d46930 &&&&&&&&&
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5576d46ca0 &&&&&&&&&
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5576d47010 &&&&&&&&&
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5576d47490 &&&&&&&&&
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5576d47800 &&&&&&&&&
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:1027 broker: NanoMQ context initialization
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5576d47b70 &&&&&&&&&
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5576d47ff0 &&&&&&&&&
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5576d48680 &&&&&&&&&
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5576d48b00 &&&&&&&&&
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:270 server_cb: INIT ^^^^^^^^ ctx [1] ^^^^^^^^
2024-01-13 20:04:50 [3354] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 1 ########
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5576d45e70
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:270 server_cb: INIT ^^^^^^^^ ctx [2] ^^^^^^^^
2024-01-13 20:04:50 [3354] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 2 ########
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5576d46250
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:270 server_cb: INIT ^^^^^^^^ ctx [3] ^^^^^^^^
2024-01-13 20:04:50 [3354] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 3 ########
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5576d465c0
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:270 server_cb: INIT ^^^^^^^^ ctx [4] ^^^^^^^^
2024-01-13 20:04:50 [3354] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 4 ########
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5576d46930
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:270 server_cb: INIT ^^^^^^^^ ctx [5] ^^^^^^^^
2024-01-13 20:04:50 [3354] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 5 ########
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5576d46ca0
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:270 server_cb: INIT ^^^^^^^^ ctx [6] ^^^^^^^^
2024-01-13 20:04:50 [3354] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 6 ########
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5576d47010
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:270 server_cb: INIT ^^^^^^^^ ctx [7] ^^^^^^^^
2024-01-13 20:04:50 [3354] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 7 ########
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5576d47490
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:270 server_cb: INIT ^^^^^^^^ ctx [8] ^^^^^^^^
2024-01-13 20:04:50 [3354] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 8 ########
2024-01-13 20:04:50 [3354] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5576d47800
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:273 server_cb: INIT ^^^^^^^^ extra ctx [10] ^^^^^^^^
2024-01-13 20:04:50 [3354] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 10 ########
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:273 server_cb: INIT ^^^^^^^^ extra ctx [12] ^^^^^^^^
2024-01-13 20:04:50 [3354] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 12 ########
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:273 server_cb: INIT ^^^^^^^^ extra ctx [14] ^^^^^^^^
2024-01-13 20:04:50 [3354] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 14 ########
2024-01-13 20:04:50 [3354] DEBUG ../nanomq/apps/broker.c:273 server_cb: INIT ^^^^^^^^ extra ctx [16] ^^^^^^^^
2024-01-13 20:04:50 [3354] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 16 ########
2024-01-13 20:04:50 [3354] INFO ../nanomq/web_server.c:512 start_rest_server: http://0.0.0.0:8081/api/v4
2024-01-13 20:04:50 [3374] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 17 ########
2024-01-13 20:04:50 [3354] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 19 ########
2024-01-13 20:04:50 [3374] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 18 ########
NanoMQ Broker is started successfully!
2024-01-13 20:04:55 [3360] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1583 tcptran_pipe_start: tcptran_pipe_start!
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:297 tcptran_pipe_nego_cb: start tcptran_pipe_nego_cb max len 12 pipe_addr 0x7f50000b70 gotrx 0 wantrx 12
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:297 tcptran_pipe_nego_cb: start tcptran_pipe_nego_cb max len 12 pipe_addr 0x7f50000b70 gotrx 5 wantrx 57
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:567 conn_handler: remaining length: 55
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:578 conn_handler: pro_name: MQTT
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:581 conn_handler: pro_ver: 4
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:589 conn_handler: conn flag:4
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:622 conn_handler: pos after property: [12]
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:642 conn_handler: clientid: [calypso] [7]
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:643 conn_handler: pos after clientid: [21]
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:678 conn_handler: will_topic: Calypso/Status 0
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:679 conn_handler: pos after will topic body: [37]
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:694 conn_handler: will_msg: Calypso is offline 0
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:695 conn_handler: pos after will msg: [57]
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:725 conn_handler: pos: [57] len: [55]
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:177 tcptran_pipe_init: ************ tcptran_pipe_init [0x7f50000b70] ************
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:606 nano_pipe_init: ##########nano_pipe_init###############
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:643 nano_pipe_start: ########## nano_pipe_start ##########
2024-01-13 20:04:55 [3361] DEBUG ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:674 nano_pipe_start: client connected! addr [127.0.0.1 port [27837]
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:1239 verify_connect: no valid entry in auth list
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1035 nano_pipe_recv_cb: ######### nano_pipe_recv_cb #########
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1545 tcptran_pipe_recv_start: *** tcptran_pipe_recv_start ***
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1170 nano_pipe_recv_cb: currently processing pipe_id: 1257963498
2024-01-13 20:04:55 [3361] DEBUG ../nanomq/apps/broker.c:278 server_cb: RECV ^^^^ ctx1 ^^^^
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:379 nano_ctx_send: #### nano_ctx_send with ctx 0x5576d45e70 msg type 20 ####
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:394 nano_ctx_send: ******** working with pipe id : 1257963498 ctx ********
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1465 tcptran_pipe_send: ########### tcptran_pipe_send ###########
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1425 tcptran_pipe_send_start: ########### tcptran_pipe_send_start ###########
2024-01-13 20:04:55 [3361] DEBUG ../nanomq/pub_handler.c:1499 decode_pub_message: cmd: 3, retain: 0, qos: 0, dup: 0, remaining length: 190
2024-01-13 20:04:55 [3361] DEBUG ../nanomq/pub_handler.c:1547 decode_pub_message: topic: [$SYS/brokers/connected], len: [22], qos: 0
2024-01-13 20:04:55 [3361] DEBUG ../nanomq/pub_handler.c:1592 decode_pub_message: used pos: [24]
2024-01-13 20:04:55 [3361] DEBUG ../nanomq/pub_handler.c:1603 decode_pub_message: payload: [{"username":"(null)", "ts":1705176295451,"proto_name":"MQTT","keepalive":20,"return_code":"0","proto_ver":4,"client_id":"calypso","clean_start":0, "IPv4":"127.0.0.1"}], len = 166
2024-01-13 20:04:55 [3361] DEBUG ../nanomq/pub_handler.c:1186 handle_pub: pipe_info size: [0]
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1176 nano_pipe_recv_cb: end of nano_pipe_recv_cb 0x5576d45e70
2024-01-13 20:04:55 [3361] DEBUG ../nanomq/apps/broker.c:526 server_cb: WAIT ^^^^ ctx1 ^^^^
2024-01-13 20:04:55 [3361] TRACE ../nanomq/apps/broker.c:536 server_cb: total pipes: 0
2024-01-13 20:04:55 [3361] DEBUG ../nanomq/pub_handler.c:1282 free_pub_packet: free topic
2024-01-13 20:04:55 [3361] DEBUG ../nanomq/pub_handler.c:1298 free_pub_packet: free payload
2024-01-13 20:04:55 [3361] DEBUG ../nanomq/pub_handler.c:1304 free_pub_packet: free pub_packet
2024-01-13 20:04:55 [3361] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-13 20:04:55 [3366] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:516 nmq_tcptran_pipe_send_cb: ################ nmq_tcptran_pipe_send_cb [0x7f50000b70] ################
2024-01-13 20:04:55 [3365] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:606 tcptran_pipe_recv_cb: tcptran_pipe_recv_cb 0x7f50000b70
2024-01-13 20:04:55 [3361] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 1 ########
2024-01-13 20:04:55 [3366] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:530 nmq_tcptran_pipe_send_cb: tcp socket sent 4 bytes iov 0
2024-01-13 20:04:55 [3361] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5576d45e70
2024-01-13 20:04:55 [3366] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1425 tcptran_pipe_send_start: ########### tcptran_pipe_send_start ###########
2024-01-13 20:04:55 [3366] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1435 tcptran_pipe_send_start: aio not functioning
2024-01-13 20:04:55 [3366] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:902 nano_pipe_send_cb: ******** nano_pipe_send_cb 1257963498 ****
2024-01-13 20:04:55 [3365] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:631 tcptran_pipe_recv_cb: newly recevied 2 totoal received: 2 pos: 2 len : 0
2024-01-13 20:04:55 [3365] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:633 tcptran_pipe_recv_cb: still need byte count:0 > 0
2024-01-13 20:04:55 [3365] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:678 tcptran_pipe_recv_cb: pipe 0x7f50000b70 header got: e0 0 0 4 4d, 2!!
Segmentation fault
</details>
Logs of nanomq when it works:
<details>
```
# nanomq start --log_level=trace
2024-01-14 19:18:00 [710] TRACE ../nng/src/core/taskq.c:289 nni_taskq_sys_init: result is 8
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1144 print_conf: This NanoMQ instance configured as:
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1147 print_conf: tcp url: nmq-tcp://0.0.0.0:1883
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1150 print_conf: websocket url: nmq-ws://0.0.0.0:8083/mqtt
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1168 print_conf: daemon: false
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1170 print_conf: num_taskq_thread: 8
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1172 print_conf: max_taskq_thread: 8
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1174 print_conf: parallel: 8
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1175 print_conf: property_size: 32
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1176 print_conf: max_packet_size: 10240
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1177 print_conf: client_max_packet_size: 10240
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1179 print_conf: max_mqueue_len: 2048
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1180 print_conf: max_inflight_window: 2048
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1181 print_conf: max_awaiting_rel: 10s
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1182 print_conf: await_rel_timeout: 10s
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1183 print_conf: retry_interval: 10s
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1184 print_conf: keepalive_multiplier: 1250.000000
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1188 print_conf: http server port: 8081
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1189 print_conf: http server limit_conn: 2
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1190 print_conf: http server username: admin
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1192 print_conf: http server auth type: basic
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1200 print_conf: public key file: /etc/certs/jwt/jwtRS256.key.pub
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1220 print_conf: allow_anonymous: true
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1224 print_conf: acl_nomatch: allow
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1226 print_conf: enable_acl_cache: on
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1228 print_conf: acl_cache_max_size: 32
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1230 print_conf: acl_cache_ttl: 60
2024-01-14 19:18:00 [710] INFO ../nng/src/supplemental/nanolib/conf.c:1231 print_conf: acl_deny_action: ignore
2024-01-14 19:18:00 [710] INFO ../nanomq/apps/broker.c:1340 store_pid: 710
2024-01-14 19:18:00 [710] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:385 dbtree_node_new: New node: []
2024-01-14 19:18:00 [710] DEBUG ../nng/src/supplemental/nanolib/mqtt_db.c:385 dbtree_node_new: New node: []
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:912 broker: db init finished
2024-01-14 19:18:00 [710] DEBUG ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1360 nng_nmq_tcp0_open: open up nmq tcp0 protocol.
2024-01-14 19:18:00 [710] DEBUG ../nng/src/sp/protocol.c:40 nni_proto_mqtt_open: nng internal init finished! Listener start
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5591902328 &&&&&&&&&
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:527 nano_sock_init: ************* nano_sock_init 0x5591902218 *************
2024-01-14 19:18:00 [710] DEBUG ../nng/src/sp/protocol.c:42 nni_proto_mqtt_open: mqtt socket opened!
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:921 broker: listener init finished
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:927 broker: HTTP service initialization
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:937 broker: HTTP init finished
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:943 broker: webhook init finished
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5591903e70 &&&&&&&&&
2024-01-14 19:18:00 [710] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5591904250 &&&&&&&&&
2024-01-14 19:18:00 [710] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x55919045c0 &&&&&&&&&
2024-01-14 19:18:00 [710] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5591904930 &&&&&&&&&
2024-01-14 19:18:00 [710] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5591904ca0 &&&&&&&&&
2024-01-14 19:18:00 [710] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5591905010 &&&&&&&&&
2024-01-14 19:18:00 [710] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5591905490 &&&&&&&&&
2024-01-14 19:18:00 [710] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5591905800 &&&&&&&&&
2024-01-14 19:18:00 [710] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:1027 broker: NanoMQ context initialization
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5591905b70 &&&&&&&&&
2024-01-14 19:18:00 [710] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5591905ff0 &&&&&&&&&
2024-01-14 19:18:00 [710] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5591906680 &&&&&&&&&
2024-01-14 19:18:00 [710] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:325 nano_ctx_init: &&&&&&&& nano_ctx_init 0x5591906b00 &&&&&&&&&
2024-01-14 19:18:00 [710] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:270 server_cb: INIT ^^^^^^^^ ctx [1] ^^^^^^^^
2024-01-14 19:18:00 [710] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 1 ########
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5591903e70
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:270 server_cb: INIT ^^^^^^^^ ctx [2] ^^^^^^^^
2024-01-14 19:18:00 [710] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 2 ########
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5591904250
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:270 server_cb: INIT ^^^^^^^^ ctx [3] ^^^^^^^^
2024-01-14 19:18:00 [710] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 3 ########
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x55919045c0
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:270 server_cb: INIT ^^^^^^^^ ctx [4] ^^^^^^^^
2024-01-14 19:18:00 [710] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 4 ########
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5591904930
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:270 server_cb: INIT ^^^^^^^^ ctx [5] ^^^^^^^^
2024-01-14 19:18:00 [710] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 5 ########
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5591904ca0
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:270 server_cb: INIT ^^^^^^^^ ctx [6] ^^^^^^^^
2024-01-14 19:18:00 [710] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 6 ########
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5591905010
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:270 server_cb: INIT ^^^^^^^^ ctx [7] ^^^^^^^^
2024-01-14 19:18:00 [710] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 7 ########
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5591905490
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:270 server_cb: INIT ^^^^^^^^ ctx [8] ^^^^^^^^
2024-01-14 19:18:00 [710] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 8 ########
2024-01-14 19:18:00 [710] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5591905800
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:273 server_cb: INIT ^^^^^^^^ extra ctx [10] ^^^^^^^^
2024-01-14 19:18:00 [710] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 10 ########
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:273 server_cb: INIT ^^^^^^^^ extra ctx [12] ^^^^^^^^
2024-01-14 19:18:00 [710] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 12 ########
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:273 server_cb: INIT ^^^^^^^^ extra ctx [14] ^^^^^^^^
2024-01-14 19:18:00 [710] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 14 ########
2024-01-14 19:18:00 [710] DEBUG ../nanomq/apps/broker.c:273 server_cb: INIT ^^^^^^^^ extra ctx [16] ^^^^^^^^
2024-01-14 19:18:00 [710] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 16 ########
2024-01-14 19:18:00 [710] INFO ../nanomq/web_server.c:512 start_rest_server: http://0.0.0.0:8081/api/v4
2024-01-14 19:18:00 [730] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 17 ########
2024-01-14 19:18:00 [730] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 18 ########
2024-01-14 19:18:00 [710] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 19 ########
NanoMQ Broker is started successfully!
2024-01-14 19:18:02 [722] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1583 tcptran_pipe_start: tcptran_pipe_start!
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:297 tcptran_pipe_nego_cb: start tcptran_pipe_nego_cb max len 12 pipe_addr 0x7f80000b70 gotrx 0 wantrx 12
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:297 tcptran_pipe_nego_cb: start tcptran_pipe_nego_cb max len 12 pipe_addr 0x7f80000b70 gotrx 5 wantrx 57
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:567 conn_handler: remaining length: 55
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:578 conn_handler: pro_name: MQTT
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:581 conn_handler: pro_ver: 4
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:589 conn_handler: conn flag:4
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:622 conn_handler: pos after property: [12]
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:642 conn_handler: clientid: [calypso] [7]
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:643 conn_handler: pos after clientid: [21]
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:678 conn_handler: will_topic: Calypso/Status 0
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:679 conn_handler: pos after will topic body: [37]
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:694 conn_handler: will_msg: Calypso is offline 0
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:695 conn_handler: pos after will msg: [57]
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:725 conn_handler: pos: [57] len: [55]
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:177 tcptran_pipe_init: ************ tcptran_pipe_init [0x7f80000b70] ************
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:606 nano_pipe_init: ##########nano_pipe_init###############
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:643 nano_pipe_start: ########## nano_pipe_start ##########
2024-01-14 19:18:03 [723] DEBUG ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:674 nano_pipe_start: client connected! addr [127.0.0.1 port [53993]
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/mqtt_parser.c:1239 verify_connect: no valid entry in auth list
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1035 nano_pipe_recv_cb: ######### nano_pipe_recv_cb #########
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1545 tcptran_pipe_recv_start: *** tcptran_pipe_recv_start ***
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1170 nano_pipe_recv_cb: currently processing pipe_id: 862428888
2024-01-14 19:18:03 [723] DEBUG ../nanomq/apps/broker.c:278 server_cb: RECV ^^^^ ctx1 ^^^^
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:379 nano_ctx_send: #### nano_ctx_send with ctx 0x5591903e70 msg type 20 ####
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:394 nano_ctx_send: ******** working with pipe id : 862428888 ctx ********
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1465 tcptran_pipe_send: ########### tcptran_pipe_send ###########
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1425 tcptran_pipe_send_start: ########### tcptran_pipe_send_start ###########
2024-01-14 19:18:03 [723] DEBUG ../nanomq/pub_handler.c:1499 decode_pub_message: cmd: 3, retain: 0, qos: 0, dup: 0, remaining length: 190
2024-01-14 19:18:03 [723] DEBUG ../nanomq/pub_handler.c:1547 decode_pub_message: topic: [$SYS/brokers/connected], len: [22], qos: 0
2024-01-14 19:18:03 [723] DEBUG ../nanomq/pub_handler.c:1592 decode_pub_message: used pos: [24]
2024-01-14 19:18:03 [718] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:516 nmq_tcptran_pipe_send_cb: 2024-01-14 19:18:03 [723] DEBUG ../nanomq/pub_handler.c:1603 decode_pub_message: ################ nmq_tcptran_pipe_send_cb [0x7f80000b70] ################ payload: [{"username":"(null)", "ts":1705259883091,"proto_name":"MQTT","keepalive":20,"return_code":"0","proto_ver":4,"client_id":"calypso","clean_start":0, "IPv4":"127.0.0.1"}], len = 166
2024-01-14 19:18:03 [723] DEBUG ../nanomq/pub_handler.c:1186 handle_pub: pipe_info size: [0]
2024-01-14 19:18:03 [718] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:530 nmq_tcptran_pipe_send_cb: tcp socket sent 4 bytes iov 0
2024-01-14 19:18:03 [723] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1176 nano_pipe_recv_cb: end of nano_pipe_recv_cb 0x5591903e70
2024-01-14 19:18:03 [718] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1425 tcptran_pipe_send_start: ########### tcptran_pipe_send_start ###########
2024-01-14 19:18:03 [720] DEBUG ../nanomq/apps/broker.c:526 server_cb: WAIT ^^^^ ctx1 ^^^^
2024-01-14 19:18:03 [718] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1435 tcptran_pipe_send_start: aio not functioning
2024-01-14 19:18:03 [720] TRACE ../nanomq/apps/broker.c:536 server_cb: total pipes: 0
2024-01-14 19:18:03 [718] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:902 nano_pipe_send_cb: ******** nano_pipe_send_cb 862428888 ****
2024-01-14 19:18:03 [720] DEBUG ../nanomq/pub_handler.c:1282 free_pub_packet: free topic
2024-01-14 19:18:03 [720] DEBUG ../nanomq/pub_handler.c:1298 free_pub_packet: free payload
2024-01-14 19:18:03 [720] DEBUG ../nanomq/pub_handler.c:1304 free_pub_packet: free pub_packet
2024-01-14 19:18:03 [720] DEBUG ../nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2024-01-14 19:18:03 [720] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 1 ########
2024-01-14 19:18:03 [720] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5591903e70
2024-01-14 19:18:03 [721] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:606 tcptran_pipe_recv_cb: tcptran_pipe_recv_cb 0x7f80000b70
2024-01-14 19:18:03 [721] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:631 tcptran_pipe_recv_cb: newly recevied 2 totoal received: 2 pos: 2 len : 0
2024-01-14 19:18:03 [721] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:633 tcptran_pipe_recv_cb: still need byte count:0 > 0
2024-01-14 19:18:03 [721] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:678 tcptran_pipe_recv_cb: pipe 0x7f80000b70 header got: e0 0 0 4 4d, 2!!
2024-01-14 19:18:03 [721] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:731 tcptran_pipe_recv_cb: remain_len 0 cparam 0x7f74000bc0 clientid calypso username (null) proto 4
2024-01-14 19:18:03 [721] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:736 tcptran_pipe_recv_cb: The type of msg is e0
2024-01-14 19:18:03 [721] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1035 nano_pipe_recv_cb: ######### nano_pipe_recv_cb #########
2024-01-14 19:18:03 [721] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:820 nano_pipe_close: ############## nano_pipe_close ##############
2024-01-14 19:18:03 [721] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:1545 tcptran_pipe_recv_start: *** tcptran_pipe_recv_start ***
2024-01-14 19:18:03 [721] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1170 nano_pipe_recv_cb: currently processing pipe_id: 862428888
2024-01-14 19:18:03 [721] DEBUG ../nanomq/apps/broker.c:278 server_cb: RECV ^^^^ ctx2 ^^^^
2024-01-14 19:18:03 [721] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:1176 nano_pipe_recv_cb: end of nano_pipe_recv_cb 0x5591904250
2024-01-14 19:18:03 [719] DEBUG ../nanomq/apps/broker.c:526 server_cb: WAIT ^^^^ ctx2 ^^^^
2024-01-14 19:18:03 [721] TRACE ../nng/src/sp/transport/mqtt/broker_tcp.c:867 tcptran_pipe_recv_cb: end of tcptran_pipe_recv_cb: synch! 0x7f80000b70
2024-01-14 19:18:03 [719] DEBUG ../nanomq/apps/broker.c:593 server_cb: broker has nothing to do
2024-01-14 19:18:03 [719] TRACE ../nng/src/nng.c:390 nng_ctx_recv: ######## nng_ctx_recv context id 2 ########
2024-01-14 19:18:03 [719] TRACE ../nng/src/sp/protocol/mqtt/nmq_mqtt.c:959 nano_ctx_recv: nano_ctx_recv start 0x5591904250
```
</details> | Possible uninitialized variable causing seg fault with optimizations. | https://api.github.com/repos/nanomq/nanomq/issues/1607/comments | 1 | 2024-01-17T15:23:18Z | 2024-01-25T05:34:42Z | https://github.com/nanomq/nanomq/issues/1607 | 2,086,423,488 | 1,607 |
[
"emqx",
"nanomq"
] | **Is your feature request related to a problem? Please describe.**
MQTT v5.0 has a USER_PROPERTY spec for a map of UTF 8 strings sent with payloads. Right now, it seems nanomq only supports setting this via a conf file with static key/value string pairs.
**Describe the solution you'd like**
I would like a way to tell nanomq plugins to call a plugin that produces the key/value string pairs when each message must be sent, such like the [timestamp plugin in mosquitto](https://github.com/eclipse/mosquitto/blob/master/plugins/message-timestamp/mosquitto_message_timestamp.c). My project's goal is to have timestamping be provided by the broker, but any way to generate the key/value pairs upon message creation would be helpful.
**Describe alternatives you've considered**
I have considered forking nanomq and adding it right into the code that sets the user_property statically, and will do so when I confirm that what I describe is not already in existence.
**Additional context**
Please let me know if this may already exist in some form here or in NanoNNG. I know this is a big request but It would help nanomq surpass mosquitto. Thanks for developing an awesome application! | Ability to set mqtt v5.0 USER_PROPERTY dynamically via a code plugin | https://api.github.com/repos/nanomq/nanomq/issues/1603/comments | 8 | 2024-01-11T19:51:29Z | 2024-01-30T07:45:15Z | https://github.com/nanomq/nanomq/issues/1603 | 2,077,472,763 | 1,603 |
[
"emqx",
"nanomq"
] | **Describe the bug**
topics used for CI test may be misused. Better use more odd topics for ci test.
| CI for bridge may fail | https://api.github.com/repos/nanomq/nanomq/issues/1600/comments | 2 | 2024-01-10T07:02:53Z | 2024-01-11T10:23:34Z | https://github.com/nanomq/nanomq/issues/1600 | 2,073,729,108 | 1,600 |
[
"emqx",
"nanomq"
] | null | enabling bridge gonna deactive taskq settings | https://api.github.com/repos/nanomq/nanomq/issues/1599/comments | 0 | 2024-01-09T09:08:09Z | 2024-01-10T07:46:07Z | https://github.com/nanomq/nanomq/issues/1599 | 2,071,931,417 | 1,599 |
[
"emqx",
"nanomq"
] | **Describe the bug**
when parse old conf, conf structures are alloced with realloc, but free by cvector_free, leading to a mismatch.
**Expected behavior**
use cvector to alloc for old conf
| old conf alloc free mismatch | https://api.github.com/repos/nanomq/nanomq/issues/1596/comments | 1 | 2024-01-06T05:27:21Z | 2024-01-15T15:22:13Z | https://github.com/nanomq/nanomq/issues/1596 | 2,068,396,686 | 1,596 |
[
"emqx",
"nanomq"
] | 相同的clientid登录,如何把之前相同的clientid踢下线 | How to kick out duplicated client? 如何把相同clientid踢下线 | https://api.github.com/repos/nanomq/nanomq/issues/1594/comments | 2 | 2024-01-05T10:37:19Z | 2024-01-24T13:03:51Z | https://github.com/nanomq/nanomq/issues/1594 | 2,067,111,978 | 1,594 |
[
"emqx",
"nanomq"
] | **Describe the bug**
There seems to be a memory leak in the bridge client, although the program will stop running and exit. Should we release it manually.
**Expected behavior**
A clear and concise description of what you expected to happen.
**To Reproduce**
```bash
./nanomq start --conf ./etc.conf
```
etc.conf:
```
# NanoMQ Configuration 0.14.0
# #============================================================
# # NanoMQ Broker
# #============================================================
system {
daemon = false
num_taskq_thread = 0
max_taskq_thread = 0
parallel = 0
}
mqtt.session {
property_size = 32
max_packet_size = 1024
client_max_packet_size = 1024
msq_len = 2048
qos_duration = 10s
keepalive_backoff = 1250
allow_anonymous = true
}
listeners.tcp {
bind = "0.0.0.0:1883"
}
listeners.ws {
bind = "0.0.0.0:8083/mqtt"
}
http_server {
port = 8081
parallel = 2
username = admin
password = public
auth_type = basic
jwt {
public.keyfile = "/etc/certs/jwt/jwtRS256.key.pub"
private.keyfile = "/etc/certs/jwt/jwtRS256.key"
}
}
log {
to = [file, console]
level = warn
dir = "/tmp"
file = "nanomq.log"
rotation {
size = 10MB
count = 5
}
}
bridges.mqtt {
nodes = [
{
name = emqx
connector {
server = "mqtt-tcp://localhost:1883"
proto_ver = 4
username = user
password = pwd
clean_start = true
keepalive = 60s
}
forwards = ["topic1/#", "topic2/#"]
subscription = [
{
topic = "cmd/topic1"
qos = 1
},
{
topic = "cmd/topic2"
qos = 2
}
]
parallel = 2
max_send_queue_len = 1024
max_recv_queue_len = 1024
}
]
}
```

**Environment Details**
* NanoMQ 0.20.8
| potential memory leak in bridge client | https://api.github.com/repos/nanomq/nanomq/issues/1591/comments | 2 | 2024-01-04T03:21:17Z | 2024-01-05T06:39:29Z | https://github.com/nanomq/nanomq/issues/1591 | 2,064,930,793 | 1,591 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Any authenticated user can subscribe to any topic regardless of ACL when the default `deny_action = ignore` is set in `nanomq.conf`.
**Expected behavior**
The request is dropped. The client receives no response.
**Actual Behavior**
Despite `acl deny` being logged the subscribed topics are returned to the client.
**To Reproduce**
1. Set `allow_anonymous = false` and `no_match = deny` in `nanomq.conf`
2. Leave `deny_action = ignore` in `nanomq.conf`
3. Create two users in `nanomq_pwd.conf`:
```
CanPublish: Password
NoRights: Password
```
4. Create following ACLs in `nanomq_acl.conf`:
```
rules = [
## write access for user CanPublish
{"permit": "allow", "username": "CanPublish", "action": "publish", "topics": ["test/#"]}
## catch all deny
{"permit": "deny", "action": "subscribe"}
]
```
or even
```
rules = [
## explicit deny for user NoRights
{"permit": "deny", "username": "NoRights", "action": "subscribe", "topics": ["test/#"]}
## write access for user CanPublish
{"permit": "allow", "username": "CanPublish", "action": "publish", "topics": ["test/#"]}
## catch all deny
{"permit": "deny", "action": "subscribe"}
]
```
5. Start nanomq
6. _CanPublish_ can publish **and** subscribe to `test/#`, _NoRights_ can not publish to `test/#` **but can** subscribe to it (or any other topic).
**Environment Details**
- 0.20.8
- [official docker image](https://github.com/nanomq/nanomq/tree/master#run-nanomq-using-docker)
**Additional context**
When looking in the code after https://github.com/nanomq/nanomq/blob/94dd252063a30ecbf547a518ce9eca07ba23152e/nanomq/sub_handler.c#L258 we can see that there is a differentiation being made apparently depending on 'deny action'
https://github.com/nanomq/nanomq/blob/94dd252063a30ecbf547a518ce9eca07ba23152e/nanomq/sub_handler.c#L260-L267
`goto next;` is not being called when `deny action` is not set to `disconnect`. Therefore I suspect the bug can be fixed by adding `goto next;` between lines 267 and 268:
```
if (work->config->acl_deny_action ==
ACL_DISCONNECT) {
log_warn(
"acl deny, disconnect client");
// TODO disconnect client or return
// error code
goto next;
}
goto next;
} else {
log_info("acl allow");
}
``` | ACL not applied to subscriptions | https://api.github.com/repos/nanomq/nanomq/issues/1590/comments | 1 | 2024-01-03T22:53:02Z | 2024-02-23T11:18:59Z | https://github.com/nanomq/nanomq/issues/1590 | 2,064,751,533 | 1,590 |
[
"emqx",
"nanomq"
] | 当我发起一个非标准的Pub请求的时候,100%导致进程挂掉,提示段错误,应该是内存溢出或指针错误,可能会导致安全漏洞,至少可以用于拒绝服务攻击,Debug日志如下
`
2023-12-28 18:47:23 [411] DEBUG /root/nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:611 conn_handler: remain len 89 max len 91 prop len 0 pos 12
2023-12-28 18:47:23 [411] DEBUG /root/nanomq/nng/src/sp/protocol/mqtt/nmq_mqtt.c:674 nano_pipe_start: client connected! addr [121.35.41.145 port [49502]
2023-12-28 18:47:23 [411] DEBUG /root/nanomq/nanomq/apps/broker.c:253 server_cb: RECV ^^^^ ctx1 ^^^^
2023-12-28 18:47:23 [411] DEBUG /root/nanomq/nanomq/pub_handler.c:1494 decode_pub_message: cmd: 3, retain: 0, qos: 0, dup: 0, remaining length: 201
2023-12-28 18:47:23 [411] DEBUG /root/nanomq/nanomq/pub_handler.c:1542 decode_pub_message: topic: [$SYS/brokers/connected], len: [22], qos: 0
2023-12-28 18:47:23 [411] DEBUG /root/nanomq/nanomq/pub_handler.c:1585 decode_pub_message: used pos: [24]
2023-12-28 18:47:23 [411] DEBUG /root/nanomq/nanomq/pub_handler.c:1596 decode_pub_message: payload: [], len = 177
2023-12-28 18:47:23 [411] DEBUG /root/nanomq/nanomq/pub_handler.c:1182 handle_pub: pipe_info size: [0]
2023-12-28 18:47:23 [411] DEBUG /root/nanomq/nanomq/apps/broker.c:497 server_cb: WAIT ^^^^ ctx1 ^^^^
2023-12-28 18:47:23 [411] DEBUG /root/nanomq/nanomq/pub_handler.c:1278 free_pub_packet: free topic
2023-12-28 18:47:23 [411] DEBUG /root/nanomq/nanomq/pub_handler.c:1294 free_pub_packet: free payload
2023-12-28 18:47:23 [411] DEBUG /root/nanomq/nanomq/pub_handler.c:1300 free_pub_packet: free pub_packet
2023-12-28 18:47:23 [411] DEBUG /root/nanomq/nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nanomq/apps/broker.c:253 server_cb: RECV ^^^^ ctx2 ^^^^
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nanomq/sub_handler.c:65 decode_sub_msg: remainLen: [29] packetid : [23]
2023-12-28 18:47:23 [413] DEBUG /root/nanomq/nanomq/apps/broker.c:253 server_cb: RECV ^^^^ ctx3 ^^^^
2023-12-28 18:47:23 [410] INFO /root/nanomq/nanomq/sub_handler.c:86 decode_sub_msg: topic: [devtype1/mqttx_0f8aaefa] len: [23] pid [23]
2023-12-28 18:47:23 [413] DEBUG /root/nanomq/nanomq/pub_handler.c:1494 decode_pub_message: cmd: 3, retain: 0, qos: 1, dup: 0, remaining length: 33
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nanomq/sub_handler.c:248 sub_ctx_handle: topicLen: [23] body: [devtype1/mqttx_0f8aaefa]
2023-12-28 18:47:23 [410] INFO /root/nanomq/nanomq/sub_handler.c:269 sub_ctx_handle: acl allow
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nng/src/supplemental/nanolib/mqtt_db.c:385 dbtree_node_new: New node: [devtype1]
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nng/src/supplemental/nanolib/mqtt_db.c:385 dbtree_node_new: New node: [mqttx_0f8aaefa]
2023-12-28 18:47:23 [413] DEBUG /root/nanomq/nanomq/pub_handler.c:1542 decode_pub_message: topic: [devtype1/mqttx_0f8aaefa], len: [23], qos: 1
2023-12-28 18:47:23 [413] DEBUG /root/nanomq/nanomq/pub_handler.c:1551 decode_pub_message: identifier: [24]
2023-12-28 18:47:23 [413] DEBUG /root/nanomq/nanomq/pub_handler.c:1562 decode_pub_message: property len: 0
2023-12-28 18:47:23 [413] DEBUG /root/nanomq/nanomq/pub_handler.c:1585 decode_pub_message: used pos: [28]
2023-12-28 18:47:23 [413] DEBUG /root/nanomq/nanomq/pub_handler.c:1596 decode_pub_message: payload: [hello], len = 5
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nanomq/sub_handler.c:339 sub_ctx_handle: end of sub ctx handle.
2023-12-28 18:47:23 [413] INFO /root/nanomq/nanomq/pub_handler.c:1164 handle_pub: acl allow
2023-12-28 18:47:23 [413] DEBUG /root/nanomq/nng/src/supplemental/nanolib/mqtt_db.c:734 collect_clients: Searching client: devtype1
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nanomq/sub_handler.c:188 encode_suback_msg: reason_code: [2]
2023-12-28 18:47:23 [413] DEBUG /root/nanomq/nng/src/supplemental/nanolib/mqtt_db.c:754 collect_clients: Searching client: devtype1
2023-12-28 18:47:23 [413] DEBUG /root/nanomq/nng/src/supplemental/nanolib/mqtt_db.c:756 collect_clients: add node_t: devtype1
2023-12-28 18:47:23 [413] DEBUG /root/nanomq/nng/src/supplemental/nanolib/mqtt_db.c:734 collect_clients: Searching client: mqttx_0f8aaefa
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nanomq/sub_handler.c:214 encode_suback_msg: remain: [4] varint: [4 0 0 0] len: [1] packetid: [0 17]
2023-12-28 18:47:23 [413] DEBUG /root/nanomq/nng/src/supplemental/nanolib/mqtt_db.c:737 collect_clients: Searching client: mqttx_0f8aaefa
2023-12-28 18:47:23 [413] DEBUG /root/nanomq/nanomq/pub_handler.c:1182 handle_pub: pipe_info size: [1]
2023-12-28 18:47:23 [413] DEBUG /root/nanomq/nanomq/apps/broker.c:574 server_cb: SEND ^^^^ ctx2 ^^^^
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nanomq/apps/broker.c:497 server_cb: WAIT ^^^^ ctx3 ^^^^
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nanomq/pub_handler.c:1343 encode_pub_message: start encode message
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nanomq/pub_handler.c:1380 encode_pub_message: after topic and id len in msg already [27]
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nanomq/pub_handler.c:1403 encode_pub_message: after payload len in msg already [33]
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nanomq/pub_handler.c:1413 encode_pub_message: header len [2] remain len [33]
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nanomq/pub_handler.c:1465 encode_pub_message: end encode message
ERROR: packet id duplicates in nano_qos_db
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nanomq/pub_handler.c:1278 free_pub_packet: free topic
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nanomq/pub_handler.c:1294 free_pub_packet: free payload
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nanomq/pub_handler.c:1300 free_pub_packet: free pub_packet
2023-12-28 18:47:23 [410] DEBUG /root/nanomq/nanomq/pub_handler.c:84 init_pipe_content: pub_handler: init pipe_info
段错误
`
| [security]: potential vulnerability | https://api.github.com/repos/nanomq/nanomq/issues/1582/comments | 10 | 2023-12-28T10:51:03Z | 2024-03-26T08:37:59Z | https://github.com/nanomq/nanomq/issues/1582 | 2,058,289,717 | 1,582 |
[
"emqx",
"nanomq"
] | 在查看文档时,看到
ACL相关的内容
https://nanomq.io/docs/zh/latest/access-control/acl.html
`["$SYS/#", "#"]`
这个语法,$SYS之类的内置变量,以及基础语法,去哪里查?
我怎么允许用户访问以他用户名开头的topics? | enhance docs 关于文档的完善 | https://api.github.com/repos/nanomq/nanomq/issues/1581/comments | 3 | 2023-12-26T15:02:26Z | 2024-02-05T04:00:54Z | https://github.com/nanomq/nanomq/issues/1581 | 2,056,487,118 | 1,581 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Config ssl on Linux (using Docker compose) is not log anything, connect by only username & password is succesful, but when connect to that broker by MQTTX, it error.
**Expected behavior**
A clear and concise description of what you expected to happen.
**To Reproduce**
config nanomq in docker-compose.yml
```
nanomq-dev:
image: emqx/nanomq:0.14.1-full
container_name: nanomq-dev
volumes:
- ../nanomq-certs/ca_certificate.pem:/etc/certs/ca_certificate.pem:ro
- ../nanomq-certs/server_certificate.pem:/etc/certs/server_certificate.pem:ro
- ../nanomq-certs/private_key.pem:/etc/certs/private_key.pem:ro
environment:
NANOMQ_TLS_ENABLE: 'true'
NANOMQ_TLS_CA_CERT_PATH: '/etc/certs/ca_certificate.pem'
NANOMQ_TLS_CERT_PATH: '/etc/certs/server_certificate.pem'
NANOMQ_TLS_KEY_PATH: '/etc/certs/private_key.pem'
NANOMQ_TLS_VERIFY_PEER: 'true'
NANOMQ_TLS_FAIL_IF_NO_PEER_CERT: 'true'
restart: always
ports:
- '1883:1883'
- '8083:8083'
- '8883:8883'
```
error when connect with MQTTX with SSL:
> Error: error:0b000074:X.509 certificate routines:OPENSSL_internal:KEY_VALUES_MISMATCH
| [Client] Failed SSL Certificate Configuration in NanoMQ when using Docker | https://api.github.com/repos/nanomq/nanomq/issues/1577/comments | 1 | 2023-12-22T08:43:18Z | 2024-01-15T07:54:26Z | https://github.com/nanomq/nanomq/issues/1577 | 2,053,583,224 | 1,577 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Config ssl on Linux (using Docker compose) is not log anything, but when connect to that broker by MQTTX, it error.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Actual Behavior**
Describe what occurred.
**To Reproduce**
config nanomq in docker-compose.yml
nanomq-dev:
image: emqx/nanomq:0.14.1-full
container_name: nanomq-dev
volumes:
- ../nanomq-certs/ca_certificate.pem:/etc/certs/ca_certificate.pem:ro
- ../nanomq-certs/server_certificate.pem:/etc/certs/server_certificate.pem:ro
- ../nanomq-certs/private_key.pem:/etc/certs/private_key.pem:ro
environment:
NANOMQ_TLS_ENABLE: 'true'
NANOMQ_TLS_CA_CERT_PATH: '/etc/certs/ca_certificate.pem'
NANOMQ_TLS_CERT_PATH: '/etc/certs/server_certificate.pem'
NANOMQ_TLS_KEY_PATH: '/etc/certs/private_key.pem'
NANOMQ_TLS_VERIFY_PEER: 'true'
NANOMQ_TLS_FAIL_IF_NO_PEER_CERT: 'true'
**Environment Details**
- NanoMQ version
- Operating system and version
- Compiler and language used
- testing scenario
**Client SDK**
If possible include the mqtt sdk you used to connect to nanomq
Minimal C test cases are perferred.
**Additional context**
Add any other context about the problem here.
| Failed SSL Certificate Configuration in Linux (Docker) | https://api.github.com/repos/nanomq/nanomq/issues/1575/comments | 0 | 2023-12-22T07:41:05Z | 2023-12-22T07:41:22Z | https://github.com/nanomq/nanomq/issues/1575 | 2,053,517,251 | 1,575 |
[
"emqx",
"nanomq"
] | https://github.com/nanomq/nanomq/pull/1554 | RPATH introduced an error of linking stage | https://api.github.com/repos/nanomq/nanomq/issues/1568/comments | 0 | 2023-12-19T10:00:07Z | 2023-12-19T10:31:10Z | https://github.com/nanomq/nanomq/issues/1568 | 2,048,315,345 | 1,568 |
[
"emqx",
"nanomq"
] | **Describe the bug**
When I set the listeners.tcp.enable flag to false, I’m still able to connect to the broker at the insecure port (see below config). I'm using the default configuration file located at `/etc/nanomq.conf`, and running the command with `nanomq start`.
**Expected behavior**
I should not be able to connect to MQTT/nanomq via TCP when `listeners.tcp.enable = false`
**Actual Behavior**
I was able to connect to nanomq via TCP when `listeners.tcp.enable = false`
**To Reproduce**
1. Set your configuration in `/etc/nanomq.conf`, and enable SSL with some certs
```hocon
listeners.tcp {
enable = false
}
```
2. Start the nanomq server
```
nanomq start
```
3. In a separate window (or in MQTTX), subscribe to the topic without using SSL. You will see a successful connection, and will then be able to see any traffic published to that topic, including via SSL.
```
nanomq_cli sub -t my/topic/#
connect_cb: mqtt-tcp://127.0.0.1:1883 connect result: 0
```
**Environment Details**
- NanoMQ version: `v0.20.8-4`
- Operating system and version: `Linux aarch64` - custom with linux kernel of `5.4.215`
- Compiler and language used: N/A - installed with:
```
wget https://www.emqx.com/en/downloads/nanomq/0.20.8/nanomq-0.20.8-linux-arm64.rpm
rpm -i nanomq-0.20.8-linux-arm64.rpm
```
- testing scenario: `not sure what this is`
**Client SDK**
NanoMQ
**Additional context**
I want to use/enable exclusively SSL | Disabling TCP doesn't work | https://api.github.com/repos/nanomq/nanomq/issues/1563/comments | 4 | 2023-12-14T15:41:52Z | 2023-12-22T09:15:47Z | https://github.com/nanomq/nanomq/issues/1563 | 2,041,962,792 | 1,563 |
[
"emqx",
"nanomq"
] | File: [/docs/zh_CN/api/v4.md](https://nanomq.io/docs/zh/latest/api/v4.html | 动态更新桥接配置 一直保参数错误 使用文档内的example也一样 | https://api.github.com/repos/nanomq/nanomq/issues/1561/comments | 0 | 2023-12-13T11:17:13Z | 2023-12-13T11:17:31Z | https://github.com/nanomq/nanomq/issues/1561 | 2,039,493,891 | 1,561 |
[
"emqx",
"nanomq"
] | D:\a\nanomq\nanomq\nng\src\supplemental\nanolib\ringbuffer\ringbuffer.c(324,7): error C2065: 'uint': undeclared identifier [D:\a\nanomq\nanomq\build\nng\nng.vcxproj]
D:\a\nanomq\nanomq\nng\src\supplemental\nanolib\ringbuffer\ringbuffer.c(324,7): error C2146: syntax error: missing ';' before identifier 'i' [D:\a\nanomq\nanomq\build\nng\nng.vcxproj]
D:\a\nanomq\nanomq\nng\src\supplemental\nanolib\ringbuffer\ringbuffer.c(324,9): error C2065: 'i': undeclared identifier [D:\a\nanomq\nanomq\build\nng\nng.vcxproj]
D:\a\nanomq\nanomq\nng\src\supplemental\nanolib\ringbuffer\ringbuffer.c(327,9): error C2065: 'i': undeclared identifier [D:\a\nanomq\nanomq\build\nng\nng.vcxproj]
D:\a\nanomq\nanomq\nng\src\supplemental\nanolib\ringbuffer\ringbuffer.c(327,23): error C2065: 'i': undeclared identifier [D:\a\nanomq\nanomq\build\nng\nng.vcxproj]
D:\a\nanomq\nanomq\nng\src\supplemental\nanolib\ringbuffer\ringbuffer.c(327,23): warning C4018: '<': signed/unsigned mismatch [D:\a\nanomq\nanomq\build\nng\nng.vcxproj]
D:\a\nanomq\nanomq\nng\src\supplemental\nanolib\ringbuffer\ringbuffer.c(327,36): error C2065: 'i': undeclared identifier [D:\a\nanomq\nanomq\build\nng\nng.vcxproj]
D:\a\nanomq\nanomq\nng\src\supplemental\nanolib\ringbuffer\ringbuffer.c(328,5): error C2065: 'i': undeclared identifier [D:\a\nanomq\nanomq\build\nng\nng.vcxproj]
D:\a\nanomq\nanomq\nng\src\supplemental\nanolib\ringbuffer\ringbuffer.c(328,9): error C2065: 'i': undeclared identifier [D:\a\nanomq\nanomq\build\nng\nng.vcxproj]
D:\a\nanomq\nanomq\nng\src\supplemental\nanolib\ringbuffer\ringbuffer.c(329,17): error C2065: 'i': undeclared identifier [D:\a\nanomq\nanomq\build\nng\nng.vcxproj]
D:\a\nanomq\nanomq\nng\src\supplemental\nanolib\ringbuffer\ringbuffer.c(330,21): error C2065: 'i': undeclared identifier [D:\a\nanomq\nanomq\build\nng\nng.vcxproj]
perhaps a bug introduced by me | ringbuffer is not windows compatible | https://api.github.com/repos/nanomq/nanomq/issues/1556/comments | 0 | 2023-12-09T14:06:44Z | 2023-12-10T02:06:38Z | https://github.com/nanomq/nanomq/issues/1556 | 2,033,864,971 | 1,556 |
[
"emqx",
"nanomq"
] | Hi,
I am attempting to cross compile NanoMQ for aarch64 using buildroot with `-DNNG-ENABLE-QUIC=ON`. I have some sort of environment issue where [`INTERNAL_MSQUIC_INCLUDE_DIR` is being left as `NOTFOUND` ](https://github.com/nanomq/NanoNNG/blob/d17200ba739efc356d18344ec2261f4c8c76c83e/src/supplemental/quic/CMakeLists.txt#L21C5-L21C14) causing an error. I checked to ensure that msquic submodule was initialized and the msquic.h file was present. Full logs are below. Any help would be much appreciated.
```
/usr/bin/cmake /home/jack/Projects/NER/buildroot/Siren/odysseus/buildroot/output/build/nanomq-9828d7b0c432d9495c5f940d75df0a621203b814/ -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/jack/Projects/NER/buildroot/Siren/odysseus/buildroot/output/host/share/buildroot/toolchainfile.cmake" -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_INSTALL_RUNSTATEDIR="/run" -DCMAKE_COLOR_MAKEFILE=OFF -DBUILD_DOC=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLE=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TEST=OFF -DBUILD_TESTS=OFF -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON -DNNG_ENABLE_QUIC=ON -DBUILD_BENCH=ON -DNNG_ENABLE_SQLITE=ON )
CMake Deprecation Warning at CMakeLists.txt:8 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is GNU 12.2.1
-- The CXX compiler identification is GNU 12.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/jack/Projects/NER/buildroot/Siren/odysseus/buildroot/output/host/bin/aarch64-none-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/jack/Projects/NER/buildroot/Siren/odysseus/buildroot/output/host/bin/aarch64-none-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test NANO_HIDDEN_VISIBILITY
-- Performing Test NANO_HIDDEN_VISIBILITY - Success
-- NanoMQ versions --
-- Configuring for NanoMQ version 0.20.8
-- Build NanoMQ with ACL support --
-- MODE [Release] --
-- Configuring for NNG version 1.6.0-pre
-- Performing Test NNG_HIDDEN_VISIBILITY
-- Performing Test NNG_HIDDEN_VISIBILITY - Success
-- Looking for strlcpy
-- Looking for strlcpy - not found
-- Looking for strnlen
-- Looking for strnlen - found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for strncasecmp
-- Looking for strncasecmp - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Looking for lockf
-- Looking for lockf - found
-- Looking for flock
-- Looking for flock - found
-- Looking for getrandom
-- Looking for getrandom - found
-- Looking for arc4random_buf
-- Looking for arc4random_buf - found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Looking for sem_wait in pthread
-- Looking for sem_wait in pthread - found
-- Looking for pthread_atfork in pthread
-- Looking for pthread_atfork in pthread - found
-- Looking for pthread_set_name_np in pthread
-- Looking for pthread_set_name_np in pthread - not found
-- Looking for pthread_setname_np in pthread
-- Looking for pthread_setname_np in pthread - found
-- Looking for gethostbyname in nsl
-- Looking for gethostbyname in nsl - not found
-- Looking for socket in socket
-- Looking for socket in socket - not found
-- Looking for __atomic_load_1 in atomic
-- Looking for __atomic_load_1 in atomic - found
-- Looking for AF_UNIX
-- Looking for AF_UNIX - found
-- Looking for backtrace_symbols_fd
-- Looking for backtrace_symbols_fd - found
-- Performing Test NNG_HAVE_MSG_CONTROL
-- Performing Test NNG_HAVE_MSG_CONTROL - Success
-- Looking for eventfd
-- Looking for eventfd - found
-- Looking for kqueue
-- Looking for kqueue - not found
-- Looking for port_create
-- Looking for port_create - not found
-- Looking for epoll_create
-- Looking for epoll_create - found
-- Looking for epoll_create1
-- Looking for epoll_create1 - found
-- Looking for getpeereid
-- Looking for getpeereid - not found
-- Looking for SO_PEERCRED
-- Looking for SO_PEERCRED - found
-- Performing Test NNG_HAVE_SOCKPEERCRED
-- Performing Test NNG_HAVE_SOCKPEERCRED - Failed
-- Looking for LOCAL_PEERCRED
-- Looking for LOCAL_PEERCRED - not found
-- Looking for LOCAL_PEERPID
-- Looking for LOCAL_PEERPID - not found
-- Looking for getpeerucred
-- Looking for getpeerucred - not found
-- Looking for atomic_flag_test_and_set
-- Looking for atomic_flag_test_and_set - found
Check MQTT_QUIC_CLIENT support: ON
Check MQTT_QUIC_TRANSPORT support: ON
CMake Warning at nng/src/supplemental/quic/msquic/CMakeLists.txt:8 (message):
************************************************************
Taking MSQUIC as quic lib
************************************************************
-- CMAKE Version: 3.27.9
-- Source Dir: /home/jack/Projects/NER/buildroot/Siren/odysseus/buildroot/output/build/nanomq-9828d7b0c432d9495c5f940d75df0a621203b814/nng/extern/msquic
-- Host System name: Linux
-- Setting policy 0091
-- System name: Linux
-- System version: 1
-- Platform version:
-- Build type: Release
-- QUIC Platform: linux
fatal: not a git repository: /home/jack/Projects/NER/buildroot/Siren/odysseus/buildroot/output/build/nanomq-9828d7b0c432d9495c5f940d75df0a621203b814/nng/extern/msquic/../../../.git/modules/nanonng/modules/extern/msquic
--
-- Failed to get /home/jack/Projects/NER/buildroot/Siren/odysseus/buildroot/output/build/nanomq-9828d7b0c432d9495c5f940d75df0a621203b814/nng/extern/msquic git hash
Failed to get git hash. Binary will not contain git hash
-- Version Build ID: 0
-- Version Suffix: -private
-- Looking for _SC_PHYS_PAGES
-- Looking for _SC_PHYS_PAGES - found
-- Looking for sysconf
-- Looking for sysconf - found
-- Looking for UDP_SEGMENT
-- Looking for UDP_SEGMENT - found
-- Looking for SO_ATTACH_REUSEPORT_CBPF
-- Looking for SO_ATTACH_REUSEPORT_CBPF - found
-- Looking for sendmmsg
-- Looking for sendmmsg - found
-- Enabling OpenSsl configuration tests
-- QUIC_ENABLE_LOGGING is false. Disabling logging
-- Enabling shared ephemeral port work around
-- Configuring for OpenSSL 1.1
-- Setting openssldir to /home/jack/Projects/NER/buildroot/Siren/odysseus/buildroot/output/host/etc/ssl
-- Configuring OpenSSL: /home/jack/Projects/NER/buildroot/Siren/odysseus/buildroot/output/build/nanomq-9828d7b0c432d9495c5f940d75df0a621203b814/nng/extern/msquic/submodules/openssl/config;CC=/home/jack/Projects/NER/buildroot/Siren/odysseus/buildroot/output/host/bin/aarch64-none-linux-gnu-gcc;CXX=/home/jack/Projects/NER/buildroot/Siren/odysseus/buildroot/output/host/bin/aarch64-none-linux-gnu-g++ enable-tls1_3;no-makedepend;no-dgram;no-ssl3;no-psk;no-srp;no-zlib;no-egd;no-idea;no-rc5;no-rc4;no-afalgeng;no-comp;no-cms;no-ct;no-srp;no-srtp;no-ts;no-gost;no-dso;no-ec2m;no-tls1;no-tls1_1;no-tls1_2;no-dtls;no-dtls1;no-dtls1_2;no-ssl;no-ssl3-method;no-tls1-method;no-tls1_1-method;no-tls1_2-method;no-dtls1-method;no-dtls1_2-method;no-siphash;no-whirlpool;no-aria;no-bf;no-blake2;no-sm2;no-sm3;no-sm4;no-camellia;no-cast;no-md4;no-mdc2;no-ocb;no-rc2;no-rmd160;no-scrypt;no-weak-ssl-ciphers;no-shared;no-tests;--openssldir="/home/jack/Projects/NER/buildroot/Siren/odysseus/buildroot/output/host/etc/ssl";--prefix=/home/jack/Projects/NER/buildroot/Siren/odysseus/buildroot/output/build/nanomq-9828d7b0c432d9495c5f940d75df0a621203b814/_deps/opensslquic-build/openssl
-- Found libatomic: /home/jack/Projects/NER/buildroot/Siren/odysseus/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libatomic.so
-- Configuring for OpenSSL
** Build msquic with nanonng **
CMake Deprecation Warning at nanomq/CMakeLists.txt:7 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Deprecation Warning at nanomq_cli/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
Install prefix: /usr
-- Configuring done (5.8s)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/home/jack/Projects/NER/buildroot/Siren/odysseus/buildroot/output/build/nanomq-9828d7b0c432d9495c5f940d75df0a621203b814/nng/src/supplemental/quic/INTERNAL_MSQUIC_INCLUDE_DIR
used as include directory in directory /home/jack/Projects/NER/buildroot/Siren/odysseus/buildroot/output/build/nanomq-9828d7b0c432d9495c5f940d75df0a621203b814/nng
used as include directory in directory /home/jack/Projects/NER/buildroot/Siren/odysseus/buildroot/output/build/nanomq-9828d7b0c432d9495c5f940d75df0a621203b814/nng
-- Generating done (0.1s)
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_DOC
BUILD_DOCS
BUILD_EXAMPLE
BUILD_EXAMPLES
BUILD_TEST
BUILD_TESTING
BUILD_TESTS
CMake Generate step failed. Build files cannot be regenerated correctly.
``` | INTERNAL_MSQUIC_INCLUDE_DIR path not found, cannot build with QUIC support | https://api.github.com/repos/nanomq/nanomq/issues/1559/comments | 5 | 2023-12-06T06:15:59Z | 2023-12-12T02:48:23Z | https://github.com/nanomq/nanomq/issues/1559 | 2,036,873,869 | 1,559 |
[
"emqx",
"nanomq"
] | null | Is there any nanomq JAVA sdk? | https://api.github.com/repos/nanomq/nanomq/issues/1551/comments | 1 | 2023-12-05T09:15:29Z | 2023-12-06T02:54:51Z | https://github.com/nanomq/nanomq/issues/1551 | 2,025,716,691 | 1,551 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Config ssl on windows does not work
**Actual Behavior**
Describe what occurred.
**To Reproduce**
Config nanomq.conf
```
listeners.ssl {
bind = "0.0.0.0:8883"
keyfile = "C:/certs/key.pem"
certfile = "C:/certs/cert.pem"
cacertfile = "C:/certs/cacert.pem"
verify_peer = false
fail_if_no_peer_cert = false
}
```
Run command:
```
nanomq.exe start --conf "C:\Program Files (x86)\protocol\config\nanomq.conf"
```
Error:
2023-12-05 14:58:44 [9352] FATAL D:\a\nanomq\nanomq\nanomq\apps\broker.c:1053 broker: nng_listener_create tls
nng_listener_create tls: Not supported
**Environment Details**
- Window 10 Pro 22H2
- nanomq-0.20.8-windows-x86_64
| Config SSL on windows does not work | https://api.github.com/repos/nanomq/nanomq/issues/1550/comments | 8 | 2023-12-05T08:34:25Z | 2024-05-09T08:47:28Z | https://github.com/nanomq/nanomq/issues/1550 | 2,025,605,436 | 1,550 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Here is the part of the help information.
```
-i, --interval <ms> Interval of publishing message (ms) [default: 10]
-i, --identifier <identifier> The client identifier UTF-8 String (default randomly generated string)
```
**Actual Behavior**
It seems the `-i` value will be set to identifier.
**Environment Details**
- NanoMQ version. latest
- Operating system and version
- Compiler and language used
- testing scenario
| Confusing help information of nanomq_cli | https://api.github.com/repos/nanomq/nanomq/issues/1547/comments | 3 | 2023-11-29T10:37:39Z | 2024-04-19T08:28:03Z | https://github.com/nanomq/nanomq/issues/1547 | 2,016,290,014 | 1,547 |
[
"emqx",
"nanomq"
] | Hello,
Are there any plans on developing an admin GUI for nanomq? | Are there any GUI plans? | https://api.github.com/repos/nanomq/nanomq/issues/1542/comments | 1 | 2023-11-21T20:54:50Z | 2024-07-22T06:12:52Z | https://github.com/nanomq/nanomq/issues/1542 | 2,005,115,611 | 1,542 |
[
"emqx",
"nanomq"
] | **Describe the bug**
When I call certain HTTP API interfaces, the nanomq server returns a 404 error. These interfaces include
/api/v4/mqtt/subscribe
/api/v4/mqtt/unsubscribe
/api/v4/mqtt/publish_batch
/api/v4/mqtt/subscribe_batch
** Environment Details **
- NanoMQ version is 0.20.6
- I started the nanomq service through docker , and the image version is emqx/nanomq:0.20.6-full
Thanks for look at this problem. | Feature: http api response 404 | https://api.github.com/repos/nanomq/nanomq/issues/1538/comments | 1 | 2023-11-20T03:16:15Z | 2024-05-09T08:38:48Z | https://github.com/nanomq/nanomq/issues/1538 | 2,001,283,014 | 1,538 |
[
"emqx",
"nanomq"
] | **Describe the bug**
When one or more subscription entries are set dynamically but the SUBSCRIBE request(s) fails due to some network error, nanomq never retry subscription even after network is up.
**Expected behavior**
Whether the first attempts of dynamic subscription succeeds or fails due to some network error, nanomq should send subscription requests after network is up (that is, after MQTT CONNECT is successfully done).
**Actual Behavior**
Dynamic bridge never retry subscription if the first SUBSCRIBE attempts failed.
I feel this behavior is not a bug. It seems nanomq maintains just only succeeded dynamic subscriptions.
But in real use cases, I think such behavior is not user-friendly because the client must maintain the failed subscriptions list and continue to retry it.
It would be nice if dynamic subscription behaves just like static subscription (at this moment, static subscription seems to re-send subscription requests after MQTT CONNECT is successfully done).
**To Reproduce**
## 1. Edit nanomq.conf
```
system {
num_taskq_thread = 0
max_taskq_thread = 0
parallel = 0
}
mqtt {
max_packet_size = 1MB
max_mqueue_len = 16
max_inflight_window = 2048
max_awaiting_rel = 10s
await_rel_timeout = 10s
retry_interval = 7s
keepalive_multiplier = 1.25
property_size = 32
}
listeners.tcp {
bind = "0.0.0.0:50201"
}
listeners.ws {
enable = false
}
listeners.wss {
enable = false
}
sqlite {
disk_cache_size = 102400
mounted_file_path="/tmp/nanomq"
flush_mem_threshold = 100
resend_interval = 5000
}
http_server {
port = 50200
limit_conn = 32
username = user
password = pass
auth_type = basic
}
log {
to = [console]
level = warn
}
webhook {
enable = false
}
auth {
allow_anonymous = true
no_match = allow
deny_action = ignore
cache = {
max_size = 32
ttl = 1m
}
}
bridges.mqtt.broker-0 {
enable = true
server = "mqtt-tcp://broker.hivemq.com:1883"
# broker.emqx.io:1883 is not running at this moment.
# server = "tls+mqtt-tcp://broker.emqx.io:8883"
# server = "mqtt-quic://broker.emqx.io:14567"
proto_ver = 5
clientid="7dfa9ie3mbbr7qr36g9w5rq"
keepalive = 10s
clean_start = false
username = org-1
password = passwd
# # Properties for MQTT V5
conn_properties = {
maximum_packet_size = 1048576
receive_maximum = 16
topic_alias_maximum = 64
request_problem_infomation = 1
request_response_infomation = 0
session_expiry_interval = 182
user_property = {
project_name = product
}
}
tls {
enable = false
}
quic_keepalive = 120s
quic_idle_timeout = 120s
quic_discon_timeout = 20s
quic_handshake_timeout = 60s
quic_send_idle_timeout = 2s
quic_initial_rtt_ms = 800ms
quic_max_ack_delay_ms = 100ms
hybrid_bridging = true
quic_multi_stream = false
quic_qos_priority = true
quic_0rtt = true
will {
topic = "test0/org/1/edge/7dfa9ie3mbbr7qr36g9w5rqj6h632myun7e87crgf73an832zmf2/status"
qos = 1
retain = false
payload = "{\"org_id\":1, \"machine_id\": \"7dfa9ie3mbbr7qr36g9w5rqj6h632myun7e87crgf73an832zmf2\"}"
properties = {
payload_format_indicator = 1
message_expiry_interval = 182
content_type = "application/json; charset=utf-8; msgType=\"Disconnected\""
response_topic = ""
correlation_data = ""
will_delay_interval = 56
user_property = {
project_name = product
}
}
}
forwards = [
{
remote_topic = "test0/org/1/edge/7dfa9ie3mbbr7qr36g9w5rqj6h632myun7e87crgf73an832zmf2/status"
local_topic = "local/edge/status"
qos = 0
}
]
max_parallel_processes = 2
max_send_queue_len = 32
max_recv_queue_len = 128
}
bridges.mqtt.cache {
disk_cache_size = 102400
mounted_file_path="/tmp/nanomq"
flush_mem_threshold = 100
resend_interval = 5000
}
```
## 2. Start nanomq with the above configuration
`nanomq start --conf nanomq.conf`
## 3. Link-down network I/F on the nanomq host
## 4. Set subscription entry(s) dynamically
```
curl --basic -u user:pass --location 'http://localhost:50200/api/v4/bridges/sub/broker-0' \
--header 'Content-Type: application/json' \
--data '{
"data": {
"subscription": [
{
"remote_topic": "test0/org/1/edge/7dfa9ie3mbbr7qr36g9w5rqj6h632myun7e87crgf73an832zmf2/cmd",
"local_topic": "local/edge/cmd",
"qos": 1
}
]
}
}'
```
It takes some time. maybe due to link-down.
The return value: `{"code":108}`
## 5. Link-up network I/F on the nanomq host
## 6. nanomq sends an MQTT CONNECT message, but ..
nanomq never sends MQTT SUBSCRIBE messages for the dynamically added subscription.
**Environment Details**
- NanoMQ version: 0.20.8
- Operating system and version: Archlinux (kernel 6.6.1-arch1-1)
- Compiler and language used: GCC 13.2.1, cmake 3.27.8, ninja 1.11.1
- testing scenario
**How to build the tested nanomq**
```
yay -S --needed --removemake --cleanafter cmake ninja boost
sudo rm -rf /opt/local/nanomq \
&& sudo rm -rf /var/tmp/nanomq-build \
&& mkdir /var/tmp/nanomq-build \
&& cd /var/tmp/nanomq-build \
&& git clone https://github.com/emqx/nanomq.git -b 0.20.8 \
&& cd nanomq \
&& git submodule update --init --recursive
cmake \
-B build_nanomq \
-G Ninja \
-DCMAKE_INSTALL_PREFIX="" \
-DCMAKE_BUILD_TYPE=None \
-DNNG_ENABLE_TLS=ON \
-DNNG_ENABLE_SQLITE=ON \
-DNNG_ENABLE_QUIC=ON \
-DQUIC_BUILD_SHARED=OFF \
-DENABLE_JWT=ON \
-DENABLE_RULE_ENGINE=ON \
-DENABLE_ACL=ON \
-DENABLE_SYSLOG=ON \
&& ninja -C build_nanomq \
&& DESTDIR=/opt/local/nanomq sudo -E ninja -C build_nanomq install \
&& sudo mv build_nanomq/install_manifest.txt /opt/local/nanomq/. \
&& cd /var/tmp \
&& rm -rf /var/tmp/nanomq-build
```
| Dynamic bridge never retry subscription if the first SUBSCRIBE attempts failed | https://api.github.com/repos/nanomq/nanomq/issues/1537/comments | 3 | 2023-11-19T15:23:40Z | 2023-11-21T02:52:41Z | https://github.com/nanomq/nanomq/issues/1537 | 2,000,894,719 | 1,537 |
[
"emqx",
"nanomq"
] | **Describe the bug**
MQTT bridge does not work over tls+mqtt-tcp. In other words, nanomq can not connect a broker over tls+mqtt-tcp.
**Expected behavior**
In case of a private CA, MQTT bridge should work over tls+mqtt-tcp **with** the private ca cert file.
In case of public CA, MQTT bridge should work over tls+mqtt-tcp **with/without** the ca cert file.
**Actual Behavior**
- In case that `bridges.mqtt.*.ssl.cacertfile` exists
The following error messages are shown.
```
ERROR /var/tmp/nanomq-build/nanomq/nng/src/supplemental/nanolib/conf_ver2.c:382 conf_tls_parse_ver2_base: Read keyfile (null) failed!
ERROR /var/tmp/nanomq-build/nanomq/nng/src/supplemental/nanolib/conf_ver2.c:386 conf_tls_parse_ver2_base: Read certfile (null) failed!
```
- In case that `bridges.mqtt.*.ssl` does not exists,
No error messages are shown.
- In both cases,
nanomq keeps on trying to establish TLS connection, but it can not connect because of `Unknown CA`.
**To Reproduce**
## 1. Edit nanomq.conf
```
system {
num_taskq_thread = 0
max_taskq_thread = 0
parallel = 0
}
mqtt {
max_packet_size = 1MB
max_mqueue_len = 16
max_inflight_window = 2048
max_awaiting_rel = 10s
await_rel_timeout = 10s
retry_interval = 7s
keepalive_multiplier = 1.25
property_size = 32
}
listeners.tcp {
bind = "0.0.0.0:1883"
}
listeners.ws {
enable = false
}
listeners.wss {
enable = false
}
sqlite {
disk_cache_size = 102400
mounted_file_path="/tmp/nanomq"
flush_mem_threshold = 100
resend_interval = 5000
}
http_server {
port = 50200
limit_conn = 32
username = user
password = pass
auth_type = basic
}
log {
to = [console]
level = warn
}
webhook {
enable = false
}
auth {
allow_anonymous = true
no_match = allow
deny_action = ignore
cache = {
max_size = 32
ttl = 1m
}
}
bridges.mqtt.broker-0 {
enable = true
# server = "mqtt-tcp://broker.emqx.io:1883"
server = "tls+mqtt-tcp://broker.emqx.io:8883"
# server = "mqtt-quic://broker.emqx.io:14567"
proto_ver = 5
clientid="7dfa9ie3mbbr7qr36g9w5rq"
keepalive = 10s
clean_start = false
username = org-1
password = passwd
# # Properties for MQTT V5
conn_properties = {
maximum_packet_size = 1048576
receive_maximum = 16
topic_alias_maximum = 64
request_problem_infomation = 1
request_response_infomation = 0
session_expiry_interval = 182
user_property = {
project_name = product
}
}
ssl {
# Downloaded from `https://assets.emqx.com/data/broker.emqx.io-ca.crt`
cacertfile = "/opt/local/nanomq/etc/broker.emqx.io-ca.crt"
}
# quic_keepalive = 120s
# quic_idle_timeout = 120s
# quic_discon_timeout = 20s
# quic_handshake_timeout = 60s
# quic_send_idle_timeout = 2s
# quic_initial_rtt_ms = 800ms
# quic_max_ack_delay_ms = 100ms
# hybrid_bridging = true
# quic_multi_stream = false
# quic_qos_priority = true
# quic_0rtt = true
will {
topic = "test0/org/1/edge/7dfa9ie3mbbr7qr36g9w5rqj6h632myun7e87crgf73an832zmf2/status"
qos = 1
retain = false
payload = "{\"org_id\":1, \"machine_id\": \"7dfa9ie3mbbr7qr36g9w5rqj6h632myun7e87crgf73an832zmf2\"}"
properties = {
payload_format_indicator = 1
message_expiry_interval = 182
content_type = "application/json; charset=utf-8; msgType=\"Disconnected\""
response_topic = ""
correlation_data = ""
will_delay_interval = 56
user_property = {
project_name = product
}
}
}
forwards = [
{
remote_topic = "test0/org/1/edge/7dfa9ie3mbbr7qr36g9w5rqj6h632myun7e87crgf73an832zmf2/status"
local_topic = "local/edge/status"
qos = 0
}
]
max_parallel_processes = 2
max_send_queue_len = 32
max_recv_queue_len = 128
}
bridges.mqtt.cache {
disk_cache_size = 102400
mounted_file_path="/tmp/nanomq"
flush_mem_threshold = 100
resend_interval = 5000
}
```
## 2. Start nanomq with the above configuration
`nanomq start --conf nanomq.conf`
- In case that the above `bridges.mqtt.broker-0.ssl` exists in the config,
The following error messages are shown.
```
ERROR /var/tmp/nanomq-build/nanomq/nng/src/supplemental/nanolib/conf_ver2.c:382 conf_tls_parse_ver2_base: Read keyfile (null) failed!
ERROR /var/tmp/nanomq-build/nanomq/nng/src/supplemental/nanolib/conf_ver2.c:386 conf_tls_parse_ver2_base: Read certfile (null) failed!
```
- In case that `bridges.mqtt.*.ssl` is removed from the config,
No error messages are shown.
nanomq keeps on trying to establish TLS connection, but it can not connect because of `Unknown CA`.
Here is wireshark capture image. It seems nanomq can not verify the certification authority.

**Environment Details**
- NanoMQ version: 0.20.6
- Operating system and version: Archlinux (kernel 6.6.1-arch1-1)
- Compiler and language used: GCC 13.2.1, cmake 3.27.8, ninja 1.11.1
- testing scenario
**How to build the tested nanomq**
```
yay -S --needed --removemake --cleanafter cmake ninja boost
sudo rm -rf /opt/local/nanomq \
&& sudo rm -rf /var/tmp/nanomq-build \
&& mkdir /var/tmp/nanomq-build \
&& cd /var/tmp/nanomq-build \
&& git clone https://github.com/emqx/nanomq.git -b 0.20.6 \
&& cd nanomq \
&& git submodule update --init --recursive
cmake \
-B build_nanomq \
-G Ninja \
-DCMAKE_INSTALL_PREFIX="" \
-DCMAKE_BUILD_TYPE=None \
-DNNG_ENABLE_TLS=ON \
-DNNG_ENABLE_SQLITE=ON \
-DNNG_ENABLE_QUIC=ON \
-DQUIC_BUILD_SHARED=OFF \
-DENABLE_JWT=ON \
-DENABLE_RULE_ENGINE=ON \
-DENABLE_ACL=ON \
-DENABLE_SYSLOG=ON \
&& ninja -C build_nanomq \
&& DESTDIR=/opt/local/nanomq sudo -E ninja -C build_nanomq install \
&& sudo mv build_nanomq/install_manifest.txt /opt/local/nanomq/. \
&& cd /var/tmp \
&& rm -rf /var/tmp/nanomq-build
``` | MQTT bridge does not work over tls+mqtt-tcp | https://api.github.com/repos/nanomq/nanomq/issues/1535/comments | 5 | 2023-11-19T07:39:38Z | 2023-11-21T02:55:11Z | https://github.com/nanomq/nanomq/issues/1535 | 2,000,737,312 | 1,535 |
[
"emqx",
"nanomq"
] | **Describe the bug**
nanomq can not bridge MQTT messages on dynamically added subscription from remote MQTT broker.
**Expected behavior**
Such as static subscription (statically written in conf file), nanomq should bridge MQTT messages on dynamically added subscription.
**Actual Behavior**
`nni aio recv error!! Connection shutdown` and `tcptran_pipe_recv_cb: parse error rv: 139` occurs.
**To Reproduce**
## 1. Edit nanomq.conf
```
system {
num_taskq_thread = 0
max_taskq_thread = 0
parallel = 0
}
mqtt {
max_packet_size = 1MB
max_mqueue_len = 16
max_inflight_window = 2048
max_awaiting_rel = 10s
await_rel_timeout = 10s
retry_interval = 7s
keepalive_multiplier = 1.25
property_size = 32
}
listeners.tcp {
bind = "0.0.0.0:50201"
}
listeners.ws {
enable = false
}
listeners.wss {
enable = false
}
sqlite {
disk_cache_size = 102400
mounted_file_path="/tmp/nanomq"
flush_mem_threshold = 100
resend_interval = 5000
}
http_server {
port = 50200
limit_conn = 32
username = user
password = pass
auth_type = basic
}
log {
to = [console]
level = warn
}
webhook {
enable = false
}
auth {
allow_anonymous = true
no_match = allow
deny_action = ignore
cache = {
max_size = 32
ttl = 1m
}
}
bridges.mqtt.broker-0 {
enable = true
server = "mqtt-tcp://broker.emqx.io:1883"
# server = "tls+mqtt-tcp://broker.emqx.io:8883"
# server = "mqtt-quic://broker.emqx.io:14567"
proto_ver = 5
clientid="7dfa9ie3mbbr7qr36g9w5rq"
keepalive = 10s
clean_start = false
username = org-1
password = passwd
# # Properties for MQTT V5
conn_properties = {
maximum_packet_size = 1048576
receive_maximum = 16
topic_alias_maximum = 64
request_problem_infomation = 1
request_response_infomation = 0
session_expiry_interval = 182
user_property = {
project_name = product
}
}
tls {
enable = false
}
quic_keepalive = 120s
quic_idle_timeout = 120s
quic_discon_timeout = 20s
quic_handshake_timeout = 60s
quic_send_idle_timeout = 2s
quic_initial_rtt_ms = 800ms
quic_max_ack_delay_ms = 100ms
hybrid_bridging = true
quic_multi_stream = false
quic_qos_priority = true
quic_0rtt = true
will {
topic = "test0/org/1/edge/7dfa9ie3mbbr7qr36g9w5rqj6h632myun7e87crgf73an832zmf2/status"
qos = 1
retain = false
payload = "{\"org_id\":1, \"machine_id\": \"7dfa9ie3mbbr7qr36g9w5rqj6h632myun7e87crgf73an832zmf2\"}"
properties = {
payload_format_indicator = 1
message_expiry_interval = 182
content_type = "application/json; charset=utf-8; msgType=\"Disconnected\""
response_topic = ""
correlation_data = ""
will_delay_interval = 56
user_property = {
project_name = product
}
}
}
forwards = [
{
remote_topic = "test0/org/1/edge/7dfa9ie3mbbr7qr36g9w5rqj6h632myun7e87crgf73an832zmf2/status"
local_topic = "local/edge/status"
qos = 0
}
]
max_parallel_processes = 2
max_send_queue_len = 32
max_recv_queue_len = 128
}
bridges.mqtt.cache {
disk_cache_size = 102400
mounted_file_path="/tmp/nanomq"
flush_mem_threshold = 100
resend_interval = 5000
}
```
## 2. Start nanomq with the above configuration
`nanomq start --conf nanomq.conf`
## 3. Subscribe the topic `local/edge/cmd` on the local nanomq
```
mosquitto_sub -h 127.0.0.1 -p 50201 -V mqttv5 \
-u "org-1" \
-P "passwd" \
-i "local-sub-0" \
-t "local/edge/cmd" \
-k 56 \
-x 182 \
-q 0 \
-d
```
## 3. Add one bridge subscription dynamically
```
curl --basic -u user:pass --location 'http://localhost:50200/api/v4/bridges/sub/broker-0' \
--header 'Content-Type: application/json' \
--data '{
"data": {
"subscription": [
{
"remote_topic": "test0/org/1/edge/7dfa9ie3mbbr7qr36g9w5rqj6h632myun7e87crgf73an832zmf2/cmd",
"local_topic": "local/edge/cmd",
"qos": 1
}
]
}
}'
```
The return value: `{"code":0}`
## 4. Publish a message to the dynamically added topic on the remote broker
```
mosquitto_pub -h broker.emqx.io -p 1883 -V mqttv5 \
-u "org-1" \
-P "7dfa9ie3mbbr7qr36g9w5rqj6h632myun7e87crgf73an832zmf2" \
-i "remote-sub-1" \
-t "test0/org/1/edge/7dfa9ie3mbbr7qr36g9w5rqj6h632myun7e87crgf73an832zmf2/cmd" \
-m "bb" \
-k 56 \
-q 0 \
-x 182 \
--property publish content-type "application/json; charset=utf-8" \
--property publish correlation-data 11 \
--property publish message-expiry-interval 13 \
--property publish payload-format-indicator 1 \
--property publish response-topic response \
--property publish topic-alias 56 \
--property publish user-property KEY1 VALUE1
```
## 5. The first message is successfully bridged to the local subscriber, but ..
The second and any later messages are not bridged. The error messages are,
```
2023-11-17 19:51:59 [17484] WARN nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:612 tcptran_pipe_recv_cb: nni aio recv error!! Connection shutdown
2023-11-17 19:51:59 [17484] WARN /nanomq/nng/src/sp/transport/mqtt/broker_tcp.c:880 tcptran_pipe_recv_cb: tcptran_pipe_recv_cb: parse error rv: 139
```
TRACE log is here.
[nanomq.log](https://github.com/emqx/nanomq/files/13390770/nanomq.log)
**Environment Details**
- NanoMQ version: 0.20.6
- Operating system and version: Archlinux (kernel 6.6.1-arch1-1)
- Compiler and language used: GCC 13.2.1, cmake 3.27.8, ninja 1.11.1
- testing scenario
**How to build the tested nanomq**
```
yay -S --needed --removemake --cleanafter cmake ninja boost
sudo rm -rf /opt/local/nanomq \
&& sudo rm -rf /var/tmp/nanomq-build \
&& mkdir /var/tmp/nanomq-build \
&& cd /var/tmp/nanomq-build \
&& git clone https://github.com/emqx/nanomq.git -b 0.20.6 \
&& cd nanomq \
&& git submodule update --init --recursive
cmake \
-B build_nanomq \
-G Ninja \
-DCMAKE_INSTALL_PREFIX="" \
-DCMAKE_BUILD_TYPE=None \
-DNNG_ENABLE_TLS=ON \
-DNNG_ENABLE_SQLITE=ON \
-DNNG_ENABLE_QUIC=ON \
-DQUIC_BUILD_SHARED=OFF \
-DENABLE_JWT=ON \
-DENABLE_RULE_ENGINE=ON \
-DENABLE_ACL=ON \
-DENABLE_SYSLOG=ON \
&& ninja -C build_nanomq \
&& DESTDIR=/opt/local/nanomq sudo -E ninja -C build_nanomq install \
&& sudo mv build_nanomq/install_manifest.txt /opt/local/nanomq/. \
&& cd /var/tmp \
&& rm -rf /var/tmp/nanomq-build
``` | Failed to bridge on a dynamically added subscription | https://api.github.com/repos/nanomq/nanomq/issues/1532/comments | 8 | 2023-11-17T10:59:26Z | 2023-11-29T05:02:52Z | https://github.com/nanomq/nanomq/issues/1532 | 1,998,836,537 | 1,532 |
[
"emqx",
"nanomq"
] | **Describe the bug**
It appears that my program is failing due to the inclusion of Request Problem Information in the CONNACK.
**Expected behavior**
It is successful with Mosquitto. The output is as follows.
```
mqtt connection up
mqtt subscription made
received message on topic PahoGoTestTopic; body: TestMessage: 1 (retain: false)
received message on topic PahoGoTestTopic; body: TestMessage: 2 (retain: false)
received message on topic PahoGoTestTopic; body: TestMessage: 3 (retain: false)
received message on topic PahoGoTestTopic; body: TestMessage: 4 (retain: false)
```
**Actual Behavior**
The program terminates with an error.
```
error whilst attempting connection: failed to connect to mqtt://localhost:1883: invalid Prop type 23 for packet 2
```
**To Reproduce**
- main.go
```go
package main
import (
"context"
"fmt"
"net/url"
"os"
"os/signal"
"strconv"
"syscall"
"time"
"github.com/eclipse/paho.golang/autopaho"
"github.com/eclipse/paho.golang/paho"
)
const clientID = "PahoGoClient" // Change this to something random if using a public test server
const topic = "PahoGoTestTopic"
func main() {
// App will run until cancelled by user (e.g. ctrl-c)
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
// We will connect to the Eclipse test server (note that you may see messages that other users publish)
u, err := url.Parse("mqtt://localhost:1883")
if err != nil {
panic(err)
}
cliCfg := autopaho.ClientConfig{
ServerUrls: []*url.URL{u},
KeepAlive: 20, // Keepalive message should be sent every 20 seconds
// CleanStartOnInitialConnection defaults to false. Setting this to true will clear the session on the first connection.
CleanStartOnInitialConnection: false,
// SessionExpiryInterval - Seconds that a session will survive after disconnection.
// It is important to set this because otherwise, any queued messages will be lost if the connection drops and
// the server will not queue messages while it is down. The specific setting will depend upon your needs
// (60 = 1 minute, 3600 = 1 hour, 86400 = one day, 0xFFFFFFFE = 136 years, 0xFFFFFFFF = don't expire)
SessionExpiryInterval: 60,
OnConnectionUp: func(cm *autopaho.ConnectionManager, connAck *paho.Connack) {
fmt.Println("mqtt connection up")
// Subscribing in the OnConnectionUp callback is recommended (ensures the subscription is reestablished if
// the connection drops)
if _, err := cm.Subscribe(context.Background(), &paho.Subscribe{
Subscriptions: []paho.SubscribeOptions{
{Topic: topic, QoS: 1},
},
}); err != nil {
fmt.Printf("failed to subscribe (%s). This is likely to mean no messages will be received.", err)
}
fmt.Println("mqtt subscription made")
},
OnConnectError: func(err error) { fmt.Printf("error whilst attempting connection: %s\n", err) },
// eclipse/paho.golang/paho provides base mqtt functionality, the below config will be passed in for each connection
ClientConfig: paho.ClientConfig{
// If you are using QOS 1/2, then it's important to specify a client id (which must be unique)
ClientID: clientID,
// The Router will receive any inbound messages (the router can map for you or just pass messages to a single handler)
Router: paho.NewStandardRouterWithDefault(func(m *paho.Publish) {
fmt.Printf("received message on topic %s; body: %s (retain: %t)\n", m.Topic, m.Payload, m.Retain)
}),
OnClientError: func(err error) { fmt.Printf("client error: %s\n", err) },
OnServerDisconnect: func(d *paho.Disconnect) {
if d.Properties != nil {
fmt.Printf("server requested disconnect: %s\n", d.Properties.ReasonString)
} else {
fmt.Printf("server requested disconnect; reason code: %d\n", d.ReasonCode)
}
},
},
}
c, err := autopaho.NewConnection(ctx, cliCfg) // starts process; will reconnect until context cancelled
if err != nil {
panic(err)
}
// Wait for the connection to come up
if err = c.AwaitConnection(ctx); err != nil {
panic(err)
}
ticker := time.NewTicker(time.Second)
msgCount := 0
defer ticker.Stop()
for {
select {
case <-ticker.C:
msgCount++
// Publish a test message (use PublishViaQueue if you don't want to wait for a response)
if _, err = c.Publish(ctx, &paho.Publish{
QoS: 1,
Topic: topic,
Payload: []byte("TestMessage: " + strconv.Itoa(msgCount)),
}); err != nil {
if ctx.Err() != nil {
panic(err) // Publish will exit when context cancelled or if something went wrong
}
}
continue
case <-ctx.Done():
}
break
}
fmt.Println("signal caught - exiting")
<-c.Done() // Wait for clean shutdown (cancelling the context triggered the shutdown)
}
```
This is almost identical to https://github.com/eclipse/paho.golang/blob/5f4de1dba813923842d81a6cffbecaf33b60cd1d/autopaho/examples/basics/basics.go, but the broker URL has been changed.
This code requires the latest version of paho.golang.
```bash
go get github.com/eclipse/paho.golang@5f4de1dba813923842d81a6cffbecaf33b60cd1d
```
- nanomq.conf
```
mqtt {
property_size = 32
max_packet_size = 1MB
max_mqueue_len = 2048
retry_interval = 10s
keepalive_multiplier = 1.25
max_inflight_window = 2048
max_awaiting_rel = 10s
await_rel_timeout = 10s
}
listeners.tcp {
bind = "0.0.0.0:1883"
}
listeners.ws {
bind = "0.0.0.0:8083/mqtt"
}
http_server {
port = 8081
limit_conn = 2
username = admin
password = public
auth_type = basic
jwt {
public.keyfile = "/etc/certs/jwt/jwtRS256.key.pub"
}
}
log {
to = [file, console]
level = warn
dir = "/tmp"
file = "nanomq.log"
rotation {
size = 10MB
count = 5
}
}
auth {
allow_anonymous = true
no_match = allow
deny_action = ignore
cache = {
max_size = 32
ttl = 1m
}
}
```
- docker-compose.yaml
```yaml
version: '3.8'
services:
nanomq:
image: emqx/nanomq:0.20.6
ports:
- "1883:1883"
- "8083:8083"
- "8883:8883"
volumes:
- ./nanomq.conf:/etc/nanomq.conf
environment:
- NANO_MQ_CONF=/etc/nanomq.conf
```
** Environment Details **
- NanoMQ version
0.20.6(Docker)
- Operating system and version
```bash
% sw_vers
ProductName: macOS
ProductVersion: 14.1
BuildVersion: 23B74
```
- Compiler and language used
```
go version go1.21.1 darwin/arm64
```
- testing scenario
```bash
docker-compose up
go run main.go
```
**Client SDK**
github.com/eclipse/paho.golang v0.12.1-0.20231115041409-5f4de1dba813
**Additional context**
Add any other context about the problem here.
Using Wireshark, it can be observed that the CONNACK includes Request Problem Information.
To my knowledge, I think this is contrary to the MQTT V5 specification.
<img width="1460" alt="ss" src="https://github.com/emqx/nanomq/assets/38576286/69182592-62a1-4882-9c75-48e69c52470c">
| The CONNACK contains a Request Problem Information | https://api.github.com/repos/nanomq/nanomq/issues/1531/comments | 1 | 2023-11-17T09:43:33Z | 2023-12-22T09:16:19Z | https://github.com/nanomq/nanomq/issues/1531 | 1,998,698,957 | 1,531 |
[
"emqx",
"nanomq"
] | compatibility
**Additional context**


| docs compatibility for 'tip' in pure markdown | https://api.github.com/repos/nanomq/nanomq/issues/1528/comments | 2 | 2023-11-15T08:29:23Z | 2023-12-22T09:16:32Z | https://github.com/nanomq/nanomq/issues/1528 | 1,994,289,192 | 1,528 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Leakage.
```
==217216==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 320 byte(s) in 8 object(s) allocated from:
#0 0x7fea728d8cc7 in calloc (/lib64/libasan.so.8+0xd8cc7) (BuildId: 542ad02088f38edfdba9d4bfa465b2299f512d3e)
#1 0x4944bc in nni_zalloc /home/wangha/Documents/nanomq/nng/src/platform/posix/posix_alloc.c:26
#2 0x465b2e in nng_zalloc /home/wangha/Documents/nanomq/nng/src/nng.c:66
#3 0x4475fe in post_mqtt_bridge_sub /home/wangha/Documents/nanomq/nanomq/rest_api.c:3458
#4 0x437d0f in process_request /home/wangha/Documents/nanomq/nanomq/rest_api.c:885
#5 0x44c58c in inproc_cb /home/wangha/Documents/nanomq/nanomq/web_server.c:403
#6 0x48f2f9 in nni_task_exec /home/wangha/Documents/nanomq/nng/src/core/taskq.c:144
#7 0x473819 in nni_aio_finish_impl /home/wangha/Documents/nanomq/nng/src/core/aio.c:454
#8 0x473893 in nni_aio_finish_sync /home/wangha/Documents/nanomq/nng/src/core/aio.c:469
#9 0x4b6cb6 in rep0_pipe_recv_cb /home/wangha/Documents/nanomq/nng/src/sp/protocol/reqrep0/rep.c:566
#10 0x48eb10 in nni_taskq_thread /home/wangha/Documents/nanomq/nng/src/core/taskq.c:50
#11 0x48fe29 in nni_thr_wrap /home/wangha/Documents/nanomq/nng/src/core/thread.c:94
#12 0x49859c in nni_plat_thr_main /home/wangha/Documents/nanomq/nng/src/platform/posix/posix_thread.c:266
#13 0x7fea722ae946 in start_thread (/lib64/libc.so.6+0x8c946) (BuildId: 7026fe8c129a523e07856d7c96306663ceab6e24)
SUMMARY: AddressSanitizer: 320 byte(s) leaked in 8 allocation(s)
```
**To Reproduce**
Send http request and leakage happenes.
```
curl --location 'http://127.0.0.1:8081/api/v4/bridges/sub/emqx' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW46cHVibGlj' \
--data '{
"data": {
"subscription": [
{
"topic": "shit",
"qos": 0
},
{
"topic": "cmd/topic5",
"qos": 2
}
],
"sub_properties": {
"identifier": 1,
"user_properties": [
{
"key": "key1",
"value": "value1"
},
{
"key": "key2",
"value": "value2"
}
]
}
}
}
'
curl --location 'http://127.0.0.1:8081/api/v4/bridges/sub/emqx' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW46cHVibGlj' \
--data '{
"data": {
"subscription": [
{
"topic": "cmd/topic1",
"qos": 6666666
},
{
"topic": "cmd/topic5",
"qos": 1
}
],
"sub_properties": {
"identifier": 1,
"user_properties": [
{
"key": "key1",
"value": "value1"
},
{
"key": "key2",
"value": "value2"
}
]
}
}
}
'
```
| Memory leak happenes when dynamically updating bridge with old http request. | https://api.github.com/repos/nanomq/nanomq/issues/1526/comments | 4 | 2023-11-13T04:54:14Z | 2023-11-20T06:53:59Z | https://github.com/nanomq/nanomq/issues/1526 | 1,989,890,233 | 1,526 |
[
"emqx",
"nanomq"
] | bridge disconnected cause the broker crashed.
This is a regression bug introduced by me.
Apologize for troubles. | Notifying msg of bridging is not working | https://api.github.com/repos/nanomq/nanomq/issues/1523/comments | 2 | 2023-11-13T03:50:04Z | 2023-11-16T06:59:55Z | https://github.com/nanomq/nanomq/issues/1523 | 1,989,837,608 | 1,523 |
[
"emqx",
"nanomq"
] | I user VS2022 build code , build OK .
do this cmd ,
D:\Users\Administrator\Desktop\nanoMq\nanomq\build\nanomq\Debug>nanomq.exe start --conf D:\myemq.conf
broker nng_listen: Permission denied | Windows Run error : broker nng_listen: Permission denied | https://api.github.com/repos/nanomq/nanomq/issues/1521/comments | 5 | 2023-11-07T07:46:53Z | 2023-11-07T09:43:10Z | https://github.com/nanomq/nanomq/issues/1521 | 1,980,748,402 | 1,521 |
[
"emqx",
"nanomq"
] | **Describe the bug**
double free in rest api put sqlite rule to cause crash
**To Reproduce**
post a sqlite rule in advance, then use put to update the sqlite rule. nanomq will crash for double free.
** Environment Details **
- NanoMQ version : nanomq master latest
- Operating system and version : ubt 22.04
| Rest api put sqlite rule may cause crash | https://api.github.com/repos/nanomq/nanomq/issues/1520/comments | 2 | 2023-11-07T06:24:18Z | 2023-11-07T11:16:10Z | https://github.com/nanomq/nanomq/issues/1520 | 1,980,640,051 | 1,520 |
[
"emqx",
"nanomq"
] | **Describe the bug**
conn_param and several strings are not freed.
**Expected behavior**
no memleak
**Actual Behavior**
memleak
**To Reproduce**
use mosquitto_sub and disconnect, stop nanomq, and there is the memleaks.
** Environment Details **
- NanoMQ version latest master
- Operating system and version ubt 22.04
**Client SDK**
libmosquitto 2.0.11
**Additional context**
=================================================================
==26571==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 264 byte(s) in 1 object(s) allocated from:
#0 0x7f7931cb4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x56172cb1e159 in nni_alloc /home/hermann/Documents/hermannDocuments/nanomq/nng/src/platform/posix/posix_alloc.c:20
#2 0x56172caebf9e in nng_alloc /home/hermann/Documents/hermannDocuments/nanomq/nng/src/nng.c:60
#3 0x56172cb38813 in conn_param_alloc /home/hermann/Documents/hermannDocuments/nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:844
#4 0x56172cc1ec3b in tlstran_pipe_nego_cb /home/hermann/Documents/hermannDocuments/nanomq/nng/src/sp/transport/mqtts/broker_tls.c:356
#5 0x56172cb18584 in nni_taskq_thread /home/hermann/Documents/hermannDocuments/nanomq/nng/src/core/taskq.c:50
#6 0x56172cb1993c in nni_thr_wrap /home/hermann/Documents/hermannDocuments/nanomq/nng/src/core/thread.c:94
#7 0x56172cb22ae5 in nni_plat_thr_main /home/hermann/Documents/hermannDocuments/nanomq/nng/src/platform/posix/posix_thread.c:266
#8 0x7f7931894ac2 in start_thread nptl/pthread_create.c:442
Indirect leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x7f7931cb4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x56172cb1e159 in nni_alloc /home/hermann/Documents/hermannDocuments/nanomq/nng/src/platform/posix/posix_alloc.c:20
#2 0x56172cb17d6a in nni_strdup /home/hermann/Documents/hermannDocuments/nanomq/nng/src/core/strs.c:34
#3 0x56172caec0a6 in nng_strdup /home/hermann/Documents/hermannDocuments/nanomq/nng/src/nng.c:102
#4 0x56172cb36820 in conn_handler /home/hermann/Documents/hermannDocuments/nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:633
#5 0x56172cc1ece5 in tlstran_pipe_nego_cb /home/hermann/Documents/hermannDocuments/nanomq/nng/src/sp/transport/mqtts/broker_tls.c:358
#6 0x56172cb18584 in nni_taskq_thread /home/hermann/Documents/hermannDocuments/nanomq/nng/src/core/taskq.c:50
#7 0x56172cb1993c in nni_thr_wrap /home/hermann/Documents/hermannDocuments/nanomq/nng/src/core/thread.c:94
#8 0x56172cb22ae5 in nni_plat_thr_main /home/hermann/Documents/hermannDocuments/nanomq/nng/src/platform/posix/posix_thread.c:266
#9 0x7f7931894ac2 in start_thread nptl/pthread_create.c:442
Indirect leak of 5 byte(s) in 1 object(s) allocated from:
#0 0x7f7931cb4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x56172cb1e159 in nni_alloc /home/hermann/Documents/hermannDocuments/nanomq/nng/src/platform/posix/posix_alloc.c:20
#2 0x56172caebf9e in nng_alloc /home/hermann/Documents/hermannDocuments/nanomq/nng/src/nng.c:60
#3 0x56172cb33e10 in copyn_utf8_str /home/hermann/Documents/hermannDocuments/nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:241
#4 0x56172cb359d4 in conn_handler /home/hermann/Documents/hermannDocuments/nanomq/nng/src/sp/protocol/mqtt/mqtt_parser.c:570
#5 0x56172cc1ece5 in tlstran_pipe_nego_cb /home/hermann/Documents/hermannDocuments/nanomq/nng/src/sp/transport/mqtts/broker_tls.c:358
#6 0x56172cb18584 in nni_taskq_thread /home/hermann/Documents/hermannDocuments/nanomq/nng/src/core/taskq.c:50
#7 0x56172cb1993c in nni_thr_wrap /home/hermann/Documents/hermannDocuments/nanomq/nng/src/core/thread.c:94
#8 0x56172cb22ae5 in nni_plat_thr_main /home/hermann/Documents/hermannDocuments/nanomq/nng/src/platform/posix/posix_thread.c:266
#9 0x7f7931894ac2 in start_thread nptl/pthread_create.c:442
SUMMARY: AddressSanitizer: 285 byte(s) leaked in 3 allocation(s).
| Several memleaks in TLS | https://api.github.com/repos/nanomq/nanomq/issues/1519/comments | 9 | 2023-11-07T06:08:22Z | 2023-12-08T08:03:28Z | https://github.com/nanomq/nanomq/issues/1519 | 1,980,615,628 | 1,519 |
[
"emqx",
"nanomq"
] | Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19044.
-- NanoMQ versions --
Configuring for NanoMQ version 0.20.6
-- Build NanoMQ with ACL support --
-- MODE [Release] --
CMake Error at CMakeLists.txt:322 (add_subdirectory):
The source directory
D:/Users/Administrator/Desktop/nanomq-master/git/nanomq/nng | Windows cmake build error | https://api.github.com/repos/nanomq/nanomq/issues/1518/comments | 2 | 2023-11-06T09:35:09Z | 2023-11-07T08:30:45Z | https://github.com/nanomq/nanomq/issues/1518 | 1,978,693,437 | 1,518 |
[
"emqx",
"nanomq"
] | The QoS_priority: ``bridge.mqtt.emqx.quic_qos_priority`` is broken since 0.20.0, will cause program panic.
Will fix this within this week.
| QoS priority is broken after 0.20.0 | https://api.github.com/repos/nanomq/nanomq/issues/1515/comments | 0 | 2023-11-02T14:19:24Z | 2023-11-22T05:24:56Z | https://github.com/nanomq/nanomq/issues/1515 | 1,974,364,019 | 1,515 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Seeing issues with nanomq starting as a zombie process when built for this architecture, seems to work on 64bit arm environments but not for 32bit arm environment.
**Expected behavior**
nanomq should start up not as a zombie process, and should be killable.
**Actual Behavior**
nanomq never starts up successfully
**To Reproduce**
If possible include actual reproduction test code here.
Minimal C test cases are perferred.
**Environment Details**
- NanoMQ version
- 0.20.5
- Operating system and version
- Linux imx6ull 5.4.70-2.3.0 1 PREEMPT Fri Aug 11 07:46:10 UTC 2023 armv7l armv7l armv7l GNU/Linux
- Compiler and language used
nanomq old_config file has:
websocket.enable = false
enable_ipc_internal = false
compiler:
armv7a_gcc_6_5_0
binary:
/usr/bin/nanomq: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=8563969b188aac30e2eed2df45bbf3bb2cfdbbfc, stripped
testing scenario
Using on a armv7a embedded device, we also have a aarch64 device that compiles successfully and runs properly on the new release.
**Client SDK**
We are using AWS IOT core on the other side.
If possible include the mqtt sdk you used to connect to nanomq
Minimal C test cases are perferred.
**Additional context**
Add any other context about the problem here.
Valgrind output when running:
root@imx6ull~# valgrind --leak-check=full nanomq start --url nmq-tcp://127.0.0.1:1234 --old_conf .nanomq_config.conf
==16633== Memcheck, a memory error detector
==16633== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==16633== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==16633== Command: nanomq start --url nmq-tcp://127.0.0.1:1234 --old_conf ./nanomq_config.conf
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x31D0A: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x481A570: calloc (vg_replace_malloc.c:762)
==16633== by 0x31D31: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x481BE94: strncpy (vg_replace_strmem.c:552)
==16633== by 0x31D3B: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x481BEC0: strncpy (vg_replace_strmem.c:552)
==16633== by 0x31D3B: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x481BF10: strncpy (vg_replace_strmem.c:552)
==16633== by 0x31D3B: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x481BF34: strncpy (vg_replace_strmem.c:552)
==16633== by 0x31D3B: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x328CC: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x481A570: calloc (vg_replace_malloc.c:762)
==16633== by 0x328F3: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x481BE94: strncpy (vg_replace_strmem.c:552)
==16633== by 0x328FD: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x481BEC0: strncpy (vg_replace_strmem.c:552)
==16633== by 0x328FD: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x481BF10: strncpy (vg_replace_strmem.c:552)
==16633== by 0x328FD: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x481BF34: strncpy (vg_replace_strmem.c:552)
==16633== by 0x328FD: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x31A4C: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x34F60: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x481A570: calloc (vg_replace_malloc.c:762)
==16633== by 0x34F8F: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x481BE94: strncpy (vg_replace_strmem.c:552)
==16633== by 0x34F99: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x481BEC0: strncpy (vg_replace_strmem.c:552)
==16633== by 0x34F99: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x481BF10: strncpy (vg_replace_strmem.c:552)
==16633== by 0x34F99: ??? (in /usr/bin/nanomq)
==16633==
==16633== Conditional jump or move depends on uninitialised value(s)
==16633== at 0x481BF34: strncpy (vg_replace_strmem.c:552)
==16633== by 0x34F99: ??? (in /usr/bin/nanomq)
==16633==
NanoMQ Broker is started successfully!
==16633== Thread 8 nng:task:
==16633== Invalid read of size 1
==16633== at 0x481BAD8: strlen (vg_replace_strmem.c:461)
==16633== by 0x460D599F: __vfprintf_internal (vfprintf-internal.c:1688)
==16633== by 0x460E0FAD: __vsnprintf_internal (vsnprintf.c:114)
==16633== by 0x460C9D4D: snprintf (snprintf.c:31)
==16633== by 0x21097: ??? (in /usr/bin/nanomq)
==16633== Address 0x18b is not stack'd, malloc'd or (recently) free'd
==16633==
==16633==
==16633== Process terminating with default action of signal 11 (SIGSEGV)
==16633== Access not within mapped region at address 0x18B
==16633== at 0x481BAD8: strlen (vg_replace_strmem.c:461)
==16633== by 0x460D599F: __vfprintf_internal (vfprintf-internal.c:1688)
==16633== by 0x460E0FAD: __vsnprintf_internal (vsnprintf.c:114)
==16633== by 0x460C9D4D: snprintf (snprintf.c:31)
==16633== by 0x21097: ??? (in /usr/bin/nanomq)
==16633== If you believe this happened as a result of a stack
==16633== overflow in your program's main thread (unlikely but
==16633== possible), you can try to increase the size of the
==16633== main thread stack using the --main-stacksize= flag.
==16633== The main thread stack size used in this run was 8388608.
==16633==
==16633== HEAP SUMMARY:
==16633== in use at exit: 21,868 bytes in 99 blocks
==16633== total heap usage: 314 allocs, 215 frees, 146,042 bytes allocated
==16633==
==16633== Thread 1:
==16633== 1,440 bytes in 10 blocks are possibly lost in loss record 44 of 46
==16633== at 0x481A5C0: calloc (vg_replace_malloc.c:762)
==16633== by 0x4606CE11: allocate_dtv (dl-tls.c:286)
==16633== by 0x4606D423: _dl_allocate_tls (dl-tls.c:532)
==16633== by 0x461976BB: allocate_stack (allocatestack.c:622)
==16633== by 0x461976BB: pthread_create@@GLIBC_2.4 (pthread_create.c:662)
==16633== by 0x1E23F: ??? (in /usr/bin/nanomq)
==16633==
==16633== LEAK SUMMARY:
==16633== definitely lost: 0 bytes in 0 blocks
==16633== indirectly lost: 0 bytes in 0 blocks
==16633== possibly lost: 1,440 bytes in 10 blocks
==16633== still reachable: 20,428 bytes in 89 blocks
==16633== suppressed: 0 bytes in 0 blocks
==16633== Reachable blocks (those to which a pointer was found) are not shown.
==16633== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==16633==
==16633== Use --track-origins=yes to see where uninitialised values come from
==16633== For lists of detected and suppressed errors, rerun with: -s
==16633== ERROR SUMMARY: 1002 errors from 21 contexts (suppressed: 0 from 0)
Segmentation fault``
root@imx6ull:~# valgrind --leak-check=full --track-origins=yes nanomq start --url nmq-tcp://127.0.0.1:1234 --old_conf ./nanomq_config.conf
==1318== Memcheck, a memory error detector
==1318== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1318== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==1318== Command: nanomq start --url nmq-tcp://127.0.0.1:1234 --old_conf /nanomq_config.conf
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x31D0A: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x481A570: calloc (vg_replace_malloc.c:762)
==1318== by 0x31D31: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x481BE94: strncpy (vg_replace_strmem.c:552)
==1318== by 0x31D3B: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x481BEC0: strncpy (vg_replace_strmem.c:552)
==1318== by 0x31D3B: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x481BF10: strncpy (vg_replace_strmem.c:552)
==1318== by 0x31D3B: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x481BF34: strncpy (vg_replace_strmem.c:552)
==1318== by 0x31D3B: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x328CC: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x481A570: calloc (vg_replace_malloc.c:762)
==1318== by 0x328F3: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x481BE94: strncpy (vg_replace_strmem.c:552)
==1318== by 0x328FD: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x481BEC0: strncpy (vg_replace_strmem.c:552)
==1318== by 0x328FD: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x481BF10: strncpy (vg_replace_strmem.c:552)
==1318== by 0x328FD: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x481BF34: strncpy (vg_replace_strmem.c:552)
==1318== by 0x328FD: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x31A4C: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x34F60: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x481A570: calloc (vg_replace_malloc.c:762)
==1318== by 0x34F8F: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x481BE94: strncpy (vg_replace_strmem.c:552)
==1318== by 0x34F99: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x481BEC0: strncpy (vg_replace_strmem.c:552)
==1318== by 0x34F99: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x481BF10: strncpy (vg_replace_strmem.c:552)
==1318== by 0x34F99: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
==1318== Conditional jump or move depends on uninitialised value(s)
==1318== at 0x481BF34: strncpy (vg_replace_strmem.c:552)
==1318== by 0x34F99: ??? (in /usr/bin/nanomq)
==1318== Uninitialised value was created by a heap allocation
==1318== at 0x48179A0: malloc (vg_replace_malloc.c:309)
==1318== by 0x49E5BD1: getdelim (iogetdelim.c:62)
==1318== by 0x3AE19: ??? (in /usr/bin/nanomq)
==1318==
NanoMQ Broker is started successfully!
==1318== Thread 8 nng:task:
==1318== Invalid read of size 1
==1318== at 0x481BAD8: strlen (vg_replace_strmem.c:461)
==1318== by 0x49DF99F: __vfprintf_internal (vfprintf-internal.c:1688)
==1318== by 0x49EAFAD: __vsnprintf_internal (vsnprintf.c:114)
==1318== by 0x49D3D4D: snprintf (snprintf.c:31)
==1318== by 0x21097: ??? (in /usr/bin/nanomq)
==1318== Address 0x18b is not stack'd, malloc'd or (recently) free'd
==1318==
==1318==
==1318== Process terminating with default action of signal 11 (SIGSEGV)
==1318== Access not within mapped region at address 0x18B
==1318== at 0x481BAD8: strlen (vg_replace_strmem.c:461)
==1318== by 0x49DF99F: __vfprintf_internal (vfprintf-internal.c:1688)
==1318== by 0x49EAFAD: __vsnprintf_internal (vsnprintf.c:114)
==1318== by 0x49D3D4D: snprintf (snprintf.c:31)
==1318== by 0x21097: ??? (in /usr/bin/nanomq)
==1318== If you believe this happened as a result of a stack
==1318== overflow in your program's main thread (unlikely but
==1318== possible), you can try to increase the size of the
==1318== main thread stack using the --main-stacksize= flag.
==1318== The main thread stack size used in this run was 8388608.
==1318==
==1318== HEAP SUMMARY:
==1318== in use at exit: 21,868 bytes in 99 blocks
==1318== total heap usage: 314 allocs, 215 frees, 146,042 bytes allocated
==1318==
==1318== Thread 1:
==1318== 1,440 bytes in 10 blocks are possibly lost in loss record 44 of 46
==1318== at 0x481A5C0: calloc (vg_replace_malloc.c:762)
==1318== by 0x4606CE11: allocate_dtv (dl-tls.c:286)
==1318== by 0x4606D423: _dl_allocate_tls (dl-tls.c:532)
==1318== by 0x497C6BB: allocate_stack (allocatestack.c:622)
==1318== by 0x497C6BB: pthread_create@@GLIBC_2.4 (pthread_create.c:662)
==1318== by 0x1E23F: ??? (in /usr/bin/nanomq)
==1318==
==1318== LEAK SUMMARY:
==1318== definitely lost: 0 bytes in 0 blocks
==1318== indirectly lost: 0 bytes in 0 blocks
==1318== possibly lost: 1,440 bytes in 10 blocks
==1318== still reachable: 20,428 bytes in 89 blocks
==1318== suppressed: 0 bytes in 0 blocks
==1318== Reachable blocks (those to which a pointer was found) are not shown.
==1318== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==1318==
==1318== For lists of detected and suppressed errors, rerun with: -s
==1318== ERROR SUMMARY: 1002 errors from 21 contexts (suppressed: 0 from 0)
Segmentation fault
| Issue with running nanomq 0.20.5 on 32bit armv7a architecture | https://api.github.com/repos/nanomq/nanomq/issues/1506/comments | 14 | 2023-10-26T17:44:09Z | 2023-11-16T07:18:18Z | https://github.com/nanomq/nanomq/issues/1506 | 1,964,050,140 | 1,506 |
[
"emqx",
"nanomq"
] | It's good to stay updated in the Tech World.
Hence, we should update the logo of Twitter to its latest one (X).
Screenshots-


| Update Twitter logo to its latest one(X). | https://api.github.com/repos/nanomq/nanomq/issues/1502/comments | 2 | 2023-10-24T18:52:53Z | 2023-11-22T05:25:05Z | https://github.com/nanomq/nanomq/issues/1502 | 1,959,875,310 | 1,502 |
[
"emqx",
"nanomq"
] | **Is your feature request related to a problem? Please describe.**
When going through the test reports in English and Chinese, the Chinese version consist of a Summary in the end of the test report along with Nanomq Architecture diagram. However, the same is absent in the English version and and users would not have the insight on the same.
**Describe the solution you'd like**
Adding the Summary of the test report and architecture of Nanomq.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
EN Version:

ZH Version:

| [Docs]: Adding Summary and Architecture diagram in TestReport Page | https://api.github.com/repos/nanomq/nanomq/issues/1501/comments | 3 | 2023-10-24T14:42:57Z | 2023-11-01T10:07:00Z | https://github.com/nanomq/nanomq/issues/1501 | 1,959,425,927 | 1,501 |
[
"emqx",
"nanomq"
] | Aws bridge cannot be used along with vanilla MQTT in 0.20.0.
due to a wrong condition case imported by commit 363d2bc5b96b19b7fa230f4413733897f035f8d8 | [Bridge] 0.20.0 topic relfection seems breaks compatibility between AWS and Vanilla MQTT/TCP | https://api.github.com/repos/nanomq/nanomq/issues/1495/comments | 0 | 2023-10-23T11:03:56Z | 2023-10-24T05:56:06Z | https://github.com/nanomq/nanomq/issues/1495 | 1,956,907,572 | 1,495 |
[
"emqx",
"nanomq"
] | File: [/docs/zh_CN/bridges/quic-bridge.md](https://nanomq.io/docs/zh/latest/bridges/quic-bridge.html)

此处应该一个`-`符号 | Error in Docs File: /docs/zh_CN/bridges/quic-bridge.md | https://api.github.com/repos/nanomq/nanomq/issues/1494/comments | 1 | 2023-10-23T08:27:18Z | 2023-11-01T08:31:40Z | https://github.com/nanomq/nanomq/issues/1494 | 1,956,626,628 | 1,494 |
[
"emqx",
"nanomq"
] | **Is your feature request related to a problem? Please describe.**
I'm was annoyed to see all the lengthy ping status and scroll all the way down to reach the test summary when i was reading through the test report in NanoMQ Docs.
**Describe the solution you'd like**
I would like to propose the drop down feature in the docs so that it reduces the length of the page and improves readability of the documentation.
**Describe alternatives you've considered**
I believe adding drop down feature to hide and show the test pings status as per the user needs is the ideal solution for this.
**Additional context**
I would like to work on this issue as a part of Hacktoberfest contribution

| [Docs]: Adding Dropdown Feature in Test Report Documentation | https://api.github.com/repos/nanomq/nanomq/issues/1492/comments | 5 | 2023-10-22T12:56:55Z | 2023-10-25T10:05:22Z | https://github.com/nanomq/nanomq/issues/1492 | 1,955,892,266 | 1,492 |
[
"emqx",
"nanomq"
] | **Describe the bug**
nanomq report a error when a client connect to nanomq ;
`broker_tls.c:301 tlstran_pipe_nego_cb: nego aio error Cryptograhic error`
use mqtt protocol: v3.1.1
**Actual Behavior**
`broker_tls.c:301 tlstran_pipe_nego_cb: nego aio error Cryptograhic error`
**To Reproduce**
If possible include actual reproduction test code here.
Minimal C test cases are perferred.
** Environment Details **
- NanoMQ version v0.19.5
- Operating system and version linux-arm64
- Compiler and language used
- testing scenario
**Client SDK**
paho mqttclient
**Additional context**
Add any other context about the problem here.
| Cryptographic error when client connect to nanomq with mqtts | https://api.github.com/repos/nanomq/nanomq/issues/1489/comments | 1 | 2023-10-18T06:13:50Z | 2024-04-18T08:09:04Z | https://github.com/nanomq/nanomq/issues/1489 | 1,948,923,214 | 1,489 |
[
"emqx",
"nanomq"
] | File: [/docs/en_US/config-description/bridges.md](https://nanomq.io/docs/en/latest/config-description/bridges.html)
Issue #1174 appears to have altered bridge configuration and the documentation hasn't kept pace.
My old config was along the lines of:
bridges.mqtt.foo {
...
forwards = ["atopic"]
}
and this apparently must now be:
bridges.mqtt.foo {
...
forwards = [
local_topic = "atopic"
remote_topic = "atopic"
]
}
| forwards configuration incorrect since change in #1174 | https://api.github.com/repos/nanomq/nanomq/issues/1486/comments | 9 | 2023-10-17T05:54:21Z | 2023-10-30T07:55:13Z | https://github.com/nanomq/nanomq/issues/1486 | 1,946,600,282 | 1,486 |
[
"emqx",
"nanomq"
] | ```hcl
sqlite {
disk_cache_size = 102400 # Max message limitation for caching
mounted_file_path="/tmp/" # Mounted file path
flush_mem_threshold = 100 # The threshold of flushing messages to flash
resend_interval = 5000 # not implemented yet!
}
```
| `resend_interval` of Broker config section is not effective yet | https://api.github.com/repos/nanomq/nanomq/issues/1485/comments | 0 | 2023-10-16T11:37:36Z | 2023-10-16T11:37:59Z | https://github.com/nanomq/nanomq/issues/1485 | 1,945,010,273 | 1,485 |
[
"emqx",
"nanomq"
] | The "resend_interval" parameter is invalid.
No matter how I set the resend interval to always be 10 seconds.
NanoMQ version: nanomq-0.20.0-linux-x86_64-sqlite
OS: Centos 8.5
Here is my nanomq.conf
mqtt {
property_size = 32
max_packet_size = 10KB
max_mqueue_len = 2048
retry_interval = 20s
keepalive_multiplier = 1.25
# Three of below, unsupported now
max_inflight_window = 2048
max_awaiting_rel = 10s
await_rel_timeout = 10s
}
sqlite {
disk_cache_size = 102400 # 最大缓存消息数
mounted_file_path="/work/nanomq_cache" # 数据库文件存储路径
flush_mem_threshold = 1 # 内存缓存消息数阈值
resend_interval = 1000 # 故障恢复后的重发时间间隔 (ms)
}
rules.sqlite = {
path = "/work/nanomq_cache/sqlite_rule.db" # SQLite 数据库文件路径
rules = [
{
sql = "SELECT * FROM \"DDD\"" # 规则 SQL
table = "DDD" # 规则的表名
}
]
}
listeners.tcp {
bind = "0.0.0.0:1883"
}
listeners.ws {
bind = "0.0.0.0:8083/mqtt"
}
http_server {
port = 18081
limit_conn = 2
username = admin
password = public
auth_type = basic
jwt {
public.keyfile = "/etc/certs/jwt/jwtRS256.key.pub"
}
}
log {
to = [file, console]
level = info
dir = "/tmp"
file = "nanomq.log"
rotation {
size = 10MB
count = 5
}
}
auth {
allow_anonymous = true
no_match = allow
deny_action = ignore
cache = {
max_size = 32
ttl = 1m
}
}
bridges.mqtt.emqx1 = {
server = "mqtt-tcp://192.168.1.223:1883" # MQTT 服务器地址
proto_ver = 4 # MQTT 协议版本
clientid = "bridge_client" # 桥接的客户端 ID
keepalive = "20s" # 桥接的保活间隔时间(s)
clean_start = false # 清除会话
username = "username" # 桥接用户名
password = "passwd" # 桥接密码
forwards = [
{
remote_topic = "DDD"
local_topic = "DDD"
qos = 1
}
]
max_parallel_processes = 2 # 最大并行进程数
max_send_queue_len = 32 # 消息发送队列的最大长度
max_recv_queue_len = 128 # 消息接收队列的最大长度
}
bridges.mqtt.cache {
disk_cache_size = 102400 # 缓存的最大消息限制
mounted_file_path="/work/nanomq_cache" # 挂载的文件路径
flush_mem_threshold = 1 # 刷新消息到闪存的阈值
resend_interval = 1000 # 故障恢复后消息的重发间隔
}
| The "resend_interval" parameter is invalid | https://api.github.com/repos/nanomq/nanomq/issues/1483/comments | 1 | 2023-10-16T03:08:42Z | 2023-10-28T08:05:39Z | https://github.com/nanomq/nanomq/issues/1483 | 1,944,263,654 | 1,483 |
[
"emqx",
"nanomq"
] | **Describe the bug**
aws bridge topic reflection is not working as expected, subscription still works in the previous way.
**Expected behavior**
aws bridge topic reflection works as expected.
**Actual Behavior**
aws bridge will forward msg from remote_topic to itself instead of local_topic
** Environment Details **
- NanoMQ version latest main branch
- Operating system and version Ubuntu 22.04
| topic reflection not working as expected in aws bridge. | https://api.github.com/repos/nanomq/nanomq/issues/1477/comments | 3 | 2023-10-08T05:08:30Z | 2023-10-10T11:02:00Z | https://github.com/nanomq/nanomq/issues/1477 | 1,931,649,154 | 1,477 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Based on the documentation, it seems as though if I just add a "sqlite" section to my .conf file, MQTT messages should be buffered into a database when the connection to a bridged broker is severed. Using Windows Desktop Docker, NanoMQ 0.19.5 Slim, when the connection between the "broker.emqx.io:1883" is disconnected, messages sent to Nano are not stored in SQLite and re-sent upon reconnect.
**Expected behavior**
Based on documentation, it seems as though, when the connection is severed, messages should be buffered in SQLite until the connection is restored, then sent to the EMQX broker.
**Actual Behavior**
Logs show that the connection has been disconnected/reconnected, SQLite DB is created, but nothing is sent after reconnect.
**To Reproduce**
Use Windows Docker Desktop, NanoMQ Slim, Version 0.19.5, Disabled Network adapter to cause a disconnect between default broker, and used the attached ".conf" file.
** Environment Details **
- NanoMQ version: NanoMQ version 0.19.5 Slim
- Windows 11/Docker Desktop
- Disabled Network adapter
**Additional context**
Attempted to test on NanoMQ full as well and had the same thing happen. I was able to use the Rule engine on the full version to log all messages to the SQLite DB.
[nanomq.txt](https://github.com/emqx/nanomq/files/12838006/nanomq.txt)
| Docker Nanomq Slim doesn't buffer to SQLite upon connection disconnect and doesn't resend them | https://api.github.com/repos/nanomq/nanomq/issues/1476/comments | 1 | 2023-10-07T14:16:43Z | 2024-04-18T08:10:10Z | https://github.com/nanomq/nanomq/issues/1476 | 1,931,368,744 | 1,476 |
[
"emqx",
"nanomq"
] | [Idl-serial](https://github.com/nanomq/idl-serial) can convert IDL to JSON with less codes.
I've noticed that the typedef parser feature has been in the TODO list for a long time.
I'm looking forward to this feature and hope it can come out in the near future. | Support parsing typedef in DDS Proxy IDL file. | https://api.github.com/repos/nanomq/nanomq/issues/1475/comments | 2 | 2023-09-28T07:15:02Z | 2024-07-22T06:12:13Z | https://github.com/nanomq/nanomq/issues/1475 | 1,916,862,532 | 1,475 |
[
"emqx",
"nanomq"
] | the section has chinese description:
File: [/docs/en_US/http-api/v4.md](https://nanomq.io/docs/en/latest/http-api/v4.html) | chinese 'description' in english page. | https://api.github.com/repos/nanomq/nanomq/issues/1473/comments | 1 | 2023-09-28T05:05:13Z | 2023-10-01T01:54:44Z | https://github.com/nanomq/nanomq/issues/1473 | 1,916,705,286 | 1,473 |
[
"emqx",
"nanomq"
] | ### Discussed in https://github.com/emqx/nanomq/discussions/1342
<div type='discussions-op-text'>
<sup>Originally posted by **nadav-bariks** July 4, 2023</sup>
The documentation shows how to configure one listeners.ssl section with 1 bind
which seems to support either one or all interfaces
is it possible to configure listeners on only 2 interfaces (if there are more than 2 on the computer)
thanks
</div> | Is it possible to specify multiple ssl listeners (on several interfaces)? | https://api.github.com/repos/nanomq/nanomq/issues/1472/comments | 1 | 2023-09-27T13:11:00Z | 2024-07-22T06:11:57Z | https://github.com/nanomq/nanomq/issues/1472 | 1,915,558,814 | 1,472 |
[
"emqx",
"nanomq"
] | when a client connect to nanomq broker after bridge has already connected successfully.
when a client connect to nanomq broker before bridge connect successfully.
| New bridge notification | https://api.github.com/repos/nanomq/nanomq/issues/1471/comments | 2 | 2023-09-27T13:10:10Z | 2024-07-22T06:11:15Z | https://github.com/nanomq/nanomq/issues/1471 | 1,915,557,294 | 1,471 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Bridge sends a mqtt publish msg and its topic contains a charactor'#'.
When the configuration file of the bridge was like this.
```
subscription = [
{
local_topic = "cmd/#"
remote_topic = "cmd/#"
qos = 1
},
{
local_topic = "cmd2/#"
remote_topic = "cmd2/#"
qos = 2
}
]
```
**Expected behavior**
Not character should be contained in a publish msg's topic
**Environment Details**
- NanoMQ version. latest
- Operating system and version. fedora38
- Compiler and language used. gcc
| Bridge sends a mqtt publish msg and its topic contains a charactor'#' | https://api.github.com/repos/nanomq/nanomq/issues/1467/comments | 0 | 2023-09-27T09:26:25Z | 2023-10-28T08:05:57Z | https://github.com/nanomq/nanomq/issues/1467 | 1,915,081,027 | 1,467 |
[
"emqx",
"nanomq"
] | **Describe the bug**
Request restapi of hot update bridge failed when multistream is on
When the multistream is turned on in quic bridge of nanomq.
Request restapi to hot update quic bridge would be blocked.
** Environment Details **
- NanoMQ version. Latest
- Operating system and version. Fedora38
- Compiler and language used. GCC
- testing scenario | Hot update bridging is disabled when multistream of mqtt over quic is on | https://api.github.com/repos/nanomq/nanomq/issues/1466/comments | 1 | 2023-09-27T08:56:36Z | 2023-10-24T11:25:36Z | https://github.com/nanomq/nanomq/issues/1466 | 1,915,029,023 | 1,466 |
[
"emqx",
"nanomq"
] | **Describe the bug**
I used to use this script to hot update configuration file of nanomq bridge.
But it makes the latest nanomq crash.
It seems the error from the update of the topic reflection.
```
curl -i --basic -u admin:public -X PUT 'http://localhost:8081/api/v4/bridges/emqx' -d '{
"emqx": {
"name": "emqx",
"enable": true,
"parallel": 8,
"server": "mqtt-quic://public.emqx.io:14567",
"proto_ver": 4,
"clientid": "hello3",
"clean_start": true,
"username": "emqx",
"password": "emqx123",
"keepalive": 60,
"forwards": [
"topic1/#",
"topic3/a"
],
"subscription": [
{
"topic": "cmd/topic1",
"qos": 1
},
{
"topic": "cmd/topic3",
"qos": 2
}
],
"quic_keepalive": "100s",
"quic_idle_timeout": "100s",
"quic_discon_timeout": "100s",
"quic_send_idle_timeout": "20s",
"quic_initial_rtt_ms": "800s",
"quic_max_ack_delay_ms": "100s",
"quic_multi_stream": true,
"hybrid_bridging": true,
"quic_qos_priority": true,
"quic_0rtt": true
}
}';
```
| Invalid http request make nanomq crash. | https://api.github.com/repos/nanomq/nanomq/issues/1464/comments | 2 | 2023-09-27T07:41:05Z | 2023-10-10T09:59:04Z | https://github.com/nanomq/nanomq/issues/1464 | 1,914,896,811 | 1,464 |
[
"emqx",
"nanomq"
] | **Describe the bug**
wildcard character not works in topic reflection feature.
Here is the forward rule in nanomq bridge configuration files.
(Not works)
```
forwards = [
{
local_topic = "topic1/#"
remote_topic = "topic1/#"
qos = 1
},
{
local_topic = "topic2/#"
remote_topic = "topic2/#"
qos = 2
}
]
```
When I remove the wildcard character in the forward rule then it works.
```
forwards = [
{
local_topic = "topic1/a"
remote_topic = "topic1/a"
qos = 1
},
{
local_topic = "topic2/a"
remote_topic = "topic2/a"
qos = 2
}
]
```
**To Reproduce**
```
/nanomq_cli/nanomq_cli pub -p 1883 -t topic1/a -k 600 -i 1234 -q 1 -m aaaaaaaaaaaaa -L 10000 -I 100 -c 5
./nanomq_cli/nanomq_cli sub -t topic1/a -i id -q 2 -h public.emqx.io -p 1883
```
** Environment Details **
- NanoMQ version. latest
- Operating system and version. fedora38
- Compiler and language used.ggcc
| wildcard character not works in topic reflection. | https://api.github.com/repos/nanomq/nanomq/issues/1463/comments | 1 | 2023-09-27T06:40:48Z | 2023-10-23T09:55:49Z | https://github.com/nanomq/nanomq/issues/1463 | 1,914,805,640 | 1,463 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.