Troubleshooting VMware

Fix: Unable to register plugin vRealize Operations Tenant App 2.5 for VMware Cloud Director

Hello readers!! You might come across the following issue after you upgrade vRealize Tenant App from version 2.4 to version 2.5 and spend hours trying to figure out how to fix it! Hopefully, this problem is resolved in the next release or a KB in VMware soon, in the meantime here are the steps on how to register the plugin in VMware Cloud Director.

Always make sure all your components are compatible. Our environment configuration as follows:

  • vRealize Operations Manager 8.2
  • Management Pack for vCloud Director 5.4
  • vRealize Tenant App 2.5
  • Cloud Director 10.1.1

Problem

Issue occurs when from Tenant App UI the plugin is configured to use VMware Cloud Director Public URL.
Tenant’s view when opening Operations Manager plugin:

To see Tenant App logs

  • SSH Tenant App appliance using root credentials
  • Run docker ps
  • Take note of the container ID of vmware/vrops-vcd-tenant-app-plugin
  • Run docker logs “container id”
docker logs 0cadb2ddda23
HTTPSConnectionPool(host='vcd-bakingclouds.com', port=443): Max retries exceeded with url: /api/sessions (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fd8a744f610>: Failed to establish a new connection: [Errno 110] Connection timed out',))
Traceback (most recent call last):
  File "/etc/vmware/bin/vcd_extension.py", line 247, in login
    loginUrl, headers=headers, data=json.dumps(requestBody), verify=False)
  File "/usr/lib/python2.7/site-packages/requests/api.py", line 119, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='vcd-bakingclouds', port=443): Max retries exceeded with url: /api/sessions (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fd8a744f610>: Failed to establish a new connection: [Errno 110] Connection timed out',))

Install.log errors (location: /data/logs/plugin/install.log):

ype="application/octet-stream"
2021-01-27 17:21:52,543 - install - ERROR - HTTPSConnectionPool(host='vcd-bakingclouds.com', port=443): Max retries exceeded with url: /transfer/8d014e9d-532f-494b-9f99-50ab02208f4d/plugin.zip (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd8448b6e50>: Failed to establish a new connection: [Errno 110] Connection timed out',))
Traceback (most recent call last):
  File "publish.py", line 153, in upload
    data=fin.read(), verify=False)
  File "/usr/lib/python2.7/site-packages/requests/api.py", line 124, in put
    return request('put', url, data=data, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 500, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 621, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='vcd-bakingclouds.com', port=443): Max retries exceeded with url: /transfer/8d014e9d-532f-494b-9f99-50ab02208f4d/plugin.zip (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd8448b6e50>: Failed to establish a new connection: [Errno 110] Connection timed out',))

Solution

At your own risk!! If you are going to attempt this make sure you have the same symptoms, take snapshot of your appliance. We highly recommend to contact VMware Support for further assistance.

  • Go to /opt/vmware/plugin and edit publish.py
  • Add/modify the following lines highlighted in red:
def upload(token, link):
    logger.info("uploading to " + link)
    url = link.split('>')[0].strip('<').strip('>').strip()
    mod_url = "https://"+args.host+url[url.index("/transfer"):]
    try:
        headers = {"Content-Type": "application/zip",
                   "x-vcloud-authorization": token}
        fin = open('plugin.zip', 'rb')
        response = requests.put(mod_url, headers=headers,
                                data=fin.read(), verify=False)
        fin.close()
        logger.info("Uploaded Successfully")
  • Save the changes and reconfigure the plugin from the UI using vCD IP address

Additional Resources

VMware Product Interoperability Matrices

We hope this post is useful. If you want more information, send us your comment using the button below.

Disclaimer
Last updated: May 17, 2018
The information contained on www.bakingclouds.com website (the “Service”) is for general information purposes only.
Baking Clouds assumes no responsibility for errors or omissions in the contents on the Service.
In no event shall Baking Clouds be liable for any special, direct, indirect, consequential, or incidental damages or any damages whatsoever, whether in an action of contract, negligence or other tort, arising out of or in connection with the use of the Service or the contents of the Service.  Baking Clouds reserves the right to make additions, deletions, or modification to the contents on the Service at any time without prior notice.