RabbitMQ / MassTransit TLS即时握手超时

时间:2018-07-23 09:31:18

标签: .net ssl rabbitmq masstransit

我们遇到一个问题,即2个非常特定的服务器似乎无法与RabbitMQ实例建立TLS连接。客户端是通过MassTransit连接到Rabbit的.NET项目。我们确定问题与代码无关,因为在每台服务器上都部署和安装了完全相同的软件包。 与网络工程师交谈时,我们被告知所有涉及的服务器(工作中和不工作中)都是基于完全相同的映像创建的,并且这些服务器之间没有防火墙,因为它是所有内部应用程序服务器。 在正常运行的服务器上,应用程序连接正常,并且连接显示在RabbitMQ的“连接”选项卡中,对于无法正常工作的服务器,我们在程序中收到错误消息:

Service cannot be started. MassTransit.RabbitMqTransport.RabbitMqConnectionException: Connect failed: DfSTGRabbitMQ@dfstgapp01.************.co.uk:5671/stg ---> RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable ---> System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.Security._SslStream.StartWriting(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.ProcessWrite(Byte[] buffer, Int32 offset, Int32 cou...

查看RabbitMQ日志,这是我们在应用程序尝试连接到Rabbit时获得的所有信息:

2018-07-20 16:08:08.011 [info] <0.2236.0> accepting AMQP connection <0.2236.0> (10.1.123.102:60341 -> 10.1.123.102:5671)
2018-07-20 16:08:08.011 [warning] <0.2236.0> closing AMQP connection <0.2236.0> (10.1.123.102:60341 -> 10.1.123.102:5671):
{handshake_timeout,handshake}

我们非常困惑,因为服务器和程序相同,但是其中一台服务器连接正常,而另一台服务器似乎无法建立TLS连接。还有其他人遇到这个问题并且可以提供帮助吗?我们可能错过的任何设置还是需要查看的内容?

谢谢

0 个答案:

没有答案