error and problem in Quickstart: Create a Java app on Azure App Service

Rogerio Tadeu de Oliveira Lacerda 0 Reputation points
2023-06-29T18:26:20.6866667+00:00

I am trying run this sample in web apps by portal azure.

link of quickstart:

https://learn.microsoft.com/en-us/azure/app-service/quickstart-java?tabs=javase&pivots=platform-linux-development-en

The deploy is successful, but the home returns that "Hey, Java developers! Your app service is up and running. Time to take the next step and deploy your code."
Any clue ?

I restart the service many times.

I redeploy many times.

But this sample just runs in Azure Spring Apps (but this servide is deployed in a longer URL (not practical) and without database.

Any clue to run this Quickstart in App Service, instead Azure Spring Apps ????

here is the log....

2023-06-29T18:11:12.974240613Z: [INFO] Sending SIGTERM to main process. Child Process ID: 165

2023-06-29T18:11:13.385155773Z: [INFO] Done processing signal SIGTERM. Exiting now!

/appsvctmp/volatile/logs/runtime/ec0eea74db7b09eb486fdce26ae08ca0bf46c7a4863d1fe879bc9239e5abea0e.log

2023-06-29T18:11:09.046248041Z: [INFO] Mangled result from Jar entry point parser is: COM_MICROSOFT_AZURE_APPSERVICE_JARENTRYPOINT_PREFIX__com.microsoft.azure.appservice.parkingpage.Main__COM_MICROSOFT_AZURE_APPSERVICE_JARENTRYPOINT_SUFFIX

2023-06-29T18:11:09.137180505Z: [INFO] Extracted jar entry point. Class name is: 'com.microsoft.azure.appservice.parkingpage.Main'

2023-06-29T18:11:09.177111516Z: [INFO] Defaulting to UTF-8

2023-06-29T18:11:09.195936657Z: [INFO] Running command: java -cp /usr/local/appservice/parkingpage.jar:/usr/local/appservice/lib/azure.appservice.jar: -Djava.util.logging.config.file=/usr/local/appservice/logging.properties -Dfile.encoding=UTF-8 -Dserver.port=80 -XX:ErrorFile=/home/LogFiles/java_error_spring11a_lw1sdlwk00001U_%p.log -XX:+CrashOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/LogFiles/java_memdump_spring11a_lw1sdlwk00001U.log -Duser.dir=/usr/local/appservice com.microsoft.azure.appservice.parkingpage.Main

2023-06-29T18:11:09.195963858Z: [INFO] Launched child process with pid: 165

2023-06-29T18:11:09.206310090Z: [INFO] Waiting for main process to exit. GLOBAL_PID_MAIN=165

2023-06-29T18:11:09.206681695Z: [INFO] Waiting for GLOBAL_PID_MAIN == 165

2023-06-29T18:11:09.238913607Z: [ERROR] Picked up JAVA_TOOL_OPTIONS: -Xmx1244M -Djava.net.preferIPv4Stack=true

2023-06-29T18:12:04.313684787Z: [INFO] Received signal SIGTERM

2023-06-29T18:12:04.314125193Z: [INFO] Sending SIGTERM to main process. Child Process ID: 165

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,933 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 22,706 Reputation points Moderator
    2023-06-30T09:00:52.21+00:00

    @Rogerio Tadeu de Oliveira Lacerda Thanks for reaching here! If I am understanding right you are when deploying java app from Azure portal the deploy was successful but returning homepage only-

    "Hey, Java developers! Your app service is up and running. Time to take the next step and deploy your code."

    could you try to add as below to the azure-webapp-maven- plugin configuration in your POM file.

    <appSettings>
        <property>
            <name>JAVA_OPTS</name>
            <value>-Dserver.port=80 -Dsite.root=/usr/local/appservice/parkingpage/ROOT</value>
        </property>
    </appSettings>
    

    Additionally,

    Suggest you to inspect the log files in a browser at https://<app-name>.scm.azurewebsites.net/api/logs/docker.

    Configure a Java app for Azure App Service

    what-are-the-expected-values-for-the-startup-file-section-when-i-configure-the-runtime-stack

    Logging and debugging apps

    Please let us know, how it goes.

    2 people found this answer helpful.
    0 comments No comments

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.