MT ASB connection failed error

75 views
Skip to first unread message

Suneeth Varghese

unread,
Jun 4, 2017, 11:08:12 PM6/4/17
to masstransit-discuss
Has anyone come across this error using Masstransit with Azure service bus "Azure Service Bus connection failed: The server rejected the upgrade request. 400 This endpoint is only for web-socket requests". I am using AMQP transport.how do I fix this issue?

Chris Patterson

unread,
Jun 5, 2017, 9:11:52 AM6/5/17
to masstrans...@googlegroups.com
Are you sure you're using the right connection type? The only references I see to that error are with the net.tcp binding, but that could just be a lack of content coming back from Google.

Perhaps post your host configuration code with MassTransit?

On Sun, Jun 4, 2017 at 10:08 PM, Suneeth Varghese <sune...@gmail.com> wrote:
Has anyone come across this error using Masstransit with Azure service bus "Azure Service Bus connection failed: The server rejected the upgrade request. 400 This endpoint is only for web-socket requests". I am using AMQP transport.how do I fix this issue?

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/78a16c4d-ca10-4b9a-b5d7-ad2324fe5a59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Suneeth Varghese

unread,
Jun 7, 2017, 11:14:46 PM6/7/17
to masstransit-discuss
Hi Chris 
Thanks for the response.

Here is the code I am using to configure the Bus. Please suggest if I am doing something wrong here.

 public static IBusControl ConfigureBus( Action<IServiceBusBusFactoryConfigurator,IServiceBusHost> moreInitialization=null)
        {
            var bus = Bus.Factory.CreateUsingAzureServiceBus(sbc =>
            {
                var queueUri = new Uri(System.Configuration.ConfigurationManager.AppSettings["AzureSBHost"]);

                var host = sbc.Host(queueUri, h =>
                {
                    h.SharedAccessSignature(s =>
                    {
                        s.KeyName = "RootManageSharedAccessKey";
                        s.SharedAccessKey = GetConfigValue("azure-key", "");
                        
                    });
                  
                  
                    h.OperationTimeout = TimeSpan.FromSeconds(30);
                    h.TransportType = Microsoft.ServiceBus.Messaging.TransportType.Amqp;
                });
                sbc.UseRetry(Retry.Intervals(TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5)));
                if (moreInitialization != null) moreInitialization.Invoke(sbc,host);
            });

            return bus;
        }



On Monday, June 5, 2017 at 9:11:52 AM UTC-4, Chris Patterson wrote:
Are you sure you're using the right connection type? The only references I see to that error are with the net.tcp binding, but that could just be a lack of content coming back from Google.

Perhaps post your host configuration code with MassTransit?
On Sun, Jun 4, 2017 at 10:08 PM, Suneeth Varghese <sune...@gmail.com> wrote:
Has anyone come across this error using Masstransit with Azure service bus "Azure Service Bus connection failed: The server rejected the upgrade request. 400 This endpoint is only for web-socket requests". I am using AMQP transport.how do I fix this issue?

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.

Alexey Zimarev

unread,
Jun 8, 2017, 2:02:00 PM6/8/17
to masstransit-discuss
What is the AzureSBHost setting value (without security details)?

Suneeth Varghese

unread,
Jun 8, 2017, 11:06:33 PM6/8/17
to masstransit-discuss
Hello Alexey,

Here is the info

<add key="AzureSBHost" value="sb://myservice.servicebus.windows.net/" />
 <add key="azure-namespace" value="myservice.servicebus.windows.net">

Let me know if you are looking for something specific.

Alexey Zimarev

unread,
Jun 9, 2017, 3:26:17 PM6/9/17
to masstransit-discuss
Can you check this tutorial, it might be that your host URI is not correct: https://www.maldworth.com/2016/09/15/masstransit-with-azure-service-bus/

Suneeth Varghese

unread,
Jun 12, 2017, 1:15:10 PM6/12/17
to masstransit-discuss
Hi Alexey,

Thanks for the suggestion.The link you provided was really helpful.But i just found out that the issue has to do with the outbound port for communication with service bus is being blocked by our internal security. The error  message I get is misleading somehow and i believe its generated by the Service bus client.Is that correct?

Chris Patterson

unread,
Jun 12, 2017, 10:27:43 PM6/12/17
to masstrans...@googlegroups.com
Figured that was it. Glad you figured it out. Socket errors are almost always firewall related. 

__
Chris Patterson

From: masstrans...@googlegroups.com <masstrans...@googlegroups.com> on behalf of Suneeth Varghese <sune...@gmail.com>
Sent: Monday, June 12, 2017 1:15:10 PM
To: masstransit-discuss
Subject: Re: [masstransit-discuss] MT ASB connection failed error
 
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.

To post to this group, send email to masstrans...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages