Failed to start mosquitto.service: Unit mosquitto.service not found

Hi,

Working with the Imx8m Plus board, I’m attempting to use MQTT. However, if I run “sudo systemctl start mosquitto,” I get the following error message and can’t access the mosquitto.conf file in the /etc folder.

Mosquito.service was unable to start because it could not be found.

I’ve seen that the mosquitto has been included in the sources/meta-openembedded/meta-networking/recipes-connectivity path.

Please let me know if there is anything I’m missing.

Regards
Manoj

you need to add the package to your local.conf so it will be build and included in the image.

IMAGE_INSTALL_append = " <package>"

Hi jnettlet,

After adding the package mosquitto in local.conf file is now enabled. Thank you for your reply.
Regards
Manoj.

1 Like

Hi jnettlet,

After starting the Solidrun board to test the mosquitto, I am unable to view the mosquitto_sub and mosquitto_pub in the list.
Please refer to the image that is given below and let me know what else I need to accomplish.

Regards
Manoj

from the logs it appears that there is already a mosquitto daemon or some other service using port 1883 on your device.

    I want publish the data using the mosquitto_pub command. However, I am unable to use it as it is not available on the command line.
    So, for that we need to install mosquitto-client in our Solidrun board. If I execute the pip3 install mosquitto-clients it gives an error like below.

Please guide me on this.

Regards
Manoj

most likely there is not a package that is compatible with the python version on aarch64. I would recommend you include the package directly in your yocto build recipe.