首页 > 解决方案 > SSL 端口 5671 上的 RabbitMQ 无法访问,但可在 telnet 上访问

问题描述

我正在尝试使用 SSL(为本地主机创建开发 ssl)连接到远程机器上的 RabbitMQ。我正在使用 EasyNetQ,并且我遵循了有关注册证书配置的所有程序(https://liquidwarelabs.zendesk.com/hc/en-us/articles/360019562832-Disable-cleartext-authentication-option-in-RabbitMQ) . 这个想法是“修复” AMPQ 明文身份验证问题(由某些安全工具报告)。我还在两台机器上安装了受信任的 .pfx 证书。

在此过程结束时,RabbitMQ 被传输到 TLS 协议(甚至是管理插件),并且通过尝试 telnet,端口 5671 已打开并可在远程计算机上访问。但是,以下代码返回错误:没有指定的端点是可访问的(捕获的 DoNothingLogger 中的消息)

                    var connection = new ConnectionConfiguration();

                    connection.Port = 5671;
                    connection.UserName = "admin";
                    connection.Password = "****";
                    connection.Product = "localhost";
                    connection.VirtualHost = "StageDev";


                    var host1 = new HostConfiguration();
                    host1.Host = "skl-igor-naum1";
                    host1.Port = 5671;
                    host1.Ssl.Enabled = true;
                    host1.Ssl.ServerName = "localhost";
                    host1.Ssl.CertPath = "C:\\tmp\\ProfileUnity.pfx";                        
                    //host1.Ssl.CertPassphrase = "admin";
                    ////host1.Ssl.Version = System.Security.Authentication.SslProtocols.Tls12 | System.Security.Authentication.SslProtocols.Tls11;


                    connection.Hosts = new List<HostConfiguration> { host1 };

                    connection.Validate();




                    MessageBusConnection = RabbitHutch.CreateBus(connection, services => services.Register<IEasyNetQLogger>(logger => new DoNothingLogger()));

有没有人有类似的问题或知道解决方案?

标签: c#sslrabbitmq

解决方案


推荐阅读