"TypeError: Cannot read property 'dataConnectionState' of undefined" error when viewing Replications on the vCloud Availability Portal
search cancel

"TypeError: Cannot read property 'dataConnectionState' of undefined" error when viewing Replications on the vCloud Availability Portal

book

Article ID: 315136

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Symptoms:
  • In the Incoming or Outgoing Replications view of the vCloud Availability Portal, no replications are visible and you see a similar message:
TypeError: Cannot read property 'dataConnectionState' of undefined
  • Using the Network view of the Web Developer/Developer Tools in a browser, the response body of the GET vapp-replications API call lists all vApp replications.


Environment

VMware vCloud Availability 3.0.x
VMware vCloud Availability for Cloud-to-Cloud DR 1.x

Cause

This issue can occur due to malformed replications in the vApp replication list where a replication has either invalid or NULL entries in some of its fields.

Resolution

To resolve this issue, delete the malformed replication via the vCloud Availability API.

  1. Using an API client, such as Postman, log into the vCloud Availability API for the target site of the malformed replication:

POST https://c4-fqdn/sessions
Header:
Content-Type:application/json
Example Body:
{
    "type": "vcdCredentials",
    "vcdUser": "user@org",
    "vcdPassword": "password"
}


cURL Example:
# curl -k -i -X POST https://vcav.corp.local/sessions -H 'Content-Type: application/json' -d '{"type": "vcdCredentials","vcdUser": "administrator@system","vcdPassword": "vmware"}' | grep X-VCAV-Auth
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   237  100   149  100    88    680    401 --:--:-- --:--:-- --:--:--  1082
X-VCAV-Auth:
2kYlyP8J82cq6xsFCrRr+LOnC34=

  1. Using the X-VCAV-Auth response header for authentication, extend the session to the source site:

POST https://c4-fqdn/sessions/extend
Headers:
Content-Type:application/json
X-VCAV-Auth:auth-token
Example Body:
{
    "type": "credentials",
    "site": "source-site",
    "vcdUsername": "user@org",
    "vcdPassword": "password"
}


cURL Example:
# curl -k -i -X POST https://vcav.corp.local/sessions/extend -H 'Content-Type: application/json'  -H 'X-VCAV-Auth: 2kYlyP8J82cq6xsFCrRr+LOnC34=' -d '{"type": "credentials","site": "Provider-Site","vcdUsername": "administrator@system","vcdPassword": "vmware"}'

  1. List the incoming replications to the target site, looking for the malformed replication(s):

GET https://c4-fqdn/vapp-replications
Headers:
Content-Type:application/json
X-VCAV-Auth:auth-token

cURL Example:
# curl -k -X GET https://vcav.corp.local/vapp-replications -H 'Content-Type: application/json' -H 'X-VCAV-Auth: 2kYlyP8J82cq6xsFCrRr+LOnC34=' | json_pp

  1. Verify that the replication UUID you are using is pointing to the malformed replication by displaying its details:

GET https://c4-fqdn/vapp-replications/C4VAPP-UUID
Headers:
Content-Type:application/json
X-VCAV-Auth:auth-token

cURL Example:
# curl -k -X GET https://vcav.corp.local/vapp-replications/C4VAPP-<vapp uuid> -H 'Content-Type: application/json' -H 'X-VCAV-Auth: 2kYlyP8J82cq6xsFCrRr+LOnC34=' | json_pp

  1. After you have confirmed you are pointed to the malformed replication, delete it:

DELETE https://c4-fqdn/vapp-replications/C4VAPP-UUID
Headers:
Content-Type:application/json
X-VCAV-Auth:auth-token

cURL Example:
# curl -k -i -X DELETE https://vcav.corp.local/vapp-replications/C4VAPP-db738e72-213c-484d-8493-360c85c7f724 -H 'Content-Type: application/json' -H 'X-VCAV-Auth: 2kYlyP8J82cq6xsFCrRr+LOnC34='

  1. Repeat steps 1-5 for each malformed replication.


Additional Information

For more information on vCloud Availability APIs, see the vCloud Availability API Reference section on VMware {code}.