Bug 1272342 - Mosquitto daemon does not load any config file
Mosquitto daemon does not load any config file
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mosquitto (Show other bugs)
22
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Fabian Affolter
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-16 03:27 EDT by C. Gräfe
Modified: 2016-11-19 07:48 EST (History)
2 users (show)

See Also:
Fixed In Version: mosquitto-1.4.9-2.fc24 mosquitto-1.4.9-2.fc23 mosquitto-1.4.9-2.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-12 11:06:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description C. Gräfe 2015-10-16 03:27:47 EDT
Description of problem:
The package in question contains a systemd service description (/usr/lib/systemd/system/mosquitto.service) and provides a directory for configuration (/etc/mosquitto) including an example config file. When I create and modify the actual config from the example and restart the service, I would expect the service to load it. This does not happen though, since the mosquitto daemon requires any config file to be specified using the '-c' command line argument. This argument is missing in the service definition, so the daemon will always use its default configuration.

Version-Release number of selected component (if applicable):
1.4.2-1.fc22 

How reproducible:
Install mosquitto using dnf, create config in /etc/mosquitto, restart service.

Steps to Reproduce:
1. dnf install mosquitto
2. cp /etc/mosquitto/mosquitto.conf.example /etc/mosquitto/mosquitto.conf
3. edit mosquitto.conf
4. systemctl restart mosquitto

Actual results:
The mosquitto daemon is still operating on its compiled-in configuration.

Expected results:
The mosquitto daemon should load the configuration from /etc/mosquitto/mosquitto.conf instead.


Additional info:
I would suggest moving /etc/mosquitto/mosquitto.conf.example to /etc/mosquitto/mosquitto.conf in the package and modifying the service definition:

@@ -3,7 +3,7 @@
 Documentation=man:mosquitto.conf(5) man:mosquitto(8)

 [Service]
-ExecStart=/usr/sbin/mosquitto
+ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
 User=mosquitto

 [Install]
Comment 1 Rich Mattes 2015-12-09 19:49:21 EST
I think that's reasonable, and it follows the same pattern as the upstart script shipped with mosquitto.  I can add the -c to the unit file, and install the example config file to mosquitto.conf as %config(noreplace) so it doesn't blow away anyone's custom mosquitto.conf
Comment 2 Fedora Update System 2016-07-01 11:02:58 EDT
mosquitto-1.4.9-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-eee2b6b6d7
Comment 3 Fedora Update System 2016-07-01 11:19:34 EDT
mosquitto-1.4.9-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-bc85eafce6
Comment 4 Fedora Update System 2016-07-01 11:36:16 EDT
mosquitto-1.4.9-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-462e3d081f
Comment 5 Fedora Update System 2016-07-02 16:20:40 EDT
mosquitto-1.4.9-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-462e3d081f
Comment 6 Fedora Update System 2016-07-02 16:29:23 EDT
mosquitto-1.4.9-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-eee2b6b6d7
Comment 7 Fedora Update System 2016-07-02 16:54:17 EDT
mosquitto-1.4.9-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-bc85eafce6
Comment 8 Fedora Update System 2016-07-12 11:06:44 EDT
mosquitto-1.4.9-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
Comment 9 Fedora Update System 2016-07-15 06:23:49 EDT
mosquitto-1.4.9-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 10 Fedora Update System 2016-11-19 07:48:17 EST
mosquitto-1.4.9-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.