[SOLVED] pveproxy-ssl.pem not found by apache2 when PVE is rebooted

parazitenew

New Member
Dec 27, 2023
16
2
3
Hi, I was wondering if the following problem is apache related or Proxmox related, but since I never encountered this issue with any Linux server I guess this is a PVE issue.
I have public and private domain name configured to access my PVE and any VM web server. I'm using apache2 on PVE. For public domain names I have Let's Encrypte certificate generated with Proxmox GUI and saved to its default path in /etc/pve/local/. Everything works well until I reboot the PVE. Each time the PVE is rebooted, apache2 fails to start automatically with this message :

Code:
Apr 06 15:47:46 pve apachectl[969]: AH00526: Syntax error on line 52 of /etc/apache2/sites-enabled/pve.mydomainname.com.conf:
Apr 06 15:47:46 pve apachectl[969]: SSLCertificateFile: file '/etc/pve/local/pveproxy-ssl.pem' does not exist or is empty
Apr 06 15:47:46 pve apachectl[937]: Action 'start' failed.
Apr 06 15:47:46 pve apachectl[937]: The Apache error log may have more information.
Apr 06 15:47:46 pve systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Apr 06 15:47:46 pve systemd[1]: apache2.service: Failed with result 'exit-code'.
Apr 06 15:47:46 pve systemd[1]: Failed to start apache2.service - The Apache HTTP Server.

The SSLCertificateFile: file '/etc/pve/local/pveproxy-ssl.pem' does not exist or is empty is the problem here, cause the file does exist and I just have to log to the PVE through SSH and start manually apache2. When I start it manually there is no error message, apache2 starts, and I can access my content using domain names.

To summarize, the problem occurs only at the first startup of apache after a reboot. Never when I stop it or start it manually.

Is this related to PVE behavior ? Could be the certificate file not ready at startup or something like that ?
 
Files in /etc/pve are backed by the cluster-filesystem - see https://pve.proxmox.com/pve-docs/chapter-pvecm.html
The cluster-filesystem is started by `pve-cluster.service`

It should be enough to order the start of apache After pve-cluster.service - then the certificate should be available.

I hope this helps!
 
  • Like
Reactions: parazitenew
  • Like
Reactions: Stoiko Ivanov