Unable to delete certificate from UI in vRealize Operations
search cancel

Unable to delete certificate from UI in vRealize Operations

book

Article ID: 340657

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Symptoms:
  • In vRealize Operations Manager UI, deleting a Certificate from Administration > Certificates fails with error:
Internal Error Occurred
  • Unable to log in to vRealize Operations Manager UI after accepting a new certificate.
  • In the /storage/vcops/log/web*.log file, you see entries similar:
INFO [ajp-bio-127.0.0.1-8009-exec-15] com.vmware.vcops.ui.util.MainPortalListener.log - (
Component: TODO
Url: /ui/certificate.action
Params: mainAction=deleteCertificate
)
java.lang.NullPointerException
at com.vmware.vcops.bridge.model.CertificateTrustObjectParam.getURIRepresentation(CertificateTrustObjectParam.java:45)
at com.vmware.vcops.bridge.model.CertificateTrustObjectParam.getURIRepresentation(CertificateTrustObjectParam.java:52)
at com.vmware.vcops.ui.action.CertificateAction.getTrustObjectDisplayName(CertificateAction.java:81)
at com.vmware.vcops.ui.action.CertificateAction.execute(CertificateAction.java:53)

Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.


Environment

VMware vRealize Operations 8.4.x
VMware vRealize Operations 8.3.x
VMware vRealize Operations 8.2.x
VMware vRealize Operations 8.5.x
VMware vRealize Operations 8.6.x
VMware vRealize Operations 8.0.x
VMware vRealize Operations 8.1.x
VMware vRealize Operations 8.10.x
VMware vRealize Operations 8.x

Resolution

To resolve the issue, manually delete the certificates from the database in vRealize Operations Manager.
  1. Log in to vRealize Operations Manager master node as root through SSH or Console.
  2. Run this command to log in to the database:
vRealize Operations 8.0 - 8.6.x
$VMWARE_PYTHON_BIN $ALIVE_BASE/cassandra/apache-cassandra-*/bin/cqlsh --ssl --cqlshrc $ALIVE_BASE/user/conf/cassandra/cqlshrc

vRealize Operations 8.10 and later
su - postgres -c "/opt/vmware/vpostgres/current/bin/psql -d vcopsdb -p 5433"
  1. Run this command to get a list of all certificates in the database:
vRealize Operations 8.0 - 8.6.x
select key from globalpersistence.certificate;

vRealize Operations 8.10 and later
select key from kv_certificate;

Note: You see the output similar to:
key
------------------------------------------------------

Certificate.006bce942b32e6d35bcab3d11c6d9532b82fc861
Certificate.4041a2a309643c0253fe645f689a70c0faa8895a
Certificate.e88b13c9e346633f94e46d2a74182d219a3c98b2
  1. Note the key of the certificate you want to delete, where the thumbprint of the certificate is the key.
  2. Run this command to delete the certificate:
vRealize Operations 8.0 - 8.6.x
delete from globalpersistence.certificate where namespace='certificate' and classtype='certificate' and key='Certificate.thumbprint';

vRealize Operations 8.10 and later
delete from kv_certificate where key = 'Certificate.thumbprint';

Note: Replace Certificate.thumbprint with the key noted in step 4.
Examples
  • delete from globalpersistence.certificate where namespace='certificate' and classtype='certificate' and key='Certificate.e88b13c9e346633f94e46d2a74182d219a3c98b2';
  • delete from kv_certificate where key = 'Certificate.e88b13c9e346633f94e46d2a74182d219a3c98b2';
  1. Run this command to exit the database:
vRealize Operations 8.0 - 8.6.x
quit;

vRealize Operations 8.10 and later
\q