Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mosquitto » Connection refused
Connection refused [message #1823558] Sat, 28 March 2020 22:16 Go to next message
Tobias Lehr is currently offline Tobias LehrFriend
Messages: 1
Registered: March 2020
Junior Member
Hi, i'm new here. I'm running mosquitto on a raspberry pi. Until tofay everything worked fine. But today i had an diskspace issue and had to change the partitionsize on the ssd. Since this is an ssd i had to do this manually and not via raspi-config. The re-Partioning went fine. But i had some issues with log files. Also on Mosquitto.

After the partitioning mosquitto doesn't work properly. The service is running, checked via systemctl status mosquitto. but when i try to subscribe to a topic with mosquitto_sub i get an Conection refused error, same on mosquitto_pub. Also node-red could connect to mosquitto.

so i want to look in the mosquitto.log, but this ended with an permission denied error. So i deleted the mosquitto.log and rebooted the pi in the hope of mosquitto creating a new logfile. But nothing happened, i still get the connection refused error and no mosquitto.log is created.

What might happened and where should i look to fix the problem, could anybody help?
Re: Connection refused [message #1823704 is a reply to message #1823558] Tue, 31 March 2020 11:06 Go to previous message
Roger Light is currently offline Roger LightFriend
Messages: 45
Registered: September 2013
Member
This could be a number of things. If you've had a disk problem though, the likelihood is that either the configuration is broken, or the persistence file is broken.

To verify whether Mosquitto is running in a command line window you could use:

ps aux | grep mosquitto

If it is running there are other problems, I'm going to assume that it isn't running. Let us know if it is though.

The persistence file is stored at /var/lib/mosquitto/mosquitto.db. The file contains information on retained messages, persistent clients, their subscriptions and queued messages. If you aren't using any of those features, or your clients will cope with having to start from fresh then you can simply delete the file and mosquitto will recreate it later. Alternatively you could move it out of the way.

You could then try to restart and see if the broker runs.

If not, try running mosquitto manually to see what the problem is:

/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf

You will probably need to run with sudo, otherwise there would be permissions problems due to files being owned by the mosquitto user:

sudo /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf

Let us know how it goes.
Previous Topic:Problem with "bind_interface device"
Next Topic:Mosquitto broker terminating and starting about every minute?
Goto Forum:
  


Current Time: Thu Oct 29 03:13:05 GMT 2020

Powered by FUDForum. Page generated in 0.02010 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top