No data in mosuitto_sub

I’m looking for a way to store payloads in database and I’ve read on this forum that good way to do it is to subscribe to MQTT topic. I have LoRa stack installed by default docker installator. Host machine is Debian. I have MQTT up and running on default 1883 port.
I can see data in web ui:

Bo no data in mosquitto_sub:


What am I doing wrong?

Try subscribing to ‘application/#’ in case you got the application id wrong (it should be in the URL of the page you were viewing before).

Or for that matter just subscribe to ‘#’ and see everything including the raw encrypted packets to/from gateways and various housekeeping. Unless you have a huge number of devices nearby it won’t be an extreme flood and will give you some sense of what is / isn’t working.

Perhaps you connected to the wrong broker? You aren’t specifying to presumably it assumes localhost and a default port.

And don’t run mosquitto_sub as root. There’s no reason to - at most the broker would need privileged port access. The client does not; any permission issues are between the client and broker and related plug-ins, not between the client and the host os.

Thanks, but unfortunately it doesn’t help :frowning:
Results of subscribing to ‘#’ are also empty (in debug mode there is only ‘sending CONNECT’…)
I run mosquitto_sub on Debian host OS, maybe it should be run from inside of one of docker containers? (but I can’t find ‘mosquitto_sub’ command there…)

Seems like you may have multiple brokers running, with the data going to a different one.

If it’s running in a container you would need to figure out how that looks to the hosting machine as a network target (probably it maps to some port…)

I’ve just found out that I can successfully subscribe to MQTT from outside (another machine) with mosquitto_sub -v -t ‘#’ -h some.external.IPv4.address, but surprisingly it doesn’t work from within machine where LoraServer is hosted…

Anyone can help?

I really got stuck :frowning:
mosquitto_sub works perfectly from outside the server, but within it - no data. Checking with nmap -p 1883 I can see that from outside this port looks open, from inside it’s… filtered. And these filters are applied by LoRa/docker containers - is there any way to change them?