StoreFront errors with "Cannot complete your request" & event log "Failed to run discovery"

StoreFront errors with "Cannot complete your request" & event log "Failed to run discovery"

book

Article ID: CTX214759

calendar_today

Updated On:

Description

While users attempt to connect to the Receiver for Web site and enumerate applications published, the page displays an error "Cannot Complete your Request".

Below errors will be seen in the DebugView logs:
Citrix.Web.DeliveryServicesProxy.ConfigLoader.DiscoveryServiceException: An error occurred while contacting the Discovery Service ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host    
    00001889    16.33249283    [716]    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)    
    00001890    16.33249283    [716]    --- End of inner exception stack trace ---    
    00001891    16.33249283    [716]    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)    
    00001892    16.33249283    [716]    at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)    
    00001893    16.33249283    [716]    at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)    
    00001894    16.33249283    [716]    at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)    
    00001895    16.33249283    [716]    at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)    
    00001896    16.33249283    [716]    at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)    
    00001897    16.33249283    [716]    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)    
    00001898    16.33249283    [716]    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)    
    00001899    16.33249283    [716]    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)    
    00001900    16.33249283    [716]    at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)    
    00001901    16.33249283    [716]    at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)    
    00001902    16.33249283    [716]    at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)    
    00001903    16.33249283    [716]    at System.Net.ConnectStream.WriteHeaders(Boolean async)    
    00001904    16.33249283    [716]    --- End of inner exception stack trace ---    
    00001905    16.33249283    [716]    at System.Net.HttpWebRequest.GetResponse()    
    00001906    16.33249283    [716]    at Citrix.DeliveryServicesClients.Utilities.HttpHelpers.ReceiveResponse(HttpWebRequest req)    
    00001907    16.33249283    [716]    at Citrix.DeliveryServicesClients.Discovery.RequestHandler.DiscoveryHttpRequestHandler.GetDocument(String url)    
    00001908    16.33249283    [716]    at Citrix.Web.DeliveryServicesProxy.ConfigLoader.Discovery.AppendConfigurationFromDiscoveryService(WebReceiverConfigSection section)    
    00001909    16.33249283    [716]    --- End of inner exception stack trace ---    
    00001910    16.33249283    [716]    at Citrix.Web.DeliveryServicesProxy.ConfigLoader.Discovery.AppendConfigurationFromDiscoveryService(WebReceiverConfigSection section)    
    00001911    16.33249283    [716]    at Citrix.Web.DeliveryServicesProxy.ConfigLoader.Discovery.RunDiscovery(WebReceiverConfigSection configSection)    
    00001912    16.33249283    [716]    at Citrix.Web.DeliveryServicesProxy.ConfigLoader.Discovery.DiscoveryThreadFunction(Object obj)    
    00001913    16.80147362    [716] Citrix.Web.Receiver.Session Verbose: 0 :    
    00001914    16.80152130    [716] RfWebPageHandler: reqUrl=/Citrix/TestWeb/receiver.html, appPath=/Citrix/TesWeb    
Below exceptions seen in the Verbose traces for Storefront server:
    <TimeCreated SystemTime="2016-06-30T14:35:51.4927771Z" />
    <ApplicationData>Exception occurred while running discovery in background thread:
    </ApplicationData>

    <TimeCreated SystemTime="2016-06-30T14:35:51.5017780Z" />
    <DataItem>Citrix.Web.DeliveryServicesProxy.ConfigLoader.DiscoveryServiceException: An error occurred while contacting the Discovery Service
        <System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send.
        <System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
        <System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
           at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
           --- End of inner exception stack trace ---
           at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
           at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
           at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
           at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
           at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
           at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
           at System.Net.ConnectStream.WriteHeaders(Boolean async)
           --- End of inner exception stack trace ---
           at System.Net.HttpWebRequest.GetResponse()
           at Citrix.DeliveryServicesClients.Utilities.HttpHelpers.ReceiveResponse(HttpWebRequest req)
           at Citrix.DeliveryServicesClients.Discovery.RequestHandler.DiscoveryHttpRequestHandler.GetDocument(String url)
           at Citrix.Web.DeliveryServicesProxy.ConfigLoader.Discovery.AppendConfigurationFromDiscoveryService(WebReceiverConfigSection section)
           --- End of inner exception stack trace ---
           at Citrix.Web.DeliveryServicesProxy.ConfigLoader.Discovery.AppendConfigurationFromDiscoveryService(WebReceiverConfigSection section)
           at Citrix.Web.DeliveryServicesProxy.ConfigLoader.Discovery.RunDiscovery(WebReceiverConfigSection configSection)
           at Citrix.Web.DeliveryServicesProxy.ConfigLoader.Discovery.DiscoveryThreadFunction(Object obj)
    </DataItem>
 
Below errors will be seen in the Event logs:
Log Name:      Citrix Delivery Services
Source:        Citrix Receiver for Web
Event ID:      17
Task Category: (3000)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:     
Description:
Failed to run discovery
Citrix.Web.DeliveryServicesProxy.ConfigLoader.DiscoveryServiceException, ReceiverWebConfigLoader, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null
An error occured while contacting the Discovery Service
   at Citrix.Web.DeliveryServicesProxy.ConfigLoader.Discovery.AppendConfigurationFromDiscoveryService(WebReceiverConfigSection section)
   at Citrix.Web.DeliveryServicesProxy.ConfigLoader.Discovery.RunDiscovery(WebReceiverConfigSection configSection)
   at Citrix.Web.Proxy.Filters.DiscoveryComplete.OnAuthorization(AuthorizationContext filterContext)

System.Net.WebException, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
The underlying connection was closed: An unexpected error occurred on a send.
Url: https://storefront/Citrix/test/discovery
ExceptionStatus: SendFailure
   at System.Net.HttpWebRequest.GetResponse()
   at Citrix.DeliveryServicesClients.Utilities.HttpHelpers.ReceiveResponse(HttpWebRequest req)
   at Citrix.DeliveryServicesClients.Utilities.HttpHelpers.ReceiveResponse(String url, String token, HttpRequestParameters options, Object requestData, CookieContainer cookieContainer)
   at Citrix.DeliveryServicesClients.Utilities.HttpHelpers.ReceiveResponse(String url, String token, HttpRequestParameters options, Object requestData)
   at Citrix.DeliveryServicesClients.Discovery.RequestHandler.DiscoveryHttpRequestHandler.GetDocument(String url)
   at Citrix.DeliveryServicesClients.Discovery.DiscoveryClient.GetDocument(String url)
   at Citrix.Web.DeliveryServicesProxy.ConfigLoader.Discovery.AppendConfigurationFromDiscoveryService(WebReceiverConfigSection section)


Log Name:      Citrix Delivery Services
Source:        Citrix Receiver for Web
Event ID:      12
Task Category: (3000)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:     
Description:
An error occurred while contacting the Discovery Service.
System.Net.WebException, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
The underlying connection was closed: An unexpected error occurred on a send.
Url: https://storefront/Citrix/test/discovery
ExceptionStatus: SendFailure
   at System.Net.HttpWebRequest.GetResponse()
   at Citrix.DeliveryServicesClients.Utilities.HttpHelpers.ReceiveResponse(HttpWebRequest req)
   at Citrix.DeliveryServicesClients.Utilities.HttpHelpers.ReceiveResponse(String url, String token, HttpRequestParameters options, Object requestData, CookieContainer cookieContainer)
   at Citrix.DeliveryServicesClients.Utilities.HttpHelpers.ReceiveResponse(String url, String token, HttpRequestParameters options, Object requestData)
   at Citrix.DeliveryServicesClients.Discovery.RequestHandler.DiscoveryHttpRequestHandler.GetDocument(String url)
   at Citrix.DeliveryServicesClients.Discovery.DiscoveryClient.GetDocument(String url)
   at Citrix.Web.DeliveryServicesProxy.ConfigLoader.Discovery.AppendConfigurationFromDiscoveryService(WebReceiverConfigSection section)

Environment

Citrix is not responsible for and does not endorse or accept any responsibility for the contents or your use of these third party Web sites. Citrix is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement by Citrix of the linked Web site. It is your responsibility to take precautions to ensure that whatever Web site you use is free of viruses or other harmful items.

Resolution

While the StoreFront is trying to connect to itself, we are unable to communicate over http:// or https://
This does interpret that we might have an improper binding over the website which needs to be checked as per below steps:

  • Go to Default Website – Bindings
  • Edit HTTP and HTTPS bindings
  • Check and validate that the IP Address section
  • In case there is a binding made to the IP address of the storefront server, delete it
  • Reset the IIS and create new bindings (HTTP & HTTPS) with IP address set to ALL Unassigned
  • Check the below URLs to validate the functionality working as expected for both HTTP and HTTPS:
    • https://127.0.0.1/Citrix/<Store_Name>/discovery 
    • https://localhost/Citrix/<Store_Name>/discovery
This should result in a download of discovery file. 

Problem Cause

Incorrect bindings on IIS for the Default Site

Issue/Introduction

Unable to authenticate and proceed with App enumeration while opening the Receiver for Web site as it gives an error "Cannot complete your request"

Additional Information

https://support.citrix.com/article/CTX139592/how-to-enable-storefront-verbose-logging
https://support.citrix.com/article/CTX206492/how-to-export-and-install-an-ssl-certificate-for-storefront-to-use-https