"undefined method `cert_pem' for nil:NilClass" error when accessing Ops Manager Endpoints
book
Article ID: 298228
calendar_today
Updated On:
Products
VMware Tanzu Application Service for VMs
Issue/Introduction
When you access Ops Manage Endpoints such as:
- Certificate endpoint - /api/v0/deployed/certificates?expires_within=3m
- Support bundle endpoint - /api/v0/support_bundle
The following error is thrown:
{"errors":{"base":["undefined method `cert_pem' for nil:NilClass"]}}
Resolution
This error usually occurs in one following scenarios:
- A brand-new Ops Manager is used, but the user hasn’t deployed the BOSH Director.
- You recently used the API endpoint to regenerate leaf certificates, but haven’t done an Apply Changes.
In either case, to the fix this issue, do an Apply Changes on at least the BOSH Director.
Try accessing Ops Man endpoints again after the Apply Changes completes.
Feedback
thumb_up
Yes
thumb_down
No