Unable to load certificate chain from file error

Issue - Haproxy config test is failing with below error
unable to load certificate chain from file ‘/etc/haproxy/certs/mapersite2-vs/209037_mapersite2_default_mysite.pem’.

Haproxy Version - haproxy version is 2.2.9-a947cc2 & tried 2.2.10-6a09215 also.

Troubleshooting details

  • Validated the SSL certificate & CA Chain - Validation is passing & No issue found on chain also.
  • Created new file with certificate content and tried - No luck.
  • No other security issue like selinux context and all.
  • Tried to reproduce the issue from diffrent haproxy with the same certificate - No luck, it’s throwing an error there also.

Note: Its working fine on older Haproxy v1.8

What is the content of your cert chain? like below?

—privatekey—
—pubkey—
—intermediate—
—root—

  • certificate
  • Ca cert
  • key