Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Mosquitto broker set up issue

Naznee

Newbie level 6
Newbie level 6
Joined
Mar 21, 2024
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
105
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
 

Attachments

  • IMG20240604114950 (1).jpg
    IMG20240604114950 (1).jpg
    755 KB · Views: 132
I don't use Windows at all but I do use Mosquitto extensively in Linux. It looks like you did everything correctly, is it possible it isn't allowing a connection from the same machine running the service because the service itself has 'grabbed' port 1883. Can you try connecting from another device on the network or maybe "port forward" port 1883 to an external IP address and try from there.

Brian.

edit: afterthought, I checked the mosquitto.conf file in use here, it has the extra line "persistence true" which might help, the complete file contains:
Code:
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.gz

pid_file /run/mosquitto/mosquitto.pid

persistence true
persistence_location /var/lib/mosquitto/

log_dest file /var/log/mosquitto/mosquitto.log

include_dir /etc/mosquitto/conf.d

# Added by BK 10/4/2021
listener 1883
allow_anonymous true
but bear in mind this is on Linux, configuration, especially folders will be different in Windows.
 
Last edited:

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top