Koozali.org: home of the SME Server

Information: ssl certificate problem caused by low disk space

Offline mmccarn

  • *
  • 2,628
  • +10/-0
Information: ssl certificate problem caused by low disk space
« on: August 27, 2013, 05:16:21 PM »
I recently ran into an odd problem with my ssl certificate, and wanted to document the errors and solution.

History:
My SME server ran out of disk space at some point.  While disk space was unavailable, new ssl certificates were generated.  This resulted in certificate files in place with zero bytes of content.

Symptoms:
1. Console error (physical monitor or vmware console session only; this error did not appear in any log file):
Code: [Select]
Syntax error on line 151 of /etc/httpd/conf/httpd.conf: SSLCertificateFile: file '/home/e-smith/ssl.crt/<host>.<primaryDomain>.crt' does not exist or is empty
2. Attempts to create a new ssl.crt produced this error in /var/log/messages:
Code: [Select]
ERROR in /etc/e-smith/templates//home/e-smith/ssl.crt: Program fragment delivered error <<RSACERT kid exited 256 at /etc/e-smith/templates//home/e-smith/ssl.crt line 83.>> at template line 1
Aug 27 07:53:39 <host> esmith::event[1355]: WARNING in /etc/e-smith/templates//home/e-smith/ssl.pem/40crt: ERROR: Template processing failed for //home/e-smith/ssl.crt/<host>.<primaryDomain>.crt: 1 fragment generated warnings, 1 fragment generated errors

Solution:
To resolve the issue, I needed to delete the empty ssl certificate files and run the 'domain-modify' event:
Code: [Select]
cd /home/e-smith
rm -f ssl.key/*.key
rm -f ssl.pem/*.pem
rm -f ssl.crt/*.crt
signal-event domain-modify

I also learned that all three ssl-related files:
/home/e-smith/ssl.key/<host>.<primaryDomain>.key
/home/e-smith/ssl.pem/<host>.primaryDomain>.pem
/home/e-smith/ssl.crt/<host>.primaryDomain>.crt

Are created from the "ssl.pem" template:
Code: [Select]
expand-template /etc/e-smith/templates/home/e-smith/ssl.pem

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Information: ssl certificate problem caused by low disk space
« Reply #1 on: August 28, 2013, 03:23:26 PM »
I recently ran into an odd problem with my ssl certificate, and wanted to document the errors and solution.

Please do so in the bug tracker. We should consider automating this.