I have re-installed Home assistant and I can’t have Mosquitto running on Raspberry PI. It says all the time “Connection Refused”. Can you give me some help
shutdown HA.
Start mosquitto
Start HA.
I number of people are saying that mosquitto is not completely up when HA starts, so it fails…
Hi, thank you for your reply.
I did the sequence you told me to do but the result was the same.
I’m not able to do the following command:
mosquitto_sub -d -u username -P password -t “dev/test”
mosquitto_pub -d -u username -P password -t “dev/test” -m “Hello world”
The feedback I get is “connection refused”.
What shall I do?
What is the status of the mosquitto server when this happens?
Can you execute this?
sudo systemctl status mosquitto
Hi!
I used the status command and it seems that Mosquitto it is not even alive!
Weird…
I have followed all the steps with the help of Bruh but I can’t put Mosquitto to work.
I followed from this video:
Could it be the same issue I had and found a fix for in this thread?
There was an error in mosquitto that caused it not to reboot automatically.
You can either do as stated by @ZyberSE or update raspbian (I think a fix has been introduced since)
Thank you for your fast reply! I did what you described when you had the same problem but… no matter what i do (restart HA, start manually Mosquitto) but the status gets offline all the time.
I will update Home assistant now and see if this error got away… I will get back to you later.
check this out, it did the trick for me… Do not forget to start the service or reboot you pi after enable it
hi all! Thank you again for the best follow up you do.
So I did the upgrade of Home Assistant to the version 0.46.0 and after, I have rebooted it.
I did the sequence sudo systemctl enable mosquitto.service + sudo systemctl start mosquitto.service + sudo systemctl status mosquitto.service and I can not run Mosquitto.
Please take a look on the picture attached.
What shall I do?
You should type “sudo systemctl status mosquitto -l” to see if you can get any more information (it is truncated).
Hi! Here is the status as you have requested
It seems it is Mosquitto not to work only because at the moment I’m using https://www.cloudmqtt.com/ and I don’t have any problems.
As you can understand I want to use Mosquitto but I can’t make it to work…
Please help me!
It says it cannot open the mosquitto.conf file.
Type “ls /etc/mosquitto” and see if the mosquitto configuration file (mosquitto.conf) file even exists or it might have the wrong permissions…
Try typing "ls /etc/mosquitto -l to see the permissions.
Did you ever set a password on your mosquitto broker?
What I’m I missing to have Mosquitto to work on the raspberry PI?
Hi mate,
I had the same problem this morning. Resolved by removing mosquito (because I missed some files in mosquito rep),then reinstalled-rebooted rpi-checked mosquito status (not enabled) and did the trick described by lamtho.
Try it
I have removed now the app Mosquitto by using this command: sudo apt-get remove mosquitto
I have re-installed Mosquitto but it is still with the same problem.
Is there other way to uninstall Mosquitto because the file was still with all information inside?
Try with ‘sudo apt-get purge mosquitto’, this will erase also config files