Getting error when executing the project.
Kedar782 opened this issue · comments
I have downloaded the project and I want to install the sample-python code for the sql trigger .
When I execute the project using the func start --build I get errors. I installed the azure function extensions inside the vs code and getting error like no connection is specified. I can see that this project has the database and tables and we use that trigger inside the project for the trigger handling.
I get below errors:-
at Azure.Core.Pipeline.HttpClientTransport.ProcessAsync(HttpMessage message, Boolean async)
[2023-09-25T19:13:19.131Z] --- End of inner exception stack trace ---
[2023-09-25T19:13:19.135Z] Request [5a526b04-ca73-4598-ae51-af541d5a8ee2] exception Azure.RequestFailedException: No connection could be made because the target machine actively refused it. (127.0.0.1:10000)
[2023-09-25T19:13:19.137Z] at Azure.Core.Pipeline.HttpClientTransport.ProcessAsync(HttpMessage message, Boolean async)
[2023-09-25T19:13:19.139Z] ---> System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it. (127.0.0.1:10000)
[2023-09-25T19:13:19.141Z] at Azure.Core.Pipeline.HttpPipelineTransportPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory1 pipeline) [2023-09-25T19:13:19.145Z] at Azure.Core.Pipeline.ResponseBodyPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory
1 pipeline, Boolean async)
[2023-09-25T19:13:19.143Z] ---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it.
[2023-09-25T19:13:19.150Z] at Azure.Core.Pipeline.LoggingPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
[2023-09-25T19:13:19.152Z] at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
[2023-09-25T19:13:19.156Z] at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
[2023-09-25T19:13:19.158Z] at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
[2023-09-25T19:13:19.160Z] at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
[2023-09-25T19:13:19.162Z] --- End of inner exception stack trace ---
[2023-09-25T19:13:19.168Z] at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
[2023-09-25T19:13:19.169Z] An unhandled exception has occurred. Host is shutting down.
[2023-09-25T19:13:19.170Z] at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
[2023-09-25T19:13:19.172Z] Azure.Core: No connection could be made because the target machine actively refused it. (127.0.0.1:10001). System.Net.Http: No connection could be made because the target machine actively refused it. (127.0.0.1:10001). System.Net.Sockets: No connection could be made because the target machine actively refused it.
The listener for function 'Functions.TimerTriggerProducts' was unable to start.
[2023-09-25T19:13:31.254Z] The listener for function 'Functions.TimerTriggerProducts' was unable to start. Azure.Core: Retry failed after 6 tries. Retry settings can be adjusted in ClientOptions.Retry. (No connection could be made because the target machine actively refused it. (127.0.0.1:10000)) (No connection could be made because the target machine actively refused it. (127.0.0.1:10000)) (No connection could be made because the target machine actively refused it. (127.0.0.1:10000)) (No connection could be made because the target machine actively refused it. (127.0.0.1:10000)) (No connection could be made because the target machine actively refused it. (127.0.0.1:10000)) (No connection could be made because the target machine actively refused it. (127.0.0.1:10000)). Azure.Core: No connection could be made because the target machine actively refused it. (127.0.0.1:10000). System.Net.Http: No connection could be made because the target machine actively refused it. (127.0.0.1:10000). System.Net.Sockets: No connection could be made because the target machine actively refused it.
[2023-09-25T19:13:31.263Z] Host started (395363ms)
[2023-09-25T19:13:31.264Z] Job host started
[2023-09-25T19:13:31.280Z] The 'ProductsTrigger' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.ProductsTrigger'. Microsoft.Azure.WebJobs.Extensions.Sql: ConnectionStringSetting 'SqlConnectionString' is empty in your function app settings, please update the setting with a valid SQL connection string.
[2023-09-25T19:13:31.283Z] The 'ProductsTriggerLeasesTableName' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.ProductsTriggerLeasesTableName'. Microsoft.Azure.WebJobs.Extensions.Sql: ConnectionStringSetting 'SqlConnectionString' is empty in your function app settings, please update the setting with a valid SQL connection string.
Please guide me with this
Closing as duplicate of #930 - the samples are not meant to be ran directly at this time. See linked issue for suggestions on how to get started writing your own function and running that locally.