I follow up the tutorial to set up the mosquitto broker on window steps:-
1)download the broker from website
2)install it
3)change in config file to run the broker on local IP
listener 1883 0.0.0.0
max_packet_size 10000
allow_anonymous true
4)Windows Defender Firewall->advanced setting->inbound rules->new rule->make TCP port 1883
5)services->mosquitto broker ->automatic
command prompt
C:\Program Files\mosquitto>net start mosquitto
The Mosquitto Broker service was started successfully.
C:\Program Files\mosquitto>mosquitto_sub -h localhost -t test
Error: No connection could be made because the target machine actively refused it.
when manually start the mosquitto broker by services i got this …
the mosquitto broker services on local computer started and then stopped .some services stopped automatically if thay are not in use by other services or program
I make mosquitto.log successfully when I opened it. I got this
1718003183: Error: Unable to open log file C:\Program Files\Mosquitto\mosquitto.log for writing.
^C
To activate the logs in windows you have to allow the “write” rule for that folder in the folder settings. It is a windows permission problem, that can appear. The logs are important for debugging.
On the other hand, I do not see a problem in your statements here:
The clients do connect and send packages.
I am not sure, what your problem is exactly.
Further, I do not think the error message you provided exists in mosquitto. How do you get this exactly? Error: No connection could be made because the target machine actively refused it.