Error: TLS: Failed to Parse Private Key
Issue
The HVR Hub Server fails to start. The following errors appear:
tls: failed to parse private key
F_JW0523: Daemon terminated with exit code 1.
Environment
HVR 6
Resolution
To resolve this issue, do the following:
Set a private key password in the $HVR_CONFIG/etc/hvrhubserver.conf file.
i. On the Hub machine’s command line interface (CLI), run the following command:
hvrhubserverconfig HTTPS_Private_Key_Password=@prompt_
ii. Enter the certificate password twice when prompted to save it to the $HVR_CONFIG/etc/hvrhubserver.conf file. Once the password is set in the configuration file, the Hub Server will automatically read it during startup, regardless of whether the server is started as a service or daemon.
Start the Hub Server using your preferred method:
- Linux
- For systemd, run the following command:
sudo systemctl restart hvrhubserver.service journalctl -u hvrhubserver.service
- For daemon mode, run the following command:
hvrhubserver -d
- For systemd, run the following command:
- Windows
- Start the Fivetran HVR Hub Server service from the services management console. Alternatively, run the following command:
hvrhubserver -acs
- Start the Fivetran HVR Hub Server service from the services management console. Alternatively, run the following command:
- Linux
Once the Hub Server starts, check the logs for errors. If the Hub Server starts without errors, the issue is resolved.
Cause
This issue occurs when the Hub Server, configured to use the HTTPS protocol, is unable to parse the private key. This happens when the HTTPS_Private_Key_Password
is not set in the $HVR_CONFIG/etc/hvrhubserver.conf file, even though the certificate requires a password. Without this setting, the Hub Server cannot access the private key, causing startup failure.