Issue with Configuration Changes Not Applying in Mosquitto

I am currently developing on Ubuntu 22.04 Jammy, where only version 2.0.11 of Mosquitto is available in the package repository. I installed this version to facilitate MQTT communication, but I’m encountering persistent network issues which seem to be related to settings in the mosquitto.conf file not being applied properly.

The main problem appears when I try to adjust the Mosquitto configuration to tailor it for my specific needs. Despite making changes to the mosquitto.conf file, the behavior of the Mosquitto server doesn’t seem to reflect these modifications, leading me to suspect either an issue with how the changes are being applied or a deeper network-related problem.

I would appreciate any advice on how to ensure that changes to the mosquitto.conf are correctly implemented, or if there are known issues with this particular version of Mosquitto that might be affecting network stability and configuration. Any insights or recommendations would be highly valuable as I navigate these challenges.

I previously had a successful setup running Mosquitto version 1.4.15 on a Jetson Xavier board. However, I am now encountering issues since upgrading to Ubuntu 22.04, which supports only Mosquitto versions 2.x and higher. The transition to the newer version of Mosquitto has introduced some complications on the current board.

Hello,

Could you also add your mosquitto.conf details here? Thank you :slight_smile:

Certainly!

Here are the file locations:

  • The file is located at /etc/mosquitto/mosquitto.conf.
# 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.example

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
  • Another file is located at /etc/mosquitto/config/my_config.conf.
listener 1883 0.0.0.0
password_file /etc/mosquitto/passwd

The Jetson used MQTT version 1.4.5, but the current board only has version 2.0.11 available, and there are no lower versions in the PPA.

Addintionaly, running mosquitto -v shows no changes at all.

Here is a brief overview of the environment on the Jetson Xavier:

When running mosquitto -v:

1713530848: mosquitto version 1.4.15 (build date Tue, 18 Jun 2019 11:42:22 -0300) starting
1713530848: Using default config.
1713530848: Opening ipv4 listen socket on port 1883.
1713530848: Error: Address already in use

Here is the content of the /etc/mosquitto/mosquitto.conf file (there is nothing in the conf.d folder):

# 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.example

pid_file /var/run/mosquitto.pid

persistence true
persistence_location /var/lib/mosquitto/

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

include_dir /etc/mosquitto/conf.d

password_file /etc/mosquitto/passwd
allow_anonymous false

Could there be an already running broker started by the system that is conflicting with what you want? If you run pgrep -a mosquitto does it show a broker running?