OctoPrint/OctoPrint-MQTT

MQTT plugin doesn't show an error when TLS certificate validation fails

nickrbogdanov opened this issue · 0 comments

If the MQTT plugin connects to a TLS MQTT server, and it is able to validate the certificate, everything works as expected.

However, if certificate validation fails (e.g. because a custom/enterprise CA certificate isn't properly installed under /etc/ssl/certs) then the plugin will not log an error, even if DEBUG logging is enabled. I don't see any mentions of MQTT at all in the octoprint log, beyond octoprint.pligin.core - INFO - 24 plugin(s) registered with the system. This makes it unnecessarily difficult to debug the failure.

It would be nice if there were more DEBUG prints in this plugin so that it's easier to see what went wrong if the MQTT messages aren't getting published.