[SOLVED]Help with Mosquito SSL Error

I am using Owntracks to provide geo fencing connection to a mosquito service running on mt PI.

Because I need to access moscuitto from outside my network I setup a second listener that uses SSL certificates. This has been working for months without issue but yesterday it just stopped allowing connection on the secure listener. I am still able to connect to the non SSL listener from inside my network. On checking the logs in mosquito it has the below entry when I try to connect.

OpenSSL Error: error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown

As it’s been almost a year since I first set it up I assumed the certificate might just have expired but I have followed the same guide I did last time to create all the ca and server key and crt files but even using the new files gives me the same error.

I am now at a loss as to what to try next.

Any advise as to what to do next to get this working again would be great appreciated.

Thanks.

I can’t help with the MQTT part but the GPS Tracker binding (https://www.openhab.org/addons/bindings/gpstracker/) is the currently recommended way to integrate with OwnTracks. It uses HTTP through the Cloud Service so there is no need to expose a port to the Internet.

The SSL error itself indicates that client appears to be providing an unknown certificate for authentication so I would double check that OwnTracks is set up correctly.

Well I installed the GPSTracker binding and got it working but now I have another weird issue.

The binding is in place and working and two phones are connected. If I reboot my Pi for any reason the GPSTracker binding somehow uninstalls itself. I have to go back into PaperUI and it shows as not installed. After I install it again both phones start connecting again.

Why would a binding uninstall during a reboot?

Have you ever made any changes to /etc/openhab2/addons.cfg? If so, any changes you make through PaperUI will be undone as addons.cfg takes precidence.

If you haven’t, reinstall it and look at var/lib/openhab2/config/org/openhab/addons.config and see if it’s listed. If so, reboot. Look in that file again after the reboot. Is it still there? If not there is something going wrong with your system preventing the config file from saving. This might be a symptom of a failing SD card.

It was in the addons.config but was removed after a reboot. Also I just realized that my persistence isn’t working properly and older settings are being loaded rather than the latest ones.

Guess I better buy a new SD card.

Any recommendations on the best card?

Thanks for your help.

Go for larger rather than smaller and keep good backups. All SD cards wear out eventually.

Well i have just finished setting everything up on the new card and now the SSL is working on Mosquitto as well.

Guess that was another symptom of something being messed up on the card.