Azure / azure-functions-java-worker

Java runtime and core types for Microsoft Azure Functions
MIT License
87 stars 54 forks source link

Spring boot azure function : This function was programmatically called via the host APIs #768

Open roshankrb opened 3 months ago

roshankrb commented 3 months ago

I have created spring boot azure function using the example given here. https://github.com/eggboy/springcloud-azurefunction/tree/springboot3

It worked fine on local, but when I deployed it to azure cloud. I get below error. Could someone help find what is causing this issue. Let me know if you require any additional details

2024-06-14T23:11:24Z [Information] Executing 'Functions.getUserFunction' (Reason='This function was programmatically called via the host APIs.', Id=d0c22346-387d-41af-9c0a-326429dd97f1) 2024-06-14T23:11:24Z [Verbose] Sending invocation id: 'd0c22346-387d-41af-9c0a-326429dd97f1 2024-06-14T23:11:24Z [Verbose] Posting invocation id:d0c22346-387d-41af-9c0a-326429dd97f1 on workerId:18a329dc-7f2e-4e0b-8487-c67d912b9eea 2024-06-14T23:11:24Z [Error] Executed 'Functions.getUserFunction' (Failed, Id=d0c22346-387d-41af-9c0a-326429dd97f1, Duration=11ms) 2024-06-14T23:11:37Z [Verbose] [HostMonitor] Checking worker statuses (Count=1) 2024-06-14T23:11:37Z [Verbose] [HostMonitor] Worker status: ID=18a329dc-7f2e-4e0b-8487-c67d912b9eea, Latency=4ms 2024-06-14T23:11:37Z [Verbose] [HostMonitor] Host process CPU stats (PID 68): History=(0,0,0,0,0), AvgCpuLoad=0, MaxCpuLoad=0 2024-06-14T23:11:37Z [Verbose] [HostMonitor] Host process CPU stats (PID 26): History=(2,4,3,2,3), AvgCpuLoad=3, MaxCpuLoad=4 2024-06-14T23:11:37Z [Verbose] [HostMonitor] Host aggregate CPU load 3 2024-06-14T23:11:37Z [Information] Executing StatusCodeResult, setting HTTP status code 200

roshankrb commented 3 months ago

, I found the above spring boot 3 azure function in the medium article here https://medium.com/microsoftazure/create-azure-function-with-spring-cloud-function-ab150216d2bd