Thanks for reply! Seems to work now. There still is a warning, but Mosquitto has started. Following the advice to restart the servis, the warning is gone, but comes back after a reeboot. Anything to worry about?
[13:24:01] openhabian@openhab2neu:~$ systemctl status mosquitto.service
Warning: The unit file, source configuration file or drop-ins of mosquitto.service changed on disk. Run 'sy
● mosquitto.service - Mosquitto MQTT v3.1/v3.1.1 Broker
Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2020-11-04 13:20:08 CET; 3min 55s ago
Main PID: 1014 (mosquitto)
Tasks: 1 (limit: 4915)
└─1014 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
Nov 04 13:20:07 openhab2neu systemd: Starting Mosquitto MQTT v3.1/v3.1.1 Broker...
Nov 04 13:20:08 openhab2neu systemd: Started Mosquitto MQTT v3.1/v3.1.1 Broker.
I am having the same problem. I am trying to migrate my Pi 3 to a new Pi 4 setup with more reliable backups and so on. So I started with a new RPi. Everything else moves across OK, rules, items, bindings. I even managed to work out how to move Node-Red and its credentials.
But the Mosquitto broker will not run. It fails on startup and I get the same error as others here about not being able to access /var/log/mosquitto/mosquitto.log.
I tried disabling zram (is this related to the cause?) and I’ve tried reinstalling Mosquitto with the same error as others again
There was an error or interruption during the execution of: │
│ “20 | Optional Components”
I’ve read through this thread and I’m not sure if we’ve found the answer. The more I muck about with trying different things, the further away from a clean standard installation I get and I worry if I’m breaking something else or future upgrades.
This is a device that controls things I use every day (wife not happy if something fails) so I prefer to keep to stable packages with as little deviation from standard setups as possible. I’m not a beginner with Openhab but I am no Linux or RPi expert so I’m just following people who know more than me.
Does anyone have a definitive summary view on why a clean installation of the latest Openhabian downloadable image onto a 16GB card installed in a brand new 2GB Pi4 cannot run Mosquitto? Better still, a way to make it work without making my system “non-standard” and perhaps not upgradeable. Even better, is there a fix coming for the standard Openhabian download?
Ah - super. That’s what I was looking for. Many thanks
I was a bit concerned that if I make a structural change it might get undone on the next update and then mission-critical stuff like my entire heating system falls over! I’m a bit reluctant to go creating new directories and changing ownerships to make something work but now I know you’re right on top of it and it is being incorporated in later versions too then I am happy.
I’ll make the change tonight and hopefully I’m all good
Can confirm: Installing mosquitto from the setup menu (sudo openhabian-config) works perfectly, set up several devices, all in proper working order. Reboot, no mosquitto. Manually restarting it results in authentication errors from the OH bridge thing. So something is definitely up here.
Update: It turns out the MQTT bridge was not configured correctly, although it boggles my mind how it worked on initial installation but not after reboot. At any rate, adding username/password to the thing configuration resolves the issue. Although the restart issue still remains, but that’s easy enough to hack around.
Well AFAIK you’re the only one with this problem. You didn’t answer which openHABian branch you use. Does journalctl -xu mosquitto.service give any hint ?
openHAB version is not of interest and I don’t know what an “OA bridge” is so can’t tell if that’s related.
I doubt you run a OH core 2.5.0. Either way, that’s pretty old. Is your openHABian installation even buster based ? Have you ever upgraded openHABian OS packages (menu 02) ?
You should move to openHABian master and could try to uninstall and reinstall zram then eventually reinstall mosquitto.
Update: Discovered the problem: In addition to the ‘:’ character, there are apparently other prohibited password characters not enumerated in the mosquitto_passwd manpage. One of these is apparently ‘$’. Don’t bother using it in your password; authentication will fail.
Here is what is misleading: For whatever reason, when mosquitto is first installed from openhabian-config, access is set to ‘allow_anonymous true’. This allows any publisher/subscriber to connect, even though it might appear that authentication is being used. If the mosquitto daemon is restarted, allow_anonymous reverts to whatever is in the .conf file (false by default).
Obviously not an OH issue, but might still cause some issues due to lack of documentation.
Original post: It was installed from one of the pre-built OpenHABian images, probably mid-2019. I really can’t speak for the accuracy of the version info that’s installed with OpenHABian; I would assume it is at least close to be correct. At any rate, I doubt it’s an OH issue, so it probably has nothing to do with the OpenHABian branch that the image was built from.
If I find a solution I’ll post here to help others who might run into this problem.
Thanks Marcus for your prompt help. I suffered the same issue with a new install of the openhabian image on RPi3b.
Following your instructions, repeated below for those that need it too, everything works as it should, no errors:
I was having a similar issue. After installing Mosquitto using openhabian-config, everything seemed to work fine. But after doing some troubleshooting to get MQTT working, Mosquitto stopped working. I tried to find log files, run files, etc., but couldn’t find any indication there was a working version on the Pi (3B+). I tried reinstalling it a few times (as per the instructions) - no go. I tried removing it with apt and reinstalling with openhabian-config - same issue. Finally, I removed it and reinstalled it with apt - it is working again, well kind-of. Being my first iteration of MQTT, I’m having other issues, but at least the broker is online.
I got the same problem. Mosquitto worked well directly after install but after reboot it stopped working. I don’t know anything about Linux. The last three years I somewhat managed to use openhab using the config files. I was happy when openhabian came around and you didn’t have to be a linux-expert to use openhab. Coming around to version 2.5 on my raspberry 4, I tried upgrading my setup. Through much trial and error I managed to write some things files, which, due to the lack of documentation, is really difficult. When I wanted to restart and installed openhab using the openhabian installer, I encountered the same problem as others in this thread. I uninstalled the zram using the openhabian config, but this didn’t help. What should I do?
PS: Suggesting I check some xyz-config file isn’t helpful, because I don’t understand the linux system.
Bug reports are only useful/can only be worked upon when they show the problem/misbehavior happen so provide a log showing this and do not forget to describe your starting point.
Set debugmode=maximum in openhabian.conf and record the required output.