mosquitto icon indicating copy to clipboard operation
mosquitto copied to clipboard

getting "Error: Problem setting TLS options: File not found." when using certificates on xubuntu, but not on fedora

Open vleeb opened this issue 4 years ago • 2 comments

I was now struggling a whole day long with trying to get mosquitto_sub running with certificate files on a newly installed xubuntu 20.04, but was always getting "Error: Problem setting TLS options: File not found". I tried mosquitto versions 1.16.14 and 2.0.10.

After switching to newly installed fedora33 the same command line worked properly using exactly the same files. On fedora I used mosquitto version 1.16.14.

I am using a commandline similar to this one: mosquitto_sub -d -h some.valid.aws.host.address -p 8883 -t test --cafile ./AmazonRootCA1.pem --cert ./someclient-cert.pem.crt --key ./someclient-key.pem.key --tls-version tlsv1.2

I would really appreciate some suggestions, what might cause this problem! Many thanks!

vleeb avatar Apr 21 '21 13:04 vleeb

Finally I found out, that this problem is only present, when installing mosquitto with snap. When installing it via apt everything works as expected. During investigation with strace I also found out, that the problem is caused by the --cafile option. The filename of this option seems to be forwarded without its given path.

vleeb avatar Apr 28 '21 06:04 vleeb

i still face the same issue on apt-get . anyone found solution for this?

cometta avatar Oct 02 '25 02:10 cometta