RabbitMQ SocketException

发布于 2024-12-11 08:36:36 字数 446 浏览 3 评论 0原文

我已经在 Windows 服务器上安装了 RabbitMQ 服务,并尝试使用 c# 创建 sub/pub 演示,但每次如果我在安装 RabbitMQ 的服务器之外的另一台电脑上开发应用程序,我都会遇到此异常。

ConnectionFactory factory = new ConnectionFactory();
factory.HostName = "192.168.100.34";
factory.UserName = "username";
factory.Password = "password";

IConnection conn = factory.CreateConnection();

例外情况是:发送或接收数据的请求被禁止,因为套接字未连接并且(使用 sendto 调用在数据报套接字上发送时)未提供地址

我关闭了服务器上的防火墙在电脑上但没有运气。

I've installed the RabbitMQ Service on our Windows Server and tried to create a sub/pub demo with c# but I get this exception everytime if I develop the app on another pc other then server where RabbitMQ installed.

ConnectionFactory factory = new ConnectionFactory();
factory.HostName = "192.168.100.34";
factory.UserName = "username";
factory.Password = "password";

IConnection conn = factory.CreateConnection();

The exception is : A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied

I turned off the firewall on server an on pc but no luck.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

韶华倾负 2024-12-18 08:36:36

这是第一次例外,因为客户端可能需要重试几次才能成功打开。您只需 F5 过去即可。它之所以出现只是因为您在调试时在选项中打开了异常中断

This is a first-chance exception as the client may need to retry a few times before successfully opening . You can just F5 past it. It's only showing up because you had break on exception turn on in your options when debugging

梦里人 2024-12-18 08:36:36

尝试将 IP 地址替换为服务器的名称。我似乎记得 Kerberos 以不同的方式处理主机名。

这听起来不像是 Erlang cookie 问题,这是让我头疼的第一件事。

您是否尝试过 ping 服务器?

RabbitMQ in Action 书中提供了几页故障排除建议,目前提供早期访问版本。我建议买这个;它包含许多有用的提示。不过,浏览故障排除部分后,我没有看到任何直接适用于您的问题的内容。

Try replacing the IP address with the name of the server. I seem to remember something about Kerberos handling host names differently.

This doesn't sound like an Erlang cookie issue, which is the first thing that bit me.

Have you tried pinging the server?

There are pages of troubleshooting advice in the book RabbitMQ in Action, currently available as an early-access edition. I'd recommend getting this; it contains many useful tips. Skimming through the troubleshooting section I didn't see anything directly applicable to your issue, though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文