The Appliance Backup page in the VAMI doesn't load and is continuously showing a spinning wheel
search cancel

The Appliance Backup page in the VAMI doesn't load and is continuously showing a spinning wheel

book

Article ID: 439324

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Issue with loading backups in vCloud VAMI interface.
  • Unable to see the list of backups on the Cloud Director(VCD) VAMI UI.
  • The API /api/1.0.0/backups fails with a 502 bad gateway response.
  • NGINX response states as follows:

    An error occurred.
    Sorry, the page you are looking for is currently unavailable.

    Please try again later.
    If you are the system administrator of this resource then you should check
    the error log for details.
    Faithfully yours, nginx.

  • On the VCD appliance within the file /opt/vmware/var/log/vcd/vcd_ova_ui_uwsgi.log the following error is seen:

    [pid: ##|app: 0|req: 7/7] <ipaddress> () {56 vars in 1155 bytes} [<date>] GET /api/1.0.0/backups?page=1&pageSize=20&sortDesc=date => generated 0 bytes in 9 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 2)
    [pid: ##|app: 0|req: 8/8] <ipaddress> () {56 vars in 1086 bytes} [<date>] GET /api/1.0.0/nodes => generated 1905 bytes in 798 msecs (HTTP/1.1 200) 3 headers in 102 bytes (1 switches on core 1)
    Traceback (most recent call last):
      File "/opt/vmware/appliance/api/vcd_ova_ui/venv/lib/python3.10/site-packages/flask/app.py", line 1478, in __call__
        return self.wsgi_app(environ, start_response)
      File "/opt/vmware/appliance/api/vcd_ova_ui/venv/lib/python3.10/site-packages/flask/app.py", line 1458, in wsgi_app
        response = self.handle_exception(e)
      File "/opt/vmware/appliance/api/vcd_ova_ui/venv/lib/python3.10/site-packages/flask/app.py", line 1455, in wsgi_app
        response = self.full_dispatch_request()
      File "/opt/vmware/appliance/api/vcd_ova_ui/venv/lib/python3.10/site-packages/flask/app.py", line 869, in full_dispatch_request
        rv = self.handle_user_exception(e)
      File "/opt/vmware/appliance/api/vcd_ova_ui/venv/lib/python3.10/site-packages/flask/app.py", line 867, in full_dispatch_request
        rv = self.dispatch_request()
      File "/opt/vmware/appliance/api/vcd_ova_ui/venv/lib/python3.10/site-packages/flask/app.py", line 852, in dispatch_request
        return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
      File "/opt/vmware/appliance/api/vcd_ova_ui/login.py", line 62, in decorated_function
        return func(*args, **kwargs)
      File "/opt/vmware/appliance/api/vcd_ova_ui/views.py", line 234, in api_query_backup_list
        return backup.query_backup_list(query_filter, sortAsc, sortDesc, page, pageSize)
      File "/opt/vmware/appliance/api/vcd_ova_ui/backup.py", line 135, in query_backup_list
        result, rc = run_command(cmd, shell=True, timeout=5)
      File "/opt/vmware/appliance/api/vcd_ova_ui/repmgrcmd.py", line 24, in run_command
        completed = subprocess.run(
      File "/usr/lib/python3.10/subprocess.py", line 505, in run
        stdout, stderr = process.communicate(input, timeout=timeout)
      File "/usr/lib/python3.10/subprocess.py", line 1154, in communicate
        stdout, stderr = self._communicate(input, endtime, timeout)
      File "/usr/lib/python3.10/subprocess.py", line 2059, in _communicate
        stdout = self._translate_newlines(stdout,
      File "/usr/lib/python3.10/subprocess.py", line 1031, in _translate_newlines
        data = data.decode(encoding, errors)
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 305: invalid continuation byte
    [pid: ##|app: 0|req: 9/9] <ipaddress> () {56 vars in 1155 bytes} [<date>] GET /api/1.0.0/backups?page=1&pageSize=20&sortDesc=date => generated 0 bytes in 11 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 3

Environment

VMware Cloud Director 10.6.1.1

Cause

The issue occurs due to the presence of files containing unexpected or non-standard characters within the /opt/vmware/vcloud-director/data/transfer/ directory on the VCD appliance. When the Appliance Backup UI loads or the /api/1.0.0/backups API is called, an underlying Python script executes /usr/bin/ls on that directory. Because the script cannot properly encode the resulting file list, the execution fails and returns an error.

Resolution

To resolve this issue, inspect the /opt/vmware/vcloud-director/data/transfer/ directory for files containing unexpected or non-standard characters. Rename those files to have standard characters.

To do this:

  1. Open an SSH session to the VCD appliance and login as root.
  2. List the content of the transfer share directory:

    ls -la /opt/vmware/vcloud-director/data/transfer/

  3. Inspect the output and identify file names which contain unexpected or non-standard characters. 
  4. Once the file(s) is identified, rename the files(s) to remove those unexpected or non-standard characters.

    Example:

    mv /opt/vmware/vcloud-director/data/transfer/filename_unexpected.pem /opt/vmware/vcloud-director/data/transfer/filename.pem
  5. Access the VCD VAMI UI and click the 'Backup' page to confirm it loads the list of backup files correctly.