Oracle连接失败并出现套接字异常(ORA-12571)(现有连接被强行关闭)

时间:2017-03-21 07:14:16

标签: c# asp.net oracle entity-framework sockets

我在连接Oracle时遇到PROD问题。直到上周它一直运行良好,突然停止工作,误差低于此值。我的应用程序使用EF和ASP.NET MVC。第一次尝试时连接成功,会话进入INACTIVE后立即关闭oracle会话。但是我可以从其他应用服务器看到oracle中的INACTIVE会话,因此DBA说从oracle服务器端一切都很好。以下是我的观察

  • 会话从此服务器创建,当它进入INACTIVE状态时立即被终止。第一个查询的连接成功,第二个查询的连接失败
  • 来自我们服务器的TCP连接将进入TIME_WAIT状态并在一段时间后关闭。
  • 我与N / W团队和DBA一起检查了这个问题,以确定会议被杀的原因,但是他们说他们的SIDE没有问题。
  • 我还检查了服务器中的防火墙规则,但在这里找不到任何内容。并且oracle服务器和应用服务器之间没有外部防火墙。
An error occurred while executing the command definition. See the inner exception for details.
Connection Failed:Oracle.ManagedDataAccess.Client.OracleException (0x80004005): Oracle error ORA-12571 encountered
     

OracleInternal.Network.NetworkException(0x80004005):Oracle错误ORA-12571遇到System.Net.Sockets.SocketException   (0x80004005):远程强制关闭现有连接   主办          在System.Net.Sockets.Socket.Send(Byte []缓冲区,Int32偏移量,Int32大小,SocketFlags socketFlags)          在OracleInternal.Network.TcpTransportAdapter.Send(OraBuf OB)          在OracleInternal.Network.TcpTransportAdapter.Send(OraBuf OB)          在OracleInternal.Network.WriterStream.Write(OraBuf OB)          在OracleInternal.TTC.OraBufWriter.FlushData()          at OracleInternal.TTC.TTCExecuteSql.WriteOall8Message(Byte [] sqlStmtByteStream,Int32 cursorId,Int64 dbChangeRegistrationId,Int64   executeOptions,ColumnDescribeInfo [] colDefinesInfoArray,Int32   longFetchSize,Int32 arrayBindCount,Int32 numDefineCols,Int64   noOfRowsToFetch,SqlStatementType stmtType,   MarshalBindParameterValueHelper&安培; marshalBindParamsHelper,Int32   的startIndex)          在Oracle.ManagedDataAccess.Client.OracleException.HandleError(OracleTraceLevel   级别,OracleTraceTag标记,Exceptionex)          at OracleInternal.TTC.TTCExecuteSql.WriteOall8Message(Byte [] sqlStmtByteStream,Int32 cursorId,Int64 dbChangeRegistrationId,Int64   executeOptions,ColumnDescribeInfo [] colDefinesInfoArray,Int32   longFetchSize,Int32 arrayBindCount,Int32 numDefineCols,Int64   noOfRowsToFetch,SqlStatementType stmtType,   MarshalBindParameterValueHelper&安培; marshalBindParamsHelper,Int32   的startIndex)          at OracleInternal.TTC.TTCExecuteSql.SendExecuteRequest(OracleConnectionImpl   commImpl,Byte [] sqlStmtByteStream,Boolean bHasReturningClause,Int32   cursorId,Int64 dbChangeRegistrationId,ColumnDescribeInfo []   columnDefines,Int64 noOfRowsToFetch,Boolean parse,Boolean execute,   Boolean fetch,Boolean define,Boolean bAutoCommit,Boolean   bDisableCompressedFetch,SqlStatementType stmtType,Int32   longFetchSize,Int32 noOfIters,Int64 [] scnForSnapshot,   MarshalBindParameterValueHelper&安培; marshalBindParamsHelper,Int32   的startIndex)          at OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteReader(String   commandText,OracleParameterCollection paramColl,CommandType   commandType,OracleConnectionImpl connectionImpl,   OracleDataReaderImpl和放大器; rdrImpl,Int32 longFetchSize,Int64   clientInitialLOBFS,OracleDependencyImpl orclDependencyImpl,Int64 []   scnForExecution,Int64 []& scnFromExecution,OracleParameterCollection&   bindByPositionParamColl,Boolean& bBindParamPresent,Int64&   internalInitialLOBFS,OracleException& exceptionForArrayBindDML,   Boolean isDescribeOnly,Boolean isFromEF)          在Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteReader(布尔值   requery,Boolean fillRequest,CommandBehaviorbehavior)          在Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteDbDataReader(CommandBehavior)   行为)          在System.Data.Common.DbCommand.ExecuteReader(CommandBehavior行为)          在System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand)   entityCommand,CommandBehavior行为)

请帮忙。在此先感谢。

1 个答案:

答案 0 :(得分:0)

通过更改服务器网关解决了问题。但不确定当前网关的问题是什么。