Context
In versions of Aerospike Prometheus Exporter earlier than 1.20, if used with certs created with a windows line ending can fail. We can start the service but when the key is read the server will fail. The behavior is independent of server version.
Aug 10 11:08:34 bar-1 aerospike-prometheus-exporter[10225]: time="2024-08-10T11:08:34Z" level=debug msg="Connecting to host localhost:4333 "
Aug 10 11:08:34 bar-1 aerospike-prometheus-exporter[10225]: time="2024-08-10T11:08:34Z" level=fatal msg="failed to decode PEM data for key"
Method
If you encounter this error, you should update to Aerospike Prometheus Exporter 1.20.
If you are unable to update the Exporter, you can use the existing certificates by converting to UNIX line endings.
You can use a program like dos2unix or sed 's/\r$//' keyfile.pem > newkeyfile.pem