Error: The hosting infrastructure could not be reached at the specified address

Error: The hosting infrastructure could not be reached at the specified address

book

Article ID: CTX125578

calendar_today

Updated On:

Description

When trying to create a XenDesktop group that is using ESX as the hosting infrastructure, the following error message appears:

"The hosting infrastructure could not be reached at the specified address."

User-added image

CDSPoolManager log shows the following entry:

Citrix.PoolManagement.MachineManager.MachineManagementApi.HostingInfrastructureCommunicationsFailureException: Url invalid ---> System.Net.WebException: The request failed with the error message:
--
<HTML><BODY><H1>301 Moved Permanently</H1></BODY></HTML>
--.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at VimApi.VimService.RetrieveServiceContent(ManagedObjectReference _this)
   at Citrix.PoolManagement.VMManager.VmmImplementation.Vmware.VcServiceWrapper.Login(VmwareVmConnection connection, String url, String userName, String password)
   --- End of inner exception stack trace ---
   at Citrix.PoolManagement.VMManager.VmmImplementation.Vmware.VcServiceWrapper.Login(VmwareVmConnection connection, String url, String userName, String password)
   at Citrix.PoolManagement.VMManager.VmmImplementation.Vmware.VmwareVmConnection.LoginVc(String url, String userName, String password)
   at Citrix.PoolManagement.VMManager.VmmImplementation.Vmware.VmwareVmConnection.Connect(String url, String userName, String password)
   at Citrix.PoolManagement.VMManager.VmmImplementation.Vmware.ConnectionPool.MakeConnection(String login, String url, String password)
   at Citrix.PoolManagement.VMManager.VmmImplementation.Vmware.VmwareVmManager..ctor(String vmmServer, String userName, SecureString password)

Environment

The above mentioned sample code is provided to you as is with no representations, warranties or conditions of any kind. You may use, modify and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the sample code may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the sample code fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the sample code. In no event should the code be used to support ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SAMPLE CODE, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Although the copyright in the code belongs to Citrix, any distribution of the sample code should include only your own standard copyright attribution, and not that of Citrix. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the sample code.

Resolution

The following are the two options to resolve the issue:

  • Enable http traffic to vSphere and ESX.

-Or-

  • Upload a new certificate to ESX and vSphere.

This article describes how to enable http. For information on how to add a new certificate, refer to the Replacing vCenter Server Certificates document.

According to VMware vSphere Web Services SDK 4.0 Developer’s Setup Guide, you must configure proxy.xml on vSphere and ESX.

Complete the following procedure to modify the Web proxy service on ESX to support HTTP:

  1. Log on to the service console as the root user.

  2. Change directories to /etc/vmware/hostd.

  3. Use a text editor to open the proxy.xml file.

  4. Navigate to the list of endpoints in the file (identified by the <EndpointList> tag) that contains settings for the Web service supporting the SDK. The nested tags might look like the following:

    ...
    <e id=”1”>
      <_type>vim.ProxyService.NamedPipeServiceSpec</_type>
      <accessMode>httpsWithRedirect</accessMode>
      <pipeName>/var/run/vmware/proxy-sdk</pipeName>
      <serverNamespace>/sdk</serverNamespace>
    </e>
    …

    It must look like:

    ... <e id=”1”> <_type>vim.ProxyService.NamedPipeServiceSpec</_type> <accessMode>httpAndHttps</accessMode> <pipeName>/var/run/vmware/proxy-sdk</pipeName> <serverNamespace>/sdk</serverNamespace> </e> …
  5. Save your settings and close the file.

  6. Restart the vmware-hostd process by entering the following command:
    service mgmt-vmware restart  

Complete the following procedure to modify the Web proxy service on vCenter Server to support HTTP:

  1. Log on to the vCenter Server system as the Windows Administrator of the machine.

  2. Browse to find the vCenter proxy.xml file:
    1. Win2k8: C:\ProgramData\VMware\VMware VirtualCenter\proxy.xml

    2. Win2k3: C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\proxy.xml

  3. Use a text editor to open the proxy.xml file.

  4. Find the sections of the file associated with “/” and “/sdk”.

    Note: For XenDesktop 5.x, "/" is an additional requirement from XenDesktop 4 that will find provisioning desktops using MCS fail if they have not been changed.

  5. Change the accessMode to httpAndHttps.

    For example:

    <config>
      <EndpointList>
        <_length>15</_length>
        <_type>vim.ProxyService.EndpointSpec[]</_type>
        <e id="0">
          <_type>vim.ProxyService.NamedPipeServiceSpec</_type>
          <accessMode>httpAndHttps</accessMode>
          <pipeName>\\.\pipe\vmware-vpxd-webserver-pipe</pipeName>
          <serverNamespace>/</serverNamespace>
           </e>
    .  .
        <e id="5">
          <_type>vim.ProxyService.LocalServiceSpec</_type>
          <accessMode>httpAndHttps</accessMode>
          <port>8085</port>
          <serverNamespace>/sdk</serverNamespace>
           </e>
  6. Restart the service from a command line or from the Windows Services control panel.

If you have the latest hotfixes for XenDesktop, then you can use the default https SSL certificate installed with vSphere by using the following procedure:

Complete the following procedure to use the VMware installed, self-signed certificate on vSphere:

  1. Add the fully qualified domain name for the vSphere server to c:\windows\system32\drivers\etc\hosts if not present in DNS.

  2. Using Internet Explorer - enter https://<FQDN of vSphere server.

  3. Accept the security warnings.

  4. Click the Certificate Error part of the address bar and select View Certificates.

  5. Click Install CertificateNextPlace all certificates in the following store > BrowseShow physical stores.

  6. Expand Trusted People.

  7. Select Local Computer.

  8. Click OKNext Finish.

Alternatively, use Microsoft Management Console (MMC):

  1. At the command prompt, type mmc, and press Enter key.

  2. On the File menu, click Add/Remove Snap-in.

  3. Highlight Certificates and click Add.

  4. Select Computer account  and click Next.

  5. Select Local computer and click Finish.

  6. Click OK close the Add/Remove Snap-in.

  7. Expand Certificates.

  8. Right-click Trusted People, select All Tasks > Import.

  9. Click Next.

  10. Locate the certificate and click Next.

  11. When the wizard is completes, click Finish.


Problem Cause

VMWare, vSphere, and the ESX host are configured to redirect http traffic to https by default. As the default certificate on ESX does not match the name of the server, it generates an error.

Issue/Introduction

Error: The hosting infrastructure could not be reached at the specified address.

Additional Information

Replacing vCenter Server Certificates

VMware vSphere Web Services SDK 4.0 Developer’s Setup Guide