Unable to open appfabric host Exception A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Answered Unable to open appfabric host Exception A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

  • Monday, August 30, 2010 9:15 PM
     
      Has Code

    I am trying to work thru the echo sample, using the appfabric SDK version 1.0.1006.

    At first I received an exception about Unable to reach watchdog... So I have tried adding the following configuration.

    <system.net>
      <defaultProxy useDefaultCredentials="true" >
       <proxy bypassonlocal="True" proxyaddress="http://autoproxy:81/" />
      </defaultProxy>
     </system.net>
    

    I need both of these settings to rectify my initial error but now I get the error.

    "The token provider was unable to provide a security token"

    Inner exception "Unable to connect to the remote server"

    Inner exception "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 65.52.11.26:443"

    I have tried to extend the timeout on opening the connection with the following code:

    host.OpenTimeout = TimeSpan.FromMinutes(5);
    

    This has no effect on my error and appears to have no affect on the time it takes to attempt the connection. I expected it would take around 5 minutes for an error to come back but it still comes back in around a 40 seconds.

    Am i trying to extend the timeout incorrectly? is it something else?

All Replies

  • Tuesday, August 31, 2010 1:43 AM
    Moderator
     
     
    I haven't looked at the echo sample... at least not in a LONG while. Was this error when launching the client or the server side of the loop?
  • Tuesday, August 31, 2010 1:58 AM
    Moderator
     
     
    Hello, this can be a firewall issue. We require at least port 80 and 443 to open for outbouding traffic on your local machine and the proxy server. Can you please check the firewall settings? Since the proxy server uses port 81, I think the problem possibly lies on the proxy server.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
  • Tuesday, August 31, 2010 11:52 PM
     
     

    OK Found out that the proxy address is wrong, that was the address of a script that configures the browser with the actual proxy location. I have now got the correct address. Still waiting to confirm that 80, and 443 are open to out bound communication from our engineering team, but my new issue is the open command just hangs, endlessly not returning. This is on the service not client.

    I see there are other threads, about this issue but I still have not found any that address what the issue is. I have tried adding tracing and I get a warning "The TCP connect operation failed.

    Exception Type: System.ServiceModel.EndpointNotFoundException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

    Message: Could not connect to net.tcp://watchdog.servicebus.windows.net:9350/. The connection attempt lasted for a time span of 00:00:21.1714685. TCP error code 10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 70.37.103.187:9350.

    Then it thows the exception (above)

    get a couple more warnings Failed to open channel.., and Faulted System.ServiceModel.channel.. but the exception above looks to be the issue.

    Is this still a proxy server error?

  • Wednesday, September 01, 2010 3:17 AM
    Moderator
     
     

    Does your proxy and local server allow you to issue outbound TCP connections (for example, is port 808/818/828 open)? If not, try to use HTTP connection mode, which only requires port 80 and 443 to open:

    ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Http;


    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
  • Thursday, September 02, 2010 4:45 PM
     
     

    Acording to our engineering team our proxy servver is open on these ports, but It does not allow service accounts to access the proxy. What credentials are we passing when we set useDefaultCredentials to true? or is this a credential for the service bus only.  The echo example uses a shared secret. Is this what is passed? How do we pass a credential to the proxy?

    I tried setting connectivity mode to Http. THe application still hangs on the open call, but in the WCF traces file there are no exceptions. There are 4 calls that show up in the activity view of the WCF Trace viewer

    00000000000

    Construct ServiceHost 'Microsoft.ServiceBus.Samples.EchoService'

    Open ServiceHost 'Microsoft.ServiceBus.Samples.EchoService'

    Construct ServiceHost 'Microsoft.ServiceBus.WebSocketRelayedConnectionListener'

    Then the application just hangs indefinetly well over an hour (so far).

  • Friday, September 03, 2010 1:32 AM
    Moderator
     
     Answered
    useDefaultCredentials will use the Windows account you use for the service hosting application. If it is a console application, usually it is the current logged on Windows account. If it is a IIS host, usually it is Network Service, a service account. Service Bus's shared secret has nothing to do with proxy credential.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.