nakla / sbfspot

Scripts for building and running the docker container
18 stars 10 forks source link

MQTT: Failed te execute '/usr/bin/mosquitto_pub' mosquitto clients installed? #4

Closed eumaios closed 3 years ago

eumaios commented 3 years ago

Hi

Thanks for your image. Sorry for the beginner questions! I try to use MQTT and got "MQTT: Failed te execute '/usr/bin/mosquitto_pub' mosquitto clients installed?"

I can install it by going into the docker's shell (docker exec -it --user root sbfspot sh) - but will this not be removed when a new version of the image is going to be installed? What is the proper way to set as "mosquitto client" in the cfg-file or image?

In the cfg it says "Full path to mosquitto_pub executable" - is this obligatory a path in the present docker image, or should I use another/separate docker container? I have a "mosquitto" container running - can I use it as "mosquitto client" - and what path should I provide for the mosquitto_pub executable?

nakla commented 3 years ago

Hi, mosquitto_pub is installed in /usr/bin/mosquitto_pub in the docker container. So there shouldn't be an error message. Are you sure you didn't change the SBFspot.cfg entry MQTT_Publisher=/usr/bin/mosquitto_pub ? The mosquitto-clients package is already installed in the container, you just need to configure the connection to your mqtt broker (and which data to send to the broker) in the SBFspot.cfg file. If you experience problems with sending of mqtt messages, first check, if it is possible to send mqtt messages from inside the sbfspot container to your broker e.g. /usr/bin/mosquitto_pub -h IP of your mqtt broker -m "testmessage" -t testtopic

eumaios commented 3 years ago

Thank you so much for the tipps + explanation. I agree, mosquito_pub is installed. It must have been something else.

I was able to send Testmessages to my mosquitto mqtt broker.

On 11 Nov 2020, at 16:22, nakla notifications@github.com wrote:

Hi, mosquitto_pub is installed in /usr/bin/mosquitto_pub in the docker container. So there shouldn't be an error message. Are you sure you didn't change the SBFspot.cfg entry MQTT_Publisher=/usr/bin/mosquitto_pub ? The mosquitto-clients package is already installed in the container, you just need to configure the connection to your mqtt broker (and which data to send to the broker) in the SBFspot.cfg file. If you experience problems with sending of mqtt messages, first check, if it is possible to send mqtt messages from inside the sbfspot container to your broker e.g. /usr/bin/mosquitto_pub -h IP of your mqtt broker -m "testmessage" -t testtopic

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nakla/sbfspot/issues/4#issuecomment-725484181, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAF2TOZRHVJ6Y6QVXUEMN6LSPKT4FANCNFSM4TRG5JFQ.