Oracle connection Failure with Socket exception (ORA-12571)(existing connection was forcibly closed)

0

I am getting an issue in PROD while connecting to Oracle. It worked well till the last week and suddenly stopped working with below error. My app uses EF and ASP.NET MVC. Connection becomes success on the first attempt and oracle session is closed immediate after session went to INACTIVE. But I can see the INACTIVE session in oracle from other app servers hence DBA is saying everything is good from oracle server side. Below are my observations

  • Sessions are created from this server being killed immediately when it goes to INACTIVE state. Connection is success for the first query and its failing for the second query onward
  • TCP connections from our server is going to TIME_WAIT state and closing after some time.
  • I checked with N/w team and DBA on this to check why the sessions killed but they said no issue from their SIDE.
  • I also checked on the Firewall rules in server but didn't find anything here. And there is no External firewall in between the oracle server and app server.
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 error ORA-12571 encountered System.Net.Sockets.SocketException (0x80004005): 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 OracleInternal.Network.TcpTransportAdapter.Send(OraBuf OB) at OracleInternal.Network.TcpTransportAdapter.Send(OraBuf OB) at OracleInternal.Network.WriterStream.Write(OraBuf OB) at 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) at Oracle.ManagedDataAccess.Client.OracleException.HandleError(OracleTraceLevel level, OracleTraceTag tag, 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) at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehaviorbehavior) at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)

Please help. Thanks in Advance.

c#
asp.net
oracle
entity-framework
sockets
asked on Stack Overflow Mar 21, 2017 by Mohan

1 Answer

0

Issue resolved by changing the Server gateway. But not sure whats issue with the Current Gateway.

answered on Stack Overflow Mar 22, 2017 by Mohan

User contributions licensed under CC BY-SA 3.0