This error could be that your certificate is badly formatted. However in my case it was due to my private key being password protected. It is easy to fix, the following commands strip the password:
copy server.key server.key.orig openssl rsa -in server.key.orig -out server.key