c# - 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()));
有没有人有类似的问题或知道解决方案?
解决方案
推荐阅读
- if-statement - 使用日期和空白单元格的多个 IF 语句
- xml - 在“colspec”元素中创建@colwidth 属性和值
- python - Python 包 bar-chart-race 0.1.0:无法将分隔符千位更改为点
- c# - 如何更新我的游戏内计时器,使其仅在达到 60 秒(即 34 而不是 00:34)时才开始添加分钟计数器?
- php - 单元测试 Symfony 5 Mailer:MessageLoggerListener 不可用
- python - 使用 WSL 时,“pip3 list”未在终端上显示任何输出
- spring - 如何从属性文件中注入 Spring 中的字符串数组列表?
- react-leaflet - 无法从反应用户引用中获取 latlng
- .net - Visual Studio NugetPackageManager 界面中“版本”列的意义是什么?(与“已安装”列不同)
- java - GraalVM 应用程序可以部署在“常规”VM 上吗