我正在尝试使用SSL(为localhost创建的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()));
有人遇到类似问题或知道解决方案吗?