HTTP 401 Error when trying to deploy/create an Enterprise Portal site on a load balanced farm using a hardware load balancer


We came across an issue where two WSS 3.0 servers were setup in a sharepoint farm (Contoso01 & Contoso02) and a load balanced web site/clustered web site was created (http://contoso/) successfully (uses a host header). They were using a hardware load balancer and not using Windows Network Load Balancing. Servers were running Windows Server 2008 (however that is not important).


When trying to create/deploy a Microsoft Dynamics AX 2009 Role Centers and Enterprise Portal site from the first node (Contoso01) of the cluster and using the load balanced website url, we get the following error:



The Web site http://Contoso/sites/DynamicsAx was not created correctly.
The remote server returned an error: (401) Unauthorized.
System.Net.WebException
   at System.Net.HttpWebRequest.GetResponse()
   at Microsoft.Dynamics.Framework.Portal.Deployment.EPFeatureReceiver.CreateAxSitesAndPages(SPWeb site)
   at Microsoft.Dynamics.Framework.Portal.Deployment.EPFeatureReceiver.ProvisionAxSite(SPWeb site)


As part of troubleshooting we had followed the advised given on creating the BackConnectionHostNames registry entry as per blog titled: Installing Dynamics AX 2009 Enterprise Portal on a web site that has Host Headers configured, however that still did not work.


The issue was that it was failing to copy the portal files from the AOT to the cluster servername. The cluster name, contoso resolves to the hardware load balancers ip address as you would expect. However it needs to copy the files to the actual cluster node.


To workaround the issue, we created a host entry on the first node, which mapped the cluster hostname, Contoso, to the local ip address of the node. So for example, if node 1, Contoso01, servers ip address was 192.168.0.1 and this was the ip address mapped to the http://contoso/ web site, then we created a hostname contoso mapped to this address.


Next we first deleted the partially created site collection due to the original failure. Then we were able to create an Enterprise portal successfully on http://contoso/ address.


 

Comments (1)

  1. Venkatesh says:

    Hi

    I am facing the problem of 401 error even after doing the BackConnectionHostNames setup,

    could you please explain this point  a bit further?

    "To workaround the issue, we created a host entry on the first node, which mapped the cluster hostname, Contoso, to the local ip address of the node. So for example, if node 1, Contoso01, servers ip address was 192.168.0.1 and this was the ip address mapped to the http://contoso/ web site, then we created a hostname contoso mapped to this address."

    ———————–

    The BackConnectionHostNames is a Multi_SZ key and must contain at least 4 host names. For example, if the servers hostname is contoso1 and the host header is contoso and the server belongs to an active directory domain called fabrikam.com then the 4 entries would be:

    contoso1

    contoso1.fabrikam.com

    contoso

    contoso.fabrikam.com

    After making the changes in the registry, you must restart the server for the changes to take effect.

     

    –Anup