eclipse / mosquitto

Eclipse Mosquitto - An open source MQTT broker
https://mosquitto.org
Other
8.62k stars 2.33k forks source link

Error: Connction refused | A clean way to uninstall mosquito ? #2994

Open LempereurTom opened 4 months ago

LempereurTom commented 4 months ago

Hello guys, So for a school project I've installed Mosquitto on a 11Debian. I've messed up with some files I think.. Is there a way to fully uninstall mosquitto from the Debian, a clean way I mean with nothing left from mosquitto on the Debian?

Or maybe can you guys help me with this error : Error: Connection refused

LempereurTom commented 4 months ago

The "Connection refused" error happens when I try too create a mosquitto_sub on localhost. I've tried to create one with this command mosquitto_sub -t newtopic/test -h test.mosquitto.org And this is perfectly working. I can publish messages.

But whenever I use mosquitto_sub -h localhost - t newtopic/test I got the Connection refused Error.

ptjm commented 4 months ago

Maybe an obvious question, before running that command, did you run

mosquitto

? That should run the broker in the foreground with quite a lot of debug output. Once that's running, the sub and pub command-line tools should work.

To get it working on a real network interface, you'll need at least a minimal config file:

listener 1883
allow_anonymous true