【发布时间】:2016-04-04 18:40:14
【问题描述】:
我使用 NServiceBus (5.x) 和 RabbitMQ (3.6) 作为传输。此连接字符串有效:
<connectionStrings>
<add name="NServiceBus/Transport"
connectionString="host=localhost;username=****;password=***;RequestedHeartbeat=600;"/>
</connectionStrings>
但在同一台服务器上(安装了 RabbitMQ 服务器),使用主机名或 IP 不起作用:
<connectionStrings>
<add name="NServiceBus/Transport"
connectionString="host=myServerPC;username=****;password=***;RequestedHeartbeat=600;"/>
</connectionStrings>
我收到此错误:
2016-04-04 14:37:45.370 ERROR NServiceBus.Transports.RabbitMQ.RabbitMqConnectionManager Failed to connect to Broker: 'myServerPC', Port: 5672 VHost: '/'. ExceptionMessage: 'None of the specified endpoints were reachable'
我尝试了以下方法:
- 创建了我自己的管理员用户(不是来宾)并通过登录 RabbitMQ 管理 UI 对其进行了验证。也可以在远程机器上工作。全部使用 myServerPC。
- 使用 Service Insight 为 NServicebus 安装许可证 -> 注册。
谢谢!
【问题讨论】:
标签: rabbitmq connection-string nservicebus