Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mosquitto_sub fails with "Error: Problem setting TLS options: File not found." when using certificate files on xubuntu 20.02

I have a weird problem with mosquitto_sub 1.6.14 running on xubuntu 20.02. Everything works fine as long as I don't use certificate files. When using certificate files, I am getting "Error: Problem setting TLS options: File not found." every time. I am using the following commandline:

mosquitto_sub -h test.mosquitto.org -p 8884 -t tengo/bravo --cafile ~/test/mosquitto.org.crt --cert ~/test/returned.crt --key ~/test/client.key

When using the same command line with the same files on a fedora33 machine, everything works fine.

Can anybody help me? Please!

like image 940
volker.leeb Avatar asked Aug 31 '25 20:08

volker.leeb


1 Answers

The root-cause of the problem seems to be the installation via snap. I followed the primary suggestion on https://mosquitto.org/download/ to install via snap, having the mentioned problems.

I found a post in ask-ubuntu where someone had a similar problem, where mosquito worked initially after installing with apt, but did not work anymore when reinstalling with snap.

So I tried to remove the snap installation and followed the secondary installation hints on https://mosquitto.org/download/ to install via apt.

Surprise surprise ... now it works.

like image 168
volker.leeb Avatar answered Sep 03 '25 14:09

volker.leeb