Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5410

Troubleshooting • MQTT fails to start

$
0
0
i am trying to install MQTT broker in my Pi and i am doing the following steps:

Code:

-sudo apt update && sudo apt upgrade-sudo apt install -y mosquitto mosquitto-clients-sudo systemctl enable mosquitto.service 
but when running

Code:

mosquitto -v
i am getting

Code:

pi@rpi:~ $ mosquitto -v1732869871: mosquitto version 2.0.11 starting1732869871: Using default config.1732869871: Starting in local only mode. Connections will only be possible from clients running on this machine.1732869871: Create a configuration file which defines a listener to allow remote access.1732869871: For more details see https://mosquitto.org/documentation/authentication-methods/1732869871: Opening ipv4 listen socket on port 1883.1732869871: Error: Address already in use1732869871: Opening ipv6 listen socket on port 1883.1732869871: Error: Address already in usepi@rpi:~ $

i have found that it runs twice with the same PID.

Code:

 sudo lsof -i :1883COMMAND   PID      USER   FD   TYPE DEVICE SIZE/OFF NODE NAMEmosquitto 589 mosquitto    5u  IPv4    855      0t0  TCP localhost:1883 (LISTEN)mosquitto 589 mosquitto    6u  IPv6    856      0t0  TCP localhost:1883 (LISTEN)
if i kill both of them, then i can connect to it. but after a reboot i have the same issue.

any idea how to fix this issue please?

Statistics: Posted by atux_null — Fri Nov 29, 2024 8:45 am — Replies 3 — Views 32



Viewing all articles
Browse latest Browse all 5410

Latest Images

Trending Articles



Latest Images