【问题标题】:What is blocking AMQP TransportType when using Service Bus for Windows Server (Service Bus 1.1)?使用 Service Bus for Windows Server (Service Bus 1.1) 时阻止 AMQP TransportType 的原因是什么?
【发布时间】:2014-03-10 03:44:47
【问题描述】:

我已经在我的机器(Windows 7 Enterprise SP1 x64)上安装了 Service Bus for Windows Server (Service Bus 1.1)。

我正在使用示例 C# 代码来创建一个简单的消息发送方/接收方,如下所示: http://www.windowsazure.com/en-us/documentation/articles/service-bus-dotnet-advanced-message-queuing/

当我使用默认的TransportType.NetMessaging 时,控制台应用程序运行良好,我可以向我的队列发送/接收消息。

当我将配置文件(或代码)更改为使用 TransportType.Amqp 时,控制台应用程序启动并且我立即收到异常:

An existing connection was forcibly closed by the remote host

(注意:这发生在调用messageReceiver.Receive() 方法时)。

感觉像是防火墙/端口被阻止了,但服务总线安装确实成功地向我的防火墙添加了一堆异常,其中包括:

SBHttpsPort [Inbound, Local Address=Any, Remote Address=Any, Protocol=TCP,9355, 9002, 9359, 9002]
Service Bus Gateway [Inbound, Local Address=Any, Remote Address=Any, Protocol=TCP, 9354, 5672, 5671]
Sevice Bus Message Broker [Inbound, Local Address=Any, Remote Address=Any, Protocol=TCP, 9356, 5672, 5671]
Service Bus Resource Provider [Inbound, Local Address=Any, Remote Address=Any, Protocol=TCP, 9359, 5672, 5671]
Service Bus VSS [Inbound, Local Address=Any, Remote Address=Any, Protocol=TCP, 9356, 5672, 5671]

出站规则也有匹配的例外。

Service Bus Gateway (out)
Sevice Bus Message Broker (out)
Service Bus Resource Provider (out)
Service Bus VSS (out)

我在公司网络上,因此无法关闭防火墙以查看其作用。

当我查看具有高级安全性的 Windows 防火墙->监控->防火墙时,我确实看到了服务总线的入站异常,但我没有看到服务总线 *(出)防火墙异常(这可能是问题吗? )。

谁能帮我弄清楚 Amqp 在我的机器上发生了什么?

干杯。

【问题讨论】:

    标签: .net azure firewall amqp servicebus


    【解决方案1】:

    为 RuntimePort 使用端口 5671。

    如果您使用的是连接字符串,它应该如下所示:

    Endpoint=sb://machine1.contoso.com/ServiceBusDefaultNamespace; StsEndpoint=https://machine1.contoso.com:9355/ServiceBusDefaultNamespace; RuntimePort=5671;ManagementPort=9355;WindowsUsername=userName;WindowsDomain=contoso; Windows密码=密码; TransportType=Amqp

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-04-18
      • 2011-02-07
      • 1970-01-01
      • 2015-03-12
      • 2011-12-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多