在Amazon Linux multidocker容器上的Docker中运行的DotnetCore应用程序在Sql Server登录过程中返回错误

时间:2017-04-19 22:34:12

标签: sql-server linux amazon-web-services .net-core

我在Amazon Linux实例中的Docker上运行了一个DotnetCore应用程序( DotNetCore v1.1 )(运行多容器Docker 1.12.6的 64位Amazon Linux 2016.09 v2.5.2) ))。

当我尝试连接到 Sql Server 2014(累积更新2)时,我收到异常

Exception:   System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 35 - An internal exception was caught) ---> System.IO.IOException: Unable to write data to the transport connection: Connection reset by peer. ---> System.Net.Sockets.SocketException: Connection reset by peer
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.Data.SqlClient.SNI.SslOverTdsStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security.SslStreamInternal.StartWriting(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStreamInternal.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.Data.SqlClient.SNI.SNITCPHandle.Send(SNIPacket packet)
--- End of inner exception stack trace ---

我尝试过的事情

  1. 可以从AWS Elastic Beanstalk app中运行的docker容器访问端口1433,并且可以建立与服务器的连接。
  2. 在Mac上运行时包含应用程序的Docker容器可以连接到同一个SQL Server。
  3. 有没有人遇到过这个问题?

0 个答案:

没有答案