Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Error: Unable to load server certificate

A follow-up, I've found the issue (surprisingly). This is presumably a bug introduced at some point.

cafile /etc/mosquitto/cert/ca.crt

works, but

cafile  /etc/mosquitto/cert/ca.crt

does not. The difference is that there are two spaces after cafile instead of one. It looks like mosquitto treats the additional space as part of the file path. 1.2.2 was happy with this but 1.4 is not.

I've double checked this and it's unable to load when there are 2+ spaces, the exact error message is this, which includes spaces in the path:

Error: Unable to load CA certificates. Check cafile " /etc/mosquitto/cert/ca.crt"

I've entered this in the bug tracker.

-Aidan

On 15 March 2015 at 13:55, Aidan Gill <aidang@xxxxxxxxx> wrote:
Hi,

I've got this weird issue if anyone is able to help, I'm trying to upgrade 1.2.2 to the latest version 1.4, but mosquitto is no longer able to load the server certs I'm using.

They're all in standard PEM format and worked fine with 1.2.2. I've tried running as root and adjusting their path and permissions with no luck.

The error message shown is just:

Error: Unable to load server certificate

The problem persists if I use the example config file and just add

cafile /etc/mosquitto/certs/ca.crt

Any ideas?

Regards
Aidan


Back to the top