logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alessio Sanguineti (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LOG4NET-442) ReconnectOnError
Date Wed, 01 Oct 2014 08:45:34 GMT

     [ https://issues.apache.org/jira/browse/LOG4NET-442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alessio Sanguineti updated LOG4NET-442:
---------------------------------------
    Description: 
Hello, in our .NET application using Log4Net to log on a Sql Server 2014 database, we have set the parameter "ReconnectOnError" to true in the LogConfig.xml. As a test, we have stopped sql server and then re-started it, but  the logger did not reconnect. We get the following log file:

log4net: log4net assembly [log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=1b44e1d426115821]. Loaded from [C:\Projects\SIdG\TranslationEngine\bin\Debug\log4net.dll]. (.NET Runtime [4.0.30319.18444] on Microsoft Windows NT 6.1.7601 Service Pack 1)
log4net: defaultRepositoryType [log4net.Repository.Hierarchy.Hierarchy]
log4net: Creating repository for assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]
log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] Loaded From [C:\Projects\SIdG\TranslationEngine\bin\Debug\TranslationEngine.exe]
log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] does not have a RepositoryAttribute specified.
log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] using repository [log4net-default-repository] and repository type [log4net.Repository.Hierarchy.Hierarchy]
log4net: Creating repository [log4net-default-repository] using type [log4net.Repository.Hierarchy.Hierarchy]
log4net: configuring repository [log4net-default-repository] using file [C:\Projects\SIdG\TranslationEngine\bin\Debug\/LogConfig.xml] watching for file updates
log4net: configuring repository [log4net-default-repository] using file [C:\Projects\SIdG\TranslationEngine\bin\Debug\/LogConfig.xml]
log4net: configuring repository [log4net-default-repository] using stream
log4net: loading XML configuration
log4net: Configuring Repository [log4net-default-repository]
log4net: Configuration update mode [Merge].
log4net: Logger [root] Level string is [DEBUG].
log4net: Logger [root] level set to [name="DEBUG",value=30000].
log4net: Loading Appender [AdoNetAppender] type: [log4net.Appender.AdoNetAppender]
log4net: Setting Property [BufferSize] to Int32 value [1]
log4net: Setting Property [ReconnectOnError] to Boolean value [True]
log4net: Setting Property [ConnectionType] to String value [System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]
log4net: Setting Property [ConnectionString] to String value [data source=HYLSRVSIDG;initial catalog=SIDG_Log_AS;integrated security=false;persist security info=True;User ID=sa;Password=***;connection timeout=10; ConnectRetryCount=50; ConnectRetryInterval =30]
log4net: Setting Property [CommandText] to String value [INSERT INTO dbo.Log ([Message],[Level],[Thread],[Logger],[Exception],[Timestamp],[Operation_Instance],[Operation_ID]) VALUES (@message,@log_level, @thread,  @logger,  @exception,@log_date, @opinst, @opid)]
log4net: Setting Property [ParameterName] to String value [@log_date]
log4net: Setting Property [DbType] to DbType value [DateTime]
log4net: Setting Property [Layout] to object [log4net.Layout.RawTimeStampLayout]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@thread]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [255]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [ConversionPattern] to String value [%thread]
log4net: Converter [thread] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@log_level]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [50]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [ConversionPattern] to String value [%level]
log4net: Converter [level] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@logger]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [255]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [ConversionPattern] to String value [%logger]
log4net: Converter [logger] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@message]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [4000]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [ConversionPattern] to String value [%message]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@exception]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [4000]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@opinst]
log4net: Setting Property [DbType] to DbType value [Int32]
log4net: Setting Property [Key] to String value [OperationInstance]
log4net: Setting Property [Layout] to object [log4net.Layout.RawPropertyLayout]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@opid]
log4net: Setting Property [DbType] to DbType value [Int32]
log4net: Setting Property [Key] to String value [OperationID]
log4net: Setting Property [Layout] to object [log4net.Layout.RawPropertyLayout]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Created Appender [AdoNetAppender]
log4net: Adding appender named [AdoNetAppender] to logger [root].
log4net: Hierarchy Threshold []
log4net: Shutdown called on Hierarchy [log4net-default-repository]
log4net: log4net assembly [log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=1b44e1d426115821]. Loaded from [C:\Projects\SIdG\TranslationEngine\bin\Debug\log4net.dll]. (.NET Runtime [4.0.30319.18444] on Microsoft Windows NT 6.1.7601 Service Pack 1)
log4net: defaultRepositoryType [log4net.Repository.Hierarchy.Hierarchy]
log4net: Creating repository for assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]
log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] Loaded From [C:\Projects\SIdG\TranslationEngine\bin\Debug\TranslationEngine.exe]
log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] does not have a RepositoryAttribute specified.
log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] using repository [log4net-default-repository] and repository type [log4net.Repository.Hierarchy.Hierarchy]
log4net: Creating repository [log4net-default-repository] using type [log4net.Repository.Hierarchy.Hierarchy]
log4net: configuring repository [log4net-default-repository] using file [C:\Projects\SIdG\TranslationEngine\bin\Debug\/LogConfig.xml] watching for file updates
log4net: configuring repository [log4net-default-repository] using file [C:\Projects\SIdG\TranslationEngine\bin\Debug\/LogConfig.xml]
log4net: configuring repository [log4net-default-repository] using stream
log4net: loading XML configuration
log4net: Configuring Repository [log4net-default-repository]
log4net: Configuration update mode [Merge].
log4net: Logger [root] Level string is [DEBUG].
log4net: Logger [root] level set to [name="DEBUG",value=30000].
log4net: Loading Appender [AdoNetAppender] type: [log4net.Appender.AdoNetAppender]
log4net: Setting Property [BufferSize] to Int32 value [1]
log4net: Setting Property [ReconnectOnError] to Boolean value [True]
log4net: Setting Property [ConnectionType] to String value [System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]
log4net: Setting Property [ConnectionString] to String value [data source=HYLSRVSIDG;initial catalog=SIDG_Log_AS;integrated security=false;persist security info=True;User ID=sa;Password=***;connection timeout=10]
log4net: Setting Property [CommandText] to String value [INSERT INTO dbo.Log ([Message],[Level],[Thread],[Logger],[Exception],[Timestamp],[Operation_Instance],[Operation_ID]) VALUES (@message,@log_level, @thread,  @logger,  @exception,@log_date, @opinst, @opid)]
log4net: Setting Property [ParameterName] to String value [@log_date]
log4net: Setting Property [DbType] to DbType value [DateTime]
log4net: Setting Property [Layout] to object [log4net.Layout.RawTimeStampLayout]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@thread]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [255]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [ConversionPattern] to String value [%thread]
log4net: Converter [thread] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@log_level]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [50]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [ConversionPattern] to String value [%level]
log4net: Converter [level] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@logger]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [255]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [ConversionPattern] to String value [%logger]
log4net: Converter [logger] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@message]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [4000]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [ConversionPattern] to String value [%message]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@exception]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [4000]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@opinst]
log4net: Setting Property [DbType] to DbType value [Int32]
log4net: Setting Property [Key] to String value [OperationInstance]
log4net: Setting Property [Layout] to object [log4net.Layout.RawPropertyLayout]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@opid]
log4net: Setting Property [DbType] to DbType value [Int32]
log4net: Setting Property [Key] to String value [OperationID]
log4net: Setting Property [Layout] to object [log4net.Layout.RawPropertyLayout]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Created Appender [AdoNetAppender]
log4net: Adding appender named [AdoNetAppender] to logger [root].
log4net: Hierarchy Threshold []
log4net:ERROR [AdoNetAppender] ErrorCode: GenericFailure. Exception while writing to database
System.Data.SqlClient.SqlException (0x80131904): The connection is broken and recovery is not possible.  The client driver attempted to recover the connection one or more times and all attempts failed.  Increase the value of ConnectRetryCount to increase the number of recovery attempts. ---> System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception (0x80004005): Access is denied
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)
   at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
   at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
   at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.ReplaceConnection(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlInternalConnectionTds.TryReplaceConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.OpenAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Data.SqlClient.SqlConnection.<ReconnectAsync>d__0.MoveNext()
ClientConnectionId:00000000-0000-0000-0000-000000000000
   at System.Data.SqlClient.SqlConnection.<ReconnectAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Data.SqlClient.AsyncHelper.WaitForCompletion(Task task, Int32 timeout, Action onTimeout, Boolean rethrowExceptions)
   at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransactionYukon(TransactionRequest transactionRequest, String transactionName, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
   at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransaction(TransactionRequest transactionRequest, String name, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
   at System.Data.SqlClient.SqlInternalConnection.BeginSqlTransaction(IsolationLevel iso, String transactionName, Boolean shouldReconnect)
   at System.Data.SqlClient.SqlConnection.BeginTransaction(IsolationLevel iso, String transactionName)
   at System.Data.SqlClient.SqlConnection.BeginDbTransaction(IsolationLevel isolationLevel)
   at System.Data.Common.DbConnection.System.Data.IDbConnection.BeginTransaction()
   at log4net.Appender.AdoNetAppender.SendBuffer(LoggingEvent[] events)
ClientConnectionId:e902ccea-9b4d-4119-a119-8ef480e8dc64

Thank you.
Regards





  was:
Hello, in our .NET application using Log4Net to log on a Sql Server 2014 database, we have set the parameter "ReconnectOnError" to true in the LogConfig.xml. As a test, we have stopped sql server and then re-started it, but  the logger does not reconnect. We get the following log file:

log4net: log4net assembly [log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=1b44e1d426115821]. Loaded from [C:\Projects\SIdG\TranslationEngine\bin\Debug\log4net.dll]. (.NET Runtime [4.0.30319.18444] on Microsoft Windows NT 6.1.7601 Service Pack 1)
log4net: defaultRepositoryType [log4net.Repository.Hierarchy.Hierarchy]
log4net: Creating repository for assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]
log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] Loaded From [C:\Projects\SIdG\TranslationEngine\bin\Debug\TranslationEngine.exe]
log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] does not have a RepositoryAttribute specified.
log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] using repository [log4net-default-repository] and repository type [log4net.Repository.Hierarchy.Hierarchy]
log4net: Creating repository [log4net-default-repository] using type [log4net.Repository.Hierarchy.Hierarchy]
log4net: configuring repository [log4net-default-repository] using file [C:\Projects\SIdG\TranslationEngine\bin\Debug\/LogConfig.xml] watching for file updates
log4net: configuring repository [log4net-default-repository] using file [C:\Projects\SIdG\TranslationEngine\bin\Debug\/LogConfig.xml]
log4net: configuring repository [log4net-default-repository] using stream
log4net: loading XML configuration
log4net: Configuring Repository [log4net-default-repository]
log4net: Configuration update mode [Merge].
log4net: Logger [root] Level string is [DEBUG].
log4net: Logger [root] level set to [name="DEBUG",value=30000].
log4net: Loading Appender [AdoNetAppender] type: [log4net.Appender.AdoNetAppender]
log4net: Setting Property [BufferSize] to Int32 value [1]
log4net: Setting Property [ReconnectOnError] to Boolean value [True]
log4net: Setting Property [ConnectionType] to String value [System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]
log4net: Setting Property [ConnectionString] to String value [data source=HYLSRVSIDG;initial catalog=SIDG_Log_AS;integrated security=false;persist security info=True;User ID=sa;Password=***;connection timeout=10; ConnectRetryCount=50; ConnectRetryInterval =30]
log4net: Setting Property [CommandText] to String value [INSERT INTO dbo.Log ([Message],[Level],[Thread],[Logger],[Exception],[Timestamp],[Operation_Instance],[Operation_ID]) VALUES (@message,@log_level, @thread,  @logger,  @exception,@log_date, @opinst, @opid)]
log4net: Setting Property [ParameterName] to String value [@log_date]
log4net: Setting Property [DbType] to DbType value [DateTime]
log4net: Setting Property [Layout] to object [log4net.Layout.RawTimeStampLayout]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@thread]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [255]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [ConversionPattern] to String value [%thread]
log4net: Converter [thread] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@log_level]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [50]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [ConversionPattern] to String value [%level]
log4net: Converter [level] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@logger]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [255]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [ConversionPattern] to String value [%logger]
log4net: Converter [logger] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@message]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [4000]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [ConversionPattern] to String value [%message]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@exception]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [4000]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@opinst]
log4net: Setting Property [DbType] to DbType value [Int32]
log4net: Setting Property [Key] to String value [OperationInstance]
log4net: Setting Property [Layout] to object [log4net.Layout.RawPropertyLayout]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@opid]
log4net: Setting Property [DbType] to DbType value [Int32]
log4net: Setting Property [Key] to String value [OperationID]
log4net: Setting Property [Layout] to object [log4net.Layout.RawPropertyLayout]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Created Appender [AdoNetAppender]
log4net: Adding appender named [AdoNetAppender] to logger [root].
log4net: Hierarchy Threshold []
log4net: Shutdown called on Hierarchy [log4net-default-repository]
log4net: log4net assembly [log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=1b44e1d426115821]. Loaded from [C:\Projects\SIdG\TranslationEngine\bin\Debug\log4net.dll]. (.NET Runtime [4.0.30319.18444] on Microsoft Windows NT 6.1.7601 Service Pack 1)
log4net: defaultRepositoryType [log4net.Repository.Hierarchy.Hierarchy]
log4net: Creating repository for assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]
log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] Loaded From [C:\Projects\SIdG\TranslationEngine\bin\Debug\TranslationEngine.exe]
log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] does not have a RepositoryAttribute specified.
log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] using repository [log4net-default-repository] and repository type [log4net.Repository.Hierarchy.Hierarchy]
log4net: Creating repository [log4net-default-repository] using type [log4net.Repository.Hierarchy.Hierarchy]
log4net: configuring repository [log4net-default-repository] using file [C:\Projects\SIdG\TranslationEngine\bin\Debug\/LogConfig.xml] watching for file updates
log4net: configuring repository [log4net-default-repository] using file [C:\Projects\SIdG\TranslationEngine\bin\Debug\/LogConfig.xml]
log4net: configuring repository [log4net-default-repository] using stream
log4net: loading XML configuration
log4net: Configuring Repository [log4net-default-repository]
log4net: Configuration update mode [Merge].
log4net: Logger [root] Level string is [DEBUG].
log4net: Logger [root] level set to [name="DEBUG",value=30000].
log4net: Loading Appender [AdoNetAppender] type: [log4net.Appender.AdoNetAppender]
log4net: Setting Property [BufferSize] to Int32 value [1]
log4net: Setting Property [ReconnectOnError] to Boolean value [True]
log4net: Setting Property [ConnectionType] to String value [System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]
log4net: Setting Property [ConnectionString] to String value [data source=HYLSRVSIDG;initial catalog=SIDG_Log_AS;integrated security=false;persist security info=True;User ID=sa;Password=***;connection timeout=10]
log4net: Setting Property [CommandText] to String value [INSERT INTO dbo.Log ([Message],[Level],[Thread],[Logger],[Exception],[Timestamp],[Operation_Instance],[Operation_ID]) VALUES (@message,@log_level, @thread,  @logger,  @exception,@log_date, @opinst, @opid)]
log4net: Setting Property [ParameterName] to String value [@log_date]
log4net: Setting Property [DbType] to DbType value [DateTime]
log4net: Setting Property [Layout] to object [log4net.Layout.RawTimeStampLayout]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@thread]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [255]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [ConversionPattern] to String value [%thread]
log4net: Converter [thread] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@log_level]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [50]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [ConversionPattern] to String value [%level]
log4net: Converter [level] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@logger]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [255]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [ConversionPattern] to String value [%logger]
log4net: Converter [logger] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@message]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [4000]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [ConversionPattern] to String value [%message]
log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@exception]
log4net: Setting Property [DbType] to DbType value [String]
log4net: Setting Property [Size] to Int32 value [4000]
log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@opinst]
log4net: Setting Property [DbType] to DbType value [Int32]
log4net: Setting Property [Key] to String value [OperationInstance]
log4net: Setting Property [Layout] to object [log4net.Layout.RawPropertyLayout]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Setting Property [ParameterName] to String value [@opid]
log4net: Setting Property [DbType] to DbType value [Int32]
log4net: Setting Property [Key] to String value [OperationID]
log4net: Setting Property [Layout] to object [log4net.Layout.RawPropertyLayout]
log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: Created Appender [AdoNetAppender]
log4net: Adding appender named [AdoNetAppender] to logger [root].
log4net: Hierarchy Threshold []
log4net:ERROR [AdoNetAppender] ErrorCode: GenericFailure. Exception while writing to database
System.Data.SqlClient.SqlException (0x80131904): The connection is broken and recovery is not possible.  The client driver attempted to recover the connection one or more times and all attempts failed.  Increase the value of ConnectRetryCount to increase the number of recovery attempts. ---> System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception (0x80004005): Access is denied
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)
   at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
   at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
   at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.ReplaceConnection(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlInternalConnectionTds.TryReplaceConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.OpenAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Data.SqlClient.SqlConnection.<ReconnectAsync>d__0.MoveNext()
ClientConnectionId:00000000-0000-0000-0000-000000000000
   at System.Data.SqlClient.SqlConnection.<ReconnectAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Data.SqlClient.AsyncHelper.WaitForCompletion(Task task, Int32 timeout, Action onTimeout, Boolean rethrowExceptions)
   at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransactionYukon(TransactionRequest transactionRequest, String transactionName, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
   at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransaction(TransactionRequest transactionRequest, String name, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
   at System.Data.SqlClient.SqlInternalConnection.BeginSqlTransaction(IsolationLevel iso, String transactionName, Boolean shouldReconnect)
   at System.Data.SqlClient.SqlConnection.BeginTransaction(IsolationLevel iso, String transactionName)
   at System.Data.SqlClient.SqlConnection.BeginDbTransaction(IsolationLevel isolationLevel)
   at System.Data.Common.DbConnection.System.Data.IDbConnection.BeginTransaction()
   at log4net.Appender.AdoNetAppender.SendBuffer(LoggingEvent[] events)
ClientConnectionId:e902ccea-9b4d-4119-a119-8ef480e8dc64

Thank you.
Regards






> ReconnectOnError 
> -----------------
>
>                 Key: LOG4NET-442
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-442
>             Project: Log4net
>          Issue Type: Bug
>          Components: Builds
>    Affects Versions: 1.2.13
>         Environment: Microsoft .NET 4.5
>            Reporter: Alessio Sanguineti
>
> Hello, in our .NET application using Log4Net to log on a Sql Server 2014 database, we have set the parameter "ReconnectOnError" to true in the LogConfig.xml. As a test, we have stopped sql server and then re-started it, but  the logger did not reconnect. We get the following log file:
> log4net: log4net assembly [log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=1b44e1d426115821]. Loaded from [C:\Projects\SIdG\TranslationEngine\bin\Debug\log4net.dll]. (.NET Runtime [4.0.30319.18444] on Microsoft Windows NT 6.1.7601 Service Pack 1)
> log4net: defaultRepositoryType [log4net.Repository.Hierarchy.Hierarchy]
> log4net: Creating repository for assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]
> log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] Loaded From [C:\Projects\SIdG\TranslationEngine\bin\Debug\TranslationEngine.exe]
> log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] does not have a RepositoryAttribute specified.
> log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] using repository [log4net-default-repository] and repository type [log4net.Repository.Hierarchy.Hierarchy]
> log4net: Creating repository [log4net-default-repository] using type [log4net.Repository.Hierarchy.Hierarchy]
> log4net: configuring repository [log4net-default-repository] using file [C:\Projects\SIdG\TranslationEngine\bin\Debug\/LogConfig.xml] watching for file updates
> log4net: configuring repository [log4net-default-repository] using file [C:\Projects\SIdG\TranslationEngine\bin\Debug\/LogConfig.xml]
> log4net: configuring repository [log4net-default-repository] using stream
> log4net: loading XML configuration
> log4net: Configuring Repository [log4net-default-repository]
> log4net: Configuration update mode [Merge].
> log4net: Logger [root] Level string is [DEBUG].
> log4net: Logger [root] level set to [name="DEBUG",value=30000].
> log4net: Loading Appender [AdoNetAppender] type: [log4net.Appender.AdoNetAppender]
> log4net: Setting Property [BufferSize] to Int32 value [1]
> log4net: Setting Property [ReconnectOnError] to Boolean value [True]
> log4net: Setting Property [ConnectionType] to String value [System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]
> log4net: Setting Property [ConnectionString] to String value [data source=HYLSRVSIDG;initial catalog=SIDG_Log_AS;integrated security=false;persist security info=True;User ID=sa;Password=***;connection timeout=10; ConnectRetryCount=50; ConnectRetryInterval =30]
> log4net: Setting Property [CommandText] to String value [INSERT INTO dbo.Log ([Message],[Level],[Thread],[Logger],[Exception],[Timestamp],[Operation_Instance],[Operation_ID]) VALUES (@message,@log_level, @thread,  @logger,  @exception,@log_date, @opinst, @opid)]
> log4net: Setting Property [ParameterName] to String value [@log_date]
> log4net: Setting Property [DbType] to DbType value [DateTime]
> log4net: Setting Property [Layout] to object [log4net.Layout.RawTimeStampLayout]
> log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
> log4net: Setting Property [ParameterName] to String value [@thread]
> log4net: Setting Property [DbType] to DbType value [String]
> log4net: Setting Property [Size] to Int32 value [255]
> log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Setting Property [ConversionPattern] to String value [%thread]
> log4net: Converter [thread] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
> log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
> log4net: Setting Property [ParameterName] to String value [@log_level]
> log4net: Setting Property [DbType] to DbType value [String]
> log4net: Setting Property [Size] to Int32 value [50]
> log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Setting Property [ConversionPattern] to String value [%level]
> log4net: Converter [level] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
> log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
> log4net: Setting Property [ParameterName] to String value [@logger]
> log4net: Setting Property [DbType] to DbType value [String]
> log4net: Setting Property [Size] to Int32 value [255]
> log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Setting Property [ConversionPattern] to String value [%logger]
> log4net: Converter [logger] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
> log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
> log4net: Setting Property [ParameterName] to String value [@message]
> log4net: Setting Property [DbType] to DbType value [String]
> log4net: Setting Property [Size] to Int32 value [4000]
> log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Setting Property [ConversionPattern] to String value [%message]
> log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
> log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
> log4net: Setting Property [ParameterName] to String value [@exception]
> log4net: Setting Property [DbType] to DbType value [String]
> log4net: Setting Property [Size] to Int32 value [4000]
> log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
> log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
> log4net: Setting Property [ParameterName] to String value [@opinst]
> log4net: Setting Property [DbType] to DbType value [Int32]
> log4net: Setting Property [Key] to String value [OperationInstance]
> log4net: Setting Property [Layout] to object [log4net.Layout.RawPropertyLayout]
> log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
> log4net: Setting Property [ParameterName] to String value [@opid]
> log4net: Setting Property [DbType] to DbType value [Int32]
> log4net: Setting Property [Key] to String value [OperationID]
> log4net: Setting Property [Layout] to object [log4net.Layout.RawPropertyLayout]
> log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
> log4net: Created Appender [AdoNetAppender]
> log4net: Adding appender named [AdoNetAppender] to logger [root].
> log4net: Hierarchy Threshold []
> log4net: Shutdown called on Hierarchy [log4net-default-repository]
> log4net: log4net assembly [log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=1b44e1d426115821]. Loaded from [C:\Projects\SIdG\TranslationEngine\bin\Debug\log4net.dll]. (.NET Runtime [4.0.30319.18444] on Microsoft Windows NT 6.1.7601 Service Pack 1)
> log4net: defaultRepositoryType [log4net.Repository.Hierarchy.Hierarchy]
> log4net: Creating repository for assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]
> log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] Loaded From [C:\Projects\SIdG\TranslationEngine\bin\Debug\TranslationEngine.exe]
> log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] does not have a RepositoryAttribute specified.
> log4net: Assembly [TranslationEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] using repository [log4net-default-repository] and repository type [log4net.Repository.Hierarchy.Hierarchy]
> log4net: Creating repository [log4net-default-repository] using type [log4net.Repository.Hierarchy.Hierarchy]
> log4net: configuring repository [log4net-default-repository] using file [C:\Projects\SIdG\TranslationEngine\bin\Debug\/LogConfig.xml] watching for file updates
> log4net: configuring repository [log4net-default-repository] using file [C:\Projects\SIdG\TranslationEngine\bin\Debug\/LogConfig.xml]
> log4net: configuring repository [log4net-default-repository] using stream
> log4net: loading XML configuration
> log4net: Configuring Repository [log4net-default-repository]
> log4net: Configuration update mode [Merge].
> log4net: Logger [root] Level string is [DEBUG].
> log4net: Logger [root] level set to [name="DEBUG",value=30000].
> log4net: Loading Appender [AdoNetAppender] type: [log4net.Appender.AdoNetAppender]
> log4net: Setting Property [BufferSize] to Int32 value [1]
> log4net: Setting Property [ReconnectOnError] to Boolean value [True]
> log4net: Setting Property [ConnectionType] to String value [System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]
> log4net: Setting Property [ConnectionString] to String value [data source=HYLSRVSIDG;initial catalog=SIDG_Log_AS;integrated security=false;persist security info=True;User ID=sa;Password=***;connection timeout=10]
> log4net: Setting Property [CommandText] to String value [INSERT INTO dbo.Log ([Message],[Level],[Thread],[Logger],[Exception],[Timestamp],[Operation_Instance],[Operation_ID]) VALUES (@message,@log_level, @thread,  @logger,  @exception,@log_date, @opinst, @opid)]
> log4net: Setting Property [ParameterName] to String value [@log_date]
> log4net: Setting Property [DbType] to DbType value [DateTime]
> log4net: Setting Property [Layout] to object [log4net.Layout.RawTimeStampLayout]
> log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
> log4net: Setting Property [ParameterName] to String value [@thread]
> log4net: Setting Property [DbType] to DbType value [String]
> log4net: Setting Property [Size] to Int32 value [255]
> log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Setting Property [ConversionPattern] to String value [%thread]
> log4net: Converter [thread] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
> log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
> log4net: Setting Property [ParameterName] to String value [@log_level]
> log4net: Setting Property [DbType] to DbType value [String]
> log4net: Setting Property [Size] to Int32 value [50]
> log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Setting Property [ConversionPattern] to String value [%level]
> log4net: Converter [level] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
> log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
> log4net: Setting Property [ParameterName] to String value [@logger]
> log4net: Setting Property [DbType] to DbType value [String]
> log4net: Setting Property [Size] to Int32 value [255]
> log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Setting Property [ConversionPattern] to String value [%logger]
> log4net: Converter [logger] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
> log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
> log4net: Setting Property [ParameterName] to String value [@message]
> log4net: Setting Property [DbType] to DbType value [String]
> log4net: Setting Property [Size] to Int32 value [4000]
> log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Setting Property [ConversionPattern] to String value [%message]
> log4net: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
> log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
> log4net: Setting Property [ParameterName] to String value [@exception]
> log4net: Setting Property [DbType] to DbType value [String]
> log4net: Setting Property [Size] to Int32 value [4000]
> log4net: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
> log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
> log4net: Setting Property [ParameterName] to String value [@opinst]
> log4net: Setting Property [DbType] to DbType value [Int32]
> log4net: Setting Property [Key] to String value [OperationInstance]
> log4net: Setting Property [Layout] to object [log4net.Layout.RawPropertyLayout]
> log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
> log4net: Setting Property [ParameterName] to String value [@opid]
> log4net: Setting Property [DbType] to DbType value [Int32]
> log4net: Setting Property [Key] to String value [OperationID]
> log4net: Setting Property [Layout] to object [log4net.Layout.RawPropertyLayout]
> log4net: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
> log4net: Created Appender [AdoNetAppender]
> log4net: Adding appender named [AdoNetAppender] to logger [root].
> log4net: Hierarchy Threshold []
> log4net:ERROR [AdoNetAppender] ErrorCode: GenericFailure. Exception while writing to database
> System.Data.SqlClient.SqlException (0x80131904): The connection is broken and recovery is not possible.  The client driver attempted to recover the connection one or more times and all attempts failed.  Increase the value of ConnectRetryCount to increase the number of recovery attempts. ---> System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception (0x80004005): Access is denied
>    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
>    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
>    at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)
>    at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
>    at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
>    at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
>    at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)
>    at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
>    at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
>    at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
>    at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
>    at System.Data.ProviderBase.DbConnectionPool.ReplaceConnection(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
>    at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
>    at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
>    at System.Data.SqlClient.SqlInternalConnectionTds.TryReplaceConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
>    at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
>    at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
>    at System.Data.SqlClient.SqlConnection.OpenAsync(CancellationToken cancellationToken)
> --- End of stack trace from previous location where exception was thrown ---
>    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
>    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
>    at System.Data.SqlClient.SqlConnection.<ReconnectAsync>d__0.MoveNext()
> ClientConnectionId:00000000-0000-0000-0000-000000000000
>    at System.Data.SqlClient.SqlConnection.<ReconnectAsync>d__0.MoveNext()
> --- End of stack trace from previous location where exception was thrown ---
>    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
>    at System.Data.SqlClient.AsyncHelper.WaitForCompletion(Task task, Int32 timeout, Action onTimeout, Boolean rethrowExceptions)
>    at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransactionYukon(TransactionRequest transactionRequest, String transactionName, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
>    at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransaction(TransactionRequest transactionRequest, String name, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
>    at System.Data.SqlClient.SqlInternalConnection.BeginSqlTransaction(IsolationLevel iso, String transactionName, Boolean shouldReconnect)
>    at System.Data.SqlClient.SqlConnection.BeginTransaction(IsolationLevel iso, String transactionName)
>    at System.Data.SqlClient.SqlConnection.BeginDbTransaction(IsolationLevel isolationLevel)
>    at System.Data.Common.DbConnection.System.Data.IDbConnection.BeginTransaction()
>    at log4net.Appender.AdoNetAppender.SendBuffer(LoggingEvent[] events)
> ClientConnectionId:e902ccea-9b4d-4119-a119-8ef480e8dc64
> Thank you.
> Regards



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message