Problem

Due to hostname mismatch between the certificate (*-versa-director) and the configured hostname (Director-DC1 and Director-DC2), configured data is not displayed after a vnms restart.


Solution

To resolve this, you must make changes to the Versa Director and to the Versa Analytics. 


Follow these steps to edit the CN and use the wild card Versa Director name (Director-DC* ) in /opt/versa/vnms/scripts/vnms-certgen.sh.

1. Go to directory /var/versa/vnms/data/certs.

2. Run the keytool --printcert -v -file versa_director_client.cer | grep CN sudo command. 


The output displays the CN.


On Active Director

Follow these steps to resolve the hostname mismatch on active Director:

  1. Run the sudo mv /var/versa/vnms/data/certs /tmp command.
  2. Edit the CN in /opt/versa/vnms/scripts/vnms-certgen.sh directory and rename it with wild card Versa Director name.
    Comment out this line in the output.
    #CN=`hostname -f`

    Change the CN name with the


    CN="*-versa-director"
  3. Run sudo /opt/versa/vnms/scripts/vnms-certgen.sh script to generate the certificate.
  4. Run sudo keytool --printcert -v -file versa_director_client.cer | grep C command to check if the certificate has the right CN.
    admin@Director1:/var/versa/vnms/data/certs$ sudo keytool --printcert -v -file versa_director_client.cer | grep C 
    
    Owner: CN=*-versa-director, OU=VersaDirector, O=versa-networks, ST=California, C=US
    
    Issuer: L=Santa Clara, ST=California, C=US, OU=VersaDirector, O=versa-networks, CN=*-versa-director
  5. Run sudo service vnms restart to restart vnms.



On Backup Director

Follow these steps to resolve the hostname mismatch on backup Director:

  1. Check if the certificate is copied to backup Director.
    It might take few seconds
  2. Restart vnms on the backup to import the certificate.

 

On Versa Analytics

Follow these steps to resolve the hostname mismatch on Versa Analytics:

  1. Copy the certificate versa_director_client.cer to /opt/versa/var/van-app/certificates/ directory in Analytics node.
  2. Run sudo rm -rf /opt/versa/van-app/certificates/versa_director_truststore.ts to remove existing truststores. 
  3. Run sudo /opt/versa/scripts/van-scripts/van-vd-cert-install.sh ./versa_director_client.cer vd script to import the  certificate.
  4. Add the Director hostnames in /etc/hosts.
    versa@versa-analytics:/opt/versa/var/van-app/certificates$ cat /etc/hosts
    127.0.0.1 localhost
    127.0.1.1 versa-analytics
    10.40.171.3     master-versa-director
    10.40.171.4     slave-versa-director
  5. Register the directors using Analytics GUI.