trafficcontrol icon indicating copy to clipboard operation
trafficcontrol copied to clipboard

Failed to load default certificate when changing hostname for Traffic Router

Open smalenfant opened this issue 3 years ago • 0 comments

This Bug Report affects these Traffic Control components:

  • Traffic Router

Current behavior:

Looks like Traffic Router creates a default self-signed certificate. 2 files seems to be generated:

  • keyStore.jks
  • fqdn.crt

When one changes the hostname of the server. A new certificate is not generated and Traffic Router complaints with a few messages like:

ERROR 2022-12-14T20:11:54.307 [Thread-21] org.apache.traffic_control.traffic_router.secure.CertificateRegistry - Failed to load default certificate. Received class java.lang.NullPointerException with message: null
ERROR 2022-12-14T20:11:54.308 [Thread-21] org.apache.traffic_control.traffic_router.secure.CertificateRegistry - Failed to initialize the API Default certificate.

Expected behavior:

Traffic Router should regenerate a new certificate that matches the hostname.

Steps to reproduce:

  • Install Traffic Router on a VM
  • Change the hostname of the VM
  • Restart Traffic Router

smalenfant avatar Dec 14 '22 20:12 smalenfant