Open mbneimann-at-work opened 2 months ago
Hello! Docker image version: 2.10.18-alpine3.20 Nats JS runs in RAFT, has 3 services in docker. Storage is mounted via volume.
volumes:
- /etc/localtime:/etc/localtime:ro
- {"type": "tmpfs", "target": "/tmp"}
- {"type": "tmpfs", "target": "/run"}
- /var/nats/natsjs_1/:/data/jetstream/
Each service has its own storage. All services run on one node. Streams and consumers have three replicas.
nats str add Stream\
--subjects "stream.in, stream.out" \
--ack --max-msgs=-1 \
--max-bytes=-1 \
--max-age=3d \
--storage file \
--retention work \
--max-msg-size=-1 \
--discard old \
--dupe-window="2h" \
--no-deny-purge \
--deny-delete \
--no-allow-rollup \
--max-msgs-per-subject=-1 \
--replicas 3
The power was recently cut off and after restoration, nats js does not see streams, consumers, messages, but they are present in the storage. Why did this happen and how to get the data back? They are physically present. An example of a log in the attachment, it is the same on all 3 nodes, there is no hint for recovery or anything like that natsjs_1.log
Proposed change
Multiple error messages returned when parsing a MQTT connect telegram have little information about the conditions surrounding the error.
Information about telegram "CONNECT" and the Flag and Value the parsing failed on.
Use case
When trying to understand a MQTT connection problem, it was very hard to understand what was going on.
I had a PLC, with MQTT version 3.1.1, that tried to connect, but was refused a connection to a NATS server. Connection to a Mosquitto server worked without problems.
Finally, by looking at the CONECT telegram in Wireshark, we could see that the Will Topic looked more like Will Message and not a valid topic.
The server logs did not tell me much about where and what was going on:
Contribution
No response