I am using MQTT CLI to connect to a HiveMQ CE broker. There are around 10+ topics being published on the broker and 4 ~5 total clients are connected (2 pub and 2 sub from remote devices) and 1 sub from my CLI. When i do a list command only the one connected from CLI is shown
TERM1@mqtt.mindshiftapps.net> ls --long -s
total 1
CONNECTED 18:48:58 TERM1 mqtt.mindshiftapps.net 1883 MQTT_5_0 NO_SSL
-subscribed topics: []
TERM1@mqtt.mindshiftapps.net>
If i login to the hivemq broker with ssh (yes it is hosted on an ubuntu server) and check the event log on command line of linux, it shows all the connection events.
oot@ubuntu-s-1vcpu-1gb-blr1-01:/opt/hivemq/log#
root@ubuntu-s-1vcpu-1gb-blr1-01:/opt/hivemq/log# tail event.log
2022-05-05 13:24:00,489 - Client ID: mosq-K8Qo5tc5E0BrzNd885, IP: 42.105.49.112, Clean Start: true, Session Expiry: 0 connected.
2022-05-05 13:24:00,493 - Client ID: mosq-Wuv9ZBrYsVfxxK9vgH, IP: 42.105.49.112, Clean Start: true, Session Expiry: 0 connected.
2022-05-05 13:24:00,510 - Client ID: mosq-vCRg5IioqjHFXEXrRd, IP: 42.105.49.112, Clean Start: true, Session Expiry: 0 connected.
2022-05-05 13:24:00,511 - Client ID: mosq-lMEkAz3O88auSVwClH, IP: 42.105.49.112, Clean Start: true, Session Expiry: 0 connected.
2022-05-05 13:24:00,511 - Client ID: mosq-Ty5K0MtqIKEoqZ3r9a, IP: 42.105.49.112, Clean Start: true, Session Expiry: 0 connected.
2022-05-05 13:24:00,511 - Client ID: mosq-CarDIXUElooXBFwUWv, IP: 42.105.49.112, Clean Start: true, Session Expiry: 0 connected.
2022-05-05 13:24:00,516 - Client ID: mosq-27NvXOSVWtkATHvRND, IP: 42.105.49.112, Clean Start: true, Session Expiry: 0 connected.
2022-05-05 13:24:35,960 - Client ID: TERM2, IP: 49.205.128.126, Clean Start: true, Session Expiry: 0 connected.
2022-05-05 13:25:12,950 - Client ID: mosq-S5S8DJc0pdf6gnxu94 session has expired at 2022-05-05 13:10:20. All persistent data for this client has been removed.
2022-05-05 13:26:05,292 - Client ID: TERM2, IP: 49.205.128.126 disconnected gracefully.
Is the reason the ls
command shows no client is that all the publish clients are only connected momentarily and are all disconnected now? Well even if this is true why are the sub
clients missing? I receive data every minute successfully so the clients are all connected.
Thanks for going through this post and trying to help.
Best