Continuous "unknown" connections in Mosquitto App

patchedsoul

Cadet
Joined
Nov 17, 2022
Messages
2
I recently setup Mosquitto within my TrueNAS scale deployment.
Upon reviewing the logs, I see constant spamming of:

Code:
2022-11-17 10:55:39.021184+00:001668682539: New connection from 172.16.0.1:56346 on port 1883.
2022-11-17 10:55:39.021338+00:001668682539: New connection from 172.16.0.1:56352 on port 1883.
2022-11-17 10:55:39.021365+00:001668682539: Client <unknown> closed its connection.
2022-11-17 10:55:39.021387+00:001668682539: Client <unknown> closed its connection.
2022-11-17 10:55:49.022229+00:001668682549: New connection from 172.16.0.1:45504 on port 1883.
2022-11-17 10:55:49.022388+00:001668682549: New connection from 172.16.0.1:45518 on port 1883.
2022-11-17 10:55:49.022416+00:001668682549: Client <unknown> closed its connection.
2022-11-17 10:55:49.022439+00:001668682549: Client <unknown> closed its connection.


Is this expected? My assumption is this is some sort of keep-alive/health check.
Just getting my footing in Scale, so apologies for the noob question.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
By chance are you using HomeAssistant together with it?

That will be doing hearbeat checks and appears like that in the Supervisor version (which you can't run as an app in scale, but would be possible in a VM).
 

patchedsoul

Cadet
Joined
Nov 17, 2022
Messages
2
i’m not. i also stopped all other apps and vm’s on the NAS with the same result. it’s something internal to truenas i think based on the container network addresses, but what? that stuff shouldn’t try to connect on 1883, should it?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
I don't know if that chart has health checks running, but maybe it's that then.
 
Joined
Jun 15, 2022
Messages
674
From my very limited understanding, the Mosquitto broker listens on TLS/SSL port 8883, expecting the MQTT protocol (so it is not "spam"). A TLS listener certificate/key pair should be specified, otherwise the connection fails and the client device closes the connection.
 

PGDO

Cadet
Joined
Jan 11, 2023
Messages
3
Excuses for the delayed response.
Mosquitto listens on TCP port 1883 for MQTT protocol. (WebSockets is another option but not used by me).
Mosquitto is a broker between a device connected to hardware (for example heating) and sther software (for example Home Assistant). Normaly a client or server connects to Mosquitto and stays connected.
 

PGDO

Cadet
Joined
Jan 11, 2023
Messages
3
Continuing previous message.
Screenshot 2023-01-13 150409.jpg

As can be seen in the log file two entities have connected (ems-esp and HA831).
However an unknown connection from 172.16.0.1 with changing port numbers tries to connect every 10 seconds.
172.16.0.0/16 is the Kubernetes Cluster CIDR so I guess it has something to do with Kubernetes.
Even if I physically disconnect entity EMS-ESP and stop all Pods except Mosquitto IP 172.16.0.1 still shows up in the Mosquitto log.
 
Top