Unable to connect to ServiceBus using HTTP connectivity mode
-
quinta-feira, 15 de março de 2012 17:20
hi,
I am trying to run the getting started echo program in samples(sep11 release- downloaded from codeplex )...I upgraded the code for sdk1.6 version...and its building the project...
I am getting error while running the server & client... The error is in title.... it points this error at host.open() line...
Is it my network/proxy issue? How to overcome this?
Exception details:
System.ServiceModel.CommunicationException was unhandled
Message=Unable to connect to ServiceBus using HTTP connectivity mode
Source=Microsoft.ServiceBus
StackTrace:
at Microsoft.ServiceBus.WebStream..ctor(Uri factoryEndpointUri, String webSocketRole)
at Microsoft.ServiceBus.WebSocketConnection..ctor(Uri factoryEndpointUri, String webSocketRole, Int32 asyncReadBufferSize)
at Microsoft.ServiceBus.WebSocketOnewayConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
at Microsoft.ServiceBus.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
at Microsoft.ServiceBus.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.CommunicationObject.Open(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.LayeredChannel`1.OnOpen(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.CommunicationObject.Open(TimeSpan timeout)
at Microsoft.ServiceBus.RelayedOnewayTcpClient.RelayedOnewayChannel.Open(TimeSpan timeout)
at Microsoft.ServiceBus.RelayedOnewayTcpClient.GetChannel(Uri via, TimeSpan timeout)
at Microsoft.ServiceBus.RelayedOnewayTcpClient.ConnectRequestReplyContext.Send(Message message, TimeSpan timeout, IDuplexChannel& channel)
at Microsoft.ServiceBus.RelayedOnewayTcpListener.RelayedOnewayTcpListenerClient.Connect(TimeSpan timeout)
at Microsoft.ServiceBus.RelayedOnewayTcpClient.EnsureConnected(TimeSpan timeout)
at Microsoft.ServiceBus.RelayedOnewayTcpClient.OnOpen(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.CommunicationObject.Open(TimeSpan timeout)
at Microsoft.ServiceBus.RelayedOnewayTcpListener.OnOpen(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.RefcountedCommunicationObject.Open(TimeSpan timeout)
at Microsoft.ServiceBus.RelayedOnewayChannelListener.OnOpen(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at Microsoft.ServiceBus.WebSocketRelayedConnectionListener.Open(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.BufferedConnectionListener.Open(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.ConnectionAcceptor.Open(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.ConnectionDemuxer.StartDemuxing(TimeSpan timeout, OnViaDelegate viaDelegate)
at Microsoft.ServiceBus.Channels.ConnectionDemuxer.Open(TimeSpan timeout)
at Microsoft.ServiceBus.SocketConnectionTransportManager.OnOpen(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.TransportManager.Open(TimeSpan timeout, TransportChannelListener channelListener)
at Microsoft.ServiceBus.Channels.TransportManagerContainer.Open(TimeSpan timeout, SelectTransportManagersCallback selectTransportManagerCallback)
at Microsoft.ServiceBus.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.ConnectionOrientedTransportChannelListener.OnOpen(TimeSpan timeout)
at Microsoft.ServiceBus.SocketConnectionChannelListener`2.OnOpen(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at Microsoft.ServiceBus.Samples.Program.Main(String[] args) in C:\Users\Administrator\Desktop\ServiceBus Samples - October 2011 Release\ServiceBus\CSharp\GettingStarted\RelayedMessaging\Echo\Service\Program.cs:line 62
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.ServiceModel.CommunicationException
Message=Unable to connect upstream
Source=Microsoft.ServiceBus
StackTrace:
at Microsoft.ServiceBus.WebStream.CreateUpStreamRequest(Uri endpointLocation)
at Microsoft.ServiceBus.WebStream.StartSession(Uri readEndpoint, Uri writeEndpoint)
at Microsoft.ServiceBus.WebStream..ctor(Uri factoryEndpointUri, String webSocketRole)
InnerException: System.Net.ProtocolViolationException
Message=Chunked encoding upload is not supported on the HTTP/1.0 protocol.
Source=System
StackTrace:
at System.Net.HttpWebRequest.CheckProtocol(Boolean onRequestStream)
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at Microsoft.ServiceBus.WebStream.CreateUpStreamRequest(Uri endpointLocation)
InnerException:
A.Navarajan
Todas as Respostas
-
quinta-feira, 15 de março de 2012 21:38
Could you provide some more information on the code you're attempting to execute ? Are you behind a proxy server?
MSDN information if you would be behind a proxy server:
http://msdn.microsoft.com/en-us/library/ee706729.aspxYou need HTTP 1.1 support on your proxy server, which is a requirement for the Windows Azure service bus. You can configure your proxy settings like this:
<system.net>
<defaultProxy useDefaultCredentials="true">
<proxy proxyaddress="your proxy server address"/>
</defaultProxy>
</system.net>You can find all the needed information here in that case:
http://social.technet.microsoft.com/wiki/contents/articles/troubleshooting-connectivity-issues-in-the-windows-azure-appfabric-service-bus.aspxEdit: Just noticed the InnerException message notifies that upload is not supported on the HTTP/1.0 protocol. So in case you're using a proxy server, the chances are big that might be the issue.
Be nice to nerds ... Chances are you'll end up working for one!
- Editado Robbin Cremers quinta-feira, 15 de março de 2012 21:42
- Editado Robbin Cremers quinta-feira, 15 de março de 2012 21:44
- Editado Robbin Cremers quinta-feira, 15 de março de 2012 21:45
-
sexta-feira, 16 de março de 2012 07:31
Hi Robbin,
I asked my System admin to unblock the ports 9350,9351,9352 .... Hope it will help....
A.Navarajan
-
sexta-feira, 16 de março de 2012 07:53Moderador
Hi,
If you have future question about this problem, please inform us and we will help to follow up.
Thanks.
Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework
-
sexta-feira, 16 de março de 2012 09:34
Sys Admin has unblocked the ports, now i am getting the following error...
Could not connect to net.tcp://207.46.63.160:9351/EchoService/. The connection attempt lasted for a time span of 00:00:21.0566407. 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 207.46.63.160:9351.
InnerException: System.Net.Sockets.SocketException
Message=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 207.46.63.175:9351
Source=System
ErrorCode=10060
NativeErrorCode=10060
StackTrace:
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
InnerException:
A.Navarajan
-
sexta-feira, 16 de março de 2012 11:56Moderador
Hi,
Do you mean EchoSample of ServiceBus sample? Look at this line of the sample, under the issuerSecret variable, it that your protocol is "sb" with NetTcpBinding?
Uri address = ServiceBusEnvironment.CreateServiceUri("sb", serviceNamespace, "EchoService");your address will be like this: sb:<Your-Namespace>.servicebus.window.net/EchoService/
Hope it can help you.
Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework
-
sexta-feira, 16 de março de 2012 11:59
Hi Arwind,
Yes...The EchoSample of ServiceBus Sample only...
A.Navarajan
-
sexta-feira, 16 de março de 2012 17:40Moderador
Hi,
You got "Unable to connect to ServiceBus using HTTP connectivity mode" error message, because By default, the Service side would first try connecting to windows azure appfabric through TCP transport, and if the connection is failed, it will transfer to HTTP transport mode, HTTP mode can works for most cases, but not on your computer.
Can you make sure the 9351 port is open and the mode is TCP mode?
Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework
- Marcado como Resposta Navarajan A sábado, 17 de março de 2012 08:37
-
sábado, 17 de março de 2012 08:37
Hi,
It is working now... Problem was in my network side...They allowed certain range of IP to access through 9351 but the sb IP didnt fall in to that range...Now it configured correctly...Thanks for everyone...
A.Navarajan
-
quinta-feira, 14 de fevereiro de 2013 09:47
Hi,
I am getting error "The token provider was unable to provide a security token while accessing 'http://<<XYZ>>-sb.accesscontrol.windows.net/WRAPv0.9/'. Token provider returned message: 'Unable to connect to the remote server'.".
I am using sb-messaing adapter for this purpose. Kindly suggest.
Thanks,
Ankur
Ankur Seth

