I am using NServiceBus (5.x) with RabbitMQ (3.6) as the transport. This connection string works:
<connectionStrings>
<add name="NServiceBus/Transport"
connectionString="host=localhost;username=****;password=***;RequestedHeartbeat=600;"/>
</connectionStrings>
But on the same server (where RabbitMQ server is installed), using host name or IP doesn't work:
<connectionStrings>
<add name="NServiceBus/Transport"
connectionString="host=myServerPC;username=****;password=***;RequestedHeartbeat=600;"/>
</connectionStrings>
I get this error:
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'
I have tried the following:
Thank you!
答案 0 :(得分:0)
最有可能的原因是你的RabbitMq实例只监听localhost
。检查RABBITMQ_NODE_IP_ADDRESS
的配置,它应该为空或包含您的主机外部IP地址。如果是127.0.0.1
或localhost
,则只能使用您的环回地址连接到RabbitMq。