Hangfire 后台日志 The underlying provider failed on Open 错误 | Code Bye

Hangfire 后台日志 The underlying provider failed on Open 错误

.Net技术 码拜 2个月前 (03-28) 134次浏览 0个评论

EF6+SQL Server2017,发布到远程服务器后出现这个错误 The underlying provider failed on Open 网上看了一下是数据库原因,继续查看hangfire 的日志,明细如下:
DEBUG 2020-03-25 16:25:08,040 [er #1] Hangfire.Processing.BackgroundExecution – Execution RecurringJobScheduler is in the Faulted state now due to an exception, execution will be retried no more than in 00:00:01
System.Data.SqlClient.SqlException (0x80131904): 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: Named Pipes Provider, error: 40 – 无法打开到 SQL Server 的连接) —> System.ComponentModel.Win32Exception (0x80004005): 系统找不到指定的文件。
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
在 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
在 System.Data.SqlClient.SqlConnection.Open()
Hangfire.SqlServer.SqlServerStorage.CreateAndOpenConnection()
Hangfire.SqlServer.SqlServerConnection.AcquireLock(String resource, TimeSpan timeout)
Hangfire.SqlServer.SqlServerConnection.AcquireDistributedLock(String resource, TimeSpan timeout)
Hangfire.Server.RecurringJobScheduler.UseConnectionDistributedLock(JobStorage storage, Func`2 action)
Hangfire.Server.RecurringJobScheduler.EnqueueNextRecurringJobs(BackgroundProcessContext context)
Hangfire.Server.RecurringJobScheduler.Execute(BackgroundProcessContext context)
在 Hangfire.Server.BackgroundProcessDispatcherBuilder.ExecuteProcess(Guid executionId, Object state)
在 Hangfire.Processing.BackgroundExecution.Run(Action`2 callback, Object state)
问题没有重现,后来自己恢复了,也许是连接故障


CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明Hangfire 后台日志 The underlying provider failed on Open 错误
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!