RabbitMQ 连接错误没有一个指定的端点是可达的" [英] RabbitMQ Connection Error " None of the specified endpoints were reachable"

查看:21
本文介绍了RabbitMQ 连接错误没有一个指定的端点是可达的"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在服务器和我的系统上安装了 rabbitmq 服务.我想使用 RPC 模式:

I installed rabbitmq service on the server and on my system. I want to use RPC pattern:

var factory = new ConnectionFactory() { 
  HostName = "158.2.14.42", 
  Port = Protocols.DefaultProtocol.DefaultPort, 
  UserName = "Administrator", 
  Password = "@server@", 
  VirtualHost = "/"
  ContinuationTimeout = new TimeSpan(10, 0, 0, 0) 
};

connection = factory.CreateConnection();

我在创建与此消息的连接时出错:
指定的端点均不可到达

I have an error on creating connection with this message:
None of the specified endpoints were reachable

当我在服务器的 localhost 实例上使用它时,它可以工作,但是当我创建从本地到该服务器的连接时,它返回了错误.它不适用于我本地计算机的本地 ip 和用户名和密码.

When I use it on localhost instance of the server it works, but when I create the connection from local to that server,it returned the error. It not work with local ip and username and password of the my local computer.


谁能帮帮我?


Can anyone help me?

推荐答案

谢谢大家.像这样:
https://stackoverflow.com/questions/4987438/rabbitmq-c-sharp-connection-trouble-when-using-a-username-and-password
安装 RabbitMQ 后,我在服务器和本地计算机上启用了管理工具:

Thank you all. As this :
https://stackoverflow.com/questions/4987438/rabbitmq-c-sharp-connection-trouble-when-using-a-username-and-password
After I installed RabbitMQ, I enabled management tools at the server and on my local computer with this:

rabbitmq-plugins enable rabbitmq_management

然后我从 services.msc 重新启动了 RabbitMQ 服务
我可以在 http://localhost:15672 看到 rabbitmq 管理
我使用 user:guest 和 pass:guest 登录到兔子管理
我添加了我最喜欢的具有管理员权限的用户通行证,所以它起作用了.

Then I restarted RabbitMQ service from services.msc
I could see the rabbitmq management at http://localhost:15672
I loginned to rabbit management with user:guest and pass:guest
I added my favorite user pass with administrator access, so it worked.

这篇关于RabbitMQ 连接错误没有一个指定的端点是可达的"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆