The listener for function 'MyFunction' was unable to start. #2911
Unanswered
mikeredick
asked this question in
Q&A
Replies: 1 comment
-
It is worth checking firewall rules and the connection string that is being used. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to use the Durable Task SQL Provider and I have it working fine locally, but once deployed to Azure the orchestration starts but it just stays in pending status. The logs show a Sql Exception with login failed when trying to start the listener. (I'll put the full exception below.)
The function is C# .NET 8 Isolated
Using Azure SQL database
I had to run the scripts to create the durable tasks manually.
The login has db_owner as well as dt_runtime roles
It is able to call dt.CreateInstance and insert to dt.NewEvents, dt.Instances and dt.Payloads
The exception I'm seeing in the logs is below, and I'm getting it for all Activities when I call the orchestrator:
2024-09-13T12:50:46.481 [Information] Starting task hub worker. Extension GUID 654685dd-c6dd-40f1-be4f-ef0a2998747b. InstanceId: . Function: . HubName: ICHub. AppName: m-PPC-7fap-ppc-ignitecollector. SlotName: Production. ExtensionVersion: 2.13.5. SequenceNumber: 4245.
2024-09-13T12:50:46.523 [Error] The listener for function 'Functions.Activity_CheckConnections' was unable to start.
Microsoft.Azure.WebJobs.Host.Listeners.FunctionListenerException : The listener for function 'Functions.Activity_CheckConnections' was unable to start. ---> Microsoft.Data.SqlClient.SqlException : Login failed for user ''.
at Microsoft.Data.ProviderBase.DbConnectionPool.CheckPoolBlockingPeriod(Exception e)
at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject,DbConnectionOptions userOptions,DbConnectionInternal oldConnection)
at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject,DbConnectionOptions userOptions,DbConnectionInternal oldConnection)
at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject,UInt32 waitForMultipleObjectsTimeout,Boolean allowCreate,Boolean onlyOneCheckConnection,DbConnectionOptions userOptions,DbConnectionInternal& connection)
at Microsoft.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DurableTask.SqlServer.SqlDbManager.EnsureDatabaseExistsAsync() at //src/DurableTask.SqlServer/SqlDbManager.cs : 183
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DurableTask.SqlServer.SqlDbManager.AcquireDatabaseLockAsync(Boolean createDatabaseIfNotExists) at //src/DurableTask.SqlServer/SqlDbManager.cs : 137
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DurableTask.SqlServer.SqlDbManager.CreateOrUpgradeSchemaAsync(Boolean recreateIfExists) at /_/src/DurableTask.SqlServer/SqlDbManager.cs : 33
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.Extensions.DurableTask.DurableTaskExtension.StartTaskHubWorkerIfNotStartedAsync() at D:\a_work\1\s\src\WebJobs.Extensions.DurableTask\DurableTaskExtension.cs : 1414
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.Host.Listeners.FunctionListener.StartAsync(??) at D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Listeners\FunctionListener.cs : 68
End of inner exception
My hosts.json is:
{ "version": "2.0", "functionTimeout": "-1", "logging": { "logLevel": { "Default": "Information", "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information", "Microsoft.EntityFrameworkCore.Database.Command": "Warning", "DurableTask.SqlServer": "Debug", "DurableTask.Core": "Debug" }, "applicationInsights": { "samplingSettings": { "isEnabled": true, "excludedTypes": "Request" }, "enableLiveMetricsFilters": true } }, "extensions": { "durableTask": { "hubName": "ICHub", "storageProvider": { "type": "mssql", "connectionStringName": "IgniteDBConnString", "taskEventLockTimeout": "00:02:00", "createDatabaseIfNotExists": true, "schemaName": "dt" } } } }
Beta Was this translation helpful? Give feedback.
All reactions