Tuesday, 17 May 2016

Unable To Connect VDP 6.1 To Web Client

So once the new VDP 6.1 appliance is deployed, we login to Web Client and select the vSphere Data Protection plugin. From the drop-down, we will select the required VDP appliance and click connect. However, upon performing this, the screen grays out forever, and this operation does not fail either with an error. 

The thing to notice here is:

1. This issue occurs when the VDP 6.1 is on a distributed switch. 
2. If the VDP virtual machine is migrated to a standard switch, the appliance is able to connect to the web client
3. If the VMs that need to be backed up are on distributed switch, then the backup job create task grays out forever. 
4. If the entire environment is migrated to standard switch, the working goes back to normal. 

So all in short, VDP 6.1 on a vDS environment has issues. Now, since migrating your entire networking to standard switch is obviously not a feasible or recommended task, there is a hot-patch released to fix this. 

Now, I am sharing these steps here along with the patch is solely because, I have distributed the patch to every customer who had opened a case with us to get this fixed along with the steps, so why not share it here for ease of access. 

Before we get to the resolution, this is what was noticed in the virgo logs in vCenter when the connect option was clicked when the VDP appliance was on a distributed switch.

[2016-04-11 18:36:45.604] [INFO ] http-bio-9443-exec-3 System.out [BlazeDS]Cannot create class of type 'com.vmware.vim.binding.vim.dvs.PortConnection'.
[2016-04-11 18:36:45.604] [INFO ] http-bio-9443-exec-3 System.out flex.messaging.MessageException: Cannot create class of type 'com.vmware.vim.binding.vim.dvs.PortConnection'. Type 'com.vmware.vim.binding.vim.dvs.PortConnection' not found.
[2016-04-11 18:36:45.608] [INFO ] http-bio-9443-exec-3 System.out [BlazeDS]Cannot create class of type 'com.vmware.vim.binding.vim.dvs.PortConnection'.
[2016-04-11 18:36:45.608] [INFO ] http-bio-9443-exec-3 System.out flex.messaging.MessageException: Cannot create class of type 'com.vmware.vim.binding.vim.dvs.PortConnection'. Type 'com.vmware.vim.binding.vim.dvs.PortConnection' not found.
[2016-04-11 18:36:45.612] [INFO ] http-bio-9443-exec-3 System.out [BlazeDS]Cannot create class of type 'com.vmware.vim.binding.vim.dvs.PortConnection'.
[2016-04-11 18:36:45.612] [INFO ] http-bio-9443-exec-3 System.out flex.messaging.MessageException: Cannot create class of type 'com.vmware.vim.binding.vim.dvs.PortConnection'. Type 'com.vmware.vim.binding.vim.dvs.PortConnection' not found.
[2016-04-11 18:36:45.616] [INFO ] http-bio-9443-exec-3 System.out [BlazeDS]Cannot create class of type 'com.vmware.vim.binding.vim.dvs.PortConnection'.
[2016-04-11 18:36:45.616] [INFO ] http-bio-9443-exec-3 System.out flex.messaging.MessageException: Cannot create class of type 'com.vmware.vim.binding.vim.dvs.PortConnection'. Type 'com.vmware.vim.binding.vim.dvs.PortConnection' not found.


So the resolution:

1. Download the vdr-ui-war-6.1.2.war file from this link here.
2. Determine the version of vCenter and navigate to one of the following directories accordingly:

5.5 vCenter
Windows:
C:\ProgramData\VMware\vSphere Web Client\vc-packages\vsphere-client-serenity\com.vmware.vdp2-<version>\plugins
Appliance:
var/lib/vmware/vsphere-client/vc-packages/vsphere-client-serenity/com.vmware.vdp2-<version>/plugins

6.0 vCenter
Windows:
C:\ProgramData\VMware\vCenterServer\cfg\vsphere-client\vc-packages\vsphere-client-serenity\com.vmware.vdp2-6.1.*\plugins
Appliance:
etc/vmware/vsphere-client/vc-packages/vsphere-client-serenity/com.vmware.vdp2-6.1.*/plugins/

3. Here you can see two files, a .jar file and a .war file. 
4. Rename the existing .war file to vdr-ui-war-6.1.x.war_old (where x is the version of your plugin)
5. Copy the patched .war file in the attachment, and paste it, named accordingly into this folder. 
6. In vCenter appliance 6.0, I had to perform couple of additional steps (Windows vCenter does not require these steps). The older jar and war file were having the following permissions:

Owner: vsphere-client
Group: Users

7. The applied patch has Owner and Group as root. Change this accordingly. 
You can do this easily by opening a WinSCP connection to vCenter > Right click the File > Properties and these two options will be available here. 
8. Restart the web client service. 

Windows, you can find this service in services.msc

Appliance
service vsphere-client stop
service vsphere-client start
9. Login to web client > Connect, and now we should be able to successfully connect to the appliance from web client. 

That's pretty much it. 
If something does not work, comment below! And always take care while patching.

Update:
If the connect still fails, then discard the old renamed .war file, restart the web client service and try connecting again.

Thank you!