Azure function times out - No response

Umamaheswara R Avula 20 Reputation points
2024-09-24T19:23:41.3866667+00:00

Running Azure function as a springboot application in local environment. Build and deployment is successfull, however when i hit the endpoint via postman...not getting response. Seeing below and then it just times out

Details below -

using - Java 1.8

<azure.functions.maven.plugin.version>1.28.0</azure.functions.maven.plugin.version>

<groupId>com.microsoft.azure</groupId>

<artifactId>azure-functions-maven-plugin</artifactId>

<version>1.22.0</version>

<dependency>

<groupId>org.springframework.cloud</groupId>

<artifactId>spring-cloud-function-adapter-azure</artifactId>

<version>4.0.4</version>

</dependency>

<property>

<name>FUNCTIONS_EXTENSION_VERSION</name>

<value>~4</value>

</property>

Executing HTTP request: {

[2024-09-24T19:15:08.591Z] "requestId": "8008b58f-744f-4499-a7b3-74436627851f",

[2024-09-24T19:15:08.593Z] "method": "GET",

[2024-09-24T19:15:08.596Z] "userAgent": "PostmanRuntime/7.42.0",

[2024-09-24T19:15:08.599Z] "uri": "/api/<<endpoint>>"

[2024-09-24T19:15:08.602Z] }

[2024-09-24T19:15:08.860Z] Request successfully matched the route with name 'healthCheck' and template 'api/healthCheck'

[2024-09-24T19:15:08.997Z] Executing 'Functions.' (Reason='This function was programmatically called via the host APIs.', Id=149bd77e-42e6-4a0b-95e5-da60e853c9c1)

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,953 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Umamaheswara R Avula 20 Reputation points
    2024-09-24T23:49:10.08+00:00

    Hi @LeelaRajeshSayana-MSFT - Thanks for your response. The issue i am facing is in my local. It is a simple function...below is the code snippet

    @FunctionName("healthCheck")
    public HttpResponseMessage healthCheck(@HttpTrigger(name = "req", methods = {
           HttpMethod.GET }, authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional<String>> request,
           final ExecutionContext context) {
        System.out.println("The PAN Service is up and running");
    
    
    return request.createResponseBuilder(HttpStatus.OK).body("The PAN Service is up and running").build();
    
    
    
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.