eclipse-leda / leda-distro

Eclipse Leda provides a Yocto-based build setup for SDV.EDGE components
https://eclipse-leda.github.io/leda/
Apache License 2.0
14 stars 8 forks source link

Default mosquitto configuration #30

Closed mikehaller closed 1 year ago

mikehaller commented 1 year ago

@stoyan-zoubev reported that the mosquitto.conf currently being used does not allow connections from local clients any more.

For the time being, we've been using a configuration which allows local, anonymous clients to connect to the local mosquitto. For a production environment, this has to be changed to enable authentication of course.

If this is not working any more, it may be due to the switch from k3s to kanto-cm, as kanto metalayer has dependency to mosquitto and brings its own configuration.

Original report:

Some changes needed to be done to the configuraiton of mosquitto in order to get it working. It is better that these changes are applied directly when building leda/owasys image.

Modify /etc/mosquitto/mosquitto.conf to contain the following lines:

listener 1883 0.0.0.0
allow_anonymous true

These settings allow connections from components inside containers to mosquitto broker, running as native service. Actually the default mosquitto.conf contains no real entries, only commented lines, so you can directly replace its contents. The mosquitto.conf that comes from meta-kanto contains /etc/mosquitto/suite-connector.d/suite-connector.conf. I do not think this is needed for eclipse-leda, it can be safely deleted (not included).

When mosquitto.conf is modified manually, changes are applied only after restarting the native service. systemctl restart mosquitto.service

mikehaller commented 1 year ago

Fixed in https://github.com/eclipse-leda/meta-leda/pull/86