Forum Discussion

Mohammad115's avatar
Mohammad115
Copper Contributor
May 31, 2023

Deployment of jar file on azure slot using azure toolkit through Intellij

Hello Everyone,

I am unable to deploy my spring boot jar file through azure toolkit from IntelliJ IDE. I have following scenario:

when I package my spring boot application, it generates two jar file let's say: abc.jar and abc-exe.jar

and when I started to deploy it; by default, the abc.jar file get deployed to one of the slot and then it failed to start the jar file. I am unable to solve this issue.

here is the azure cli:

Updating application settings...
Update application settings successfully.
Trying to deploy artifact to abc...
Deploying (C:\Users\username\Desktop\workspace\ABC\core\target\abc.jar)[jar]  ...
Successfully deployed the artifact to https://abc.azurewebsites.net
Deployment succeed but the app is still starting at server side.
URL: https://abc.azurewebsites.net

and here is logs:

 

Connecting...
2023-05-31T04:52:08  Welcome, you are now connected to log-streaming service.
Starting Log Tail -n 10 of existing logs ----
/home/LogFiles/__lastCheckTime.txt  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/__lastCheckTime.txt)
05/31/2023 04:49:57
/home/LogFiles/kudu/deployment/47187d278c1b-04b96c29-44f9-4795-b16c-927cd53da3cc.txt  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/kudu/deployment/47187d278c1b-04b96c29-44f9-4795-b16c-927cd53da3cc.txt)
2023-05-30T11:14:04  PreDeployment: context.OutputPath /home/site/wwwroot
2023-05-30T11:14:04  Running build. Project type: OneDeploy
2023-05-30T11:14:05  Copying the manifest
2023-05-30T11:14:05  Incrementally deploying to /home/site/wwwroot
2023-05-30T11:14:05  Build completed succesfully.
2023-05-30T11:14:05  Running post deployment command(s)...
2023-05-30T11:14:05  Requesting site restart
2023-05-30T11:14:05  Requesting site restart. Attempt #1
2023-05-30T11:14:05  Successfully requested a restart. Attempt #1
2023-05-30T11:14:06  Deployment successful. deployer = OneDeploy deploymentPath = OneDeploy
/home/LogFiles/kudu/deployment/47187d278c1b-1d16c045-1d7c-47cb-8f28-9efd41d78821.txt  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/kudu/deployment/47187d278c1b-1d16c045-1d7c-47cb-8f28-9efd41d78821.txt)
2023-05-30T11:24:40  PreDeployment: context.OutputPath /home/site/wwwroot
2023-05-30T11:24:40  Running build. Project type: OneDeploy
2023-05-30T11:24:40  Copying the manifest
2023-05-30T11:24:40  Incrementally deploying to /home/site/wwwroot
2023-05-30T11:24:40  Build completed succesfully.
2023-05-30T11:24:40  Running post deployment command(s)...
2023-05-30T11:24:41  Requesting site restart
2023-05-30T11:24:41  Requesting site restart. Attempt #1
2023-05-30T11:24:41  Successfully requested a restart. Attempt #1
2023-05-30T11:24:41  Deployment successful. deployer = OneDeploy deploymentPath = 
/home/LogFiles/kudu/trace/0e66782b35ac-0f49ffb0-ead9-4c0e-99ff-d6a7e7a8787c.txt  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/0e66782b35ac-0f49ffb0-ead9-4c0e-99ff-d6a7e7a8787c.txt)
2023-05-25T07:19:24  Startup Request, url: /webssh/socket.io/?EIO=4&transport=polling&t=OXHnj4j&sid=u1cCf5kwCP50wJhkAAAE, method: POST, type: request, pid: 92,1,14, ScmType: None
/home/LogFiles/kudu/trace/47187d278c1b-0d906990-ec8b-4c14-9b02-b8fc7069c32a.txt  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/47187d278c1b-0d906990-ec8b-4c14-9b02-b8fc7069c32a.txt)
2023-05-25T09:49:49  Startup Request, url: /webssh/socket.io/?EIO=4&transport=polling&t=OXIK8QQ&sid=fVJp05P_-zDttTsoAAAG, method: POST, type: request, pid: 86,1,5, ScmType: None
/home/LogFiles/kudu/trace/527d5e2fad22-df610f48-6e73-4b8e-b93f-847ec4b00a3f.txt  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/527d5e2fad22-df610f48-6e73-4b8e-b93f-847ec4b00a3f.txt)
2023-05-30T11:28:53  Startup Request, url: /webssh/socket.io/?EIO=4&transport=polling&t=OXiQlyX&sid=IlFGrg9mH-DlZifWAAAO, method: POST, type: request, pid: 92,1,7, ScmType: None
/home/LogFiles/kudu/trace/7414e7d8fb32-ec517c85-4f6f-4594-981f-158d127f817a.txt  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/7414e7d8fb32-ec517c85-4f6f-4594-981f-158d127f817a.txt)
2023-05-24T07:04:06  Startup Request, url: /api/deployments/?api-version=2018-11-01, method: GET, type: request, pid: 86,1,5, ScmType: None
/home/LogFiles/2023_05_24_ln1sdlwk0003HY_default_docker.log  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/2023_05_24_ln1sdlwk0003HY_default_docker.log)
2023-05-24T23:57:22.096903904Z Failed to query jar entry point. Falling back to legacy command-line
2023-05-24T23:57:22.096973705Z Running command: java -Djava.util.logging.config.file=/usr/local/appservice/logging.properties -Dfile.encoding=UTF-8  -Dserver.port=80 -XX:ErrorFile=/home/LogFiles/java_error_abc_ln1sdlwk0003HY_%p.log -XX:+CrashOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/LogFiles/java_memdump_abc_ln1sdlwk0003HY.log -Duser.dir=/home/site/wwwroot/BOOT-INF/lib -jar /home/site/wwwroot/BOOT-INF/lib/antlr-2.7.7.jar:/usr/local/appservice/lib/azure.appservice.jar
2023-05-24T23:57:22.098097832Z Launched child process with pid: 171
2023-05-24T23:57:22.098116532Z Waiting for main process to exit. GLOBAL_PID_MAIN=171
2023-05-24T23:57:22.098122632Z Waiting for GLOBAL_PID_MAIN == 171
2023-05-24T23:57:22.100263883Z Error: Unable to access jarfile /home/site/wwwroot/BOOT-INF/lib/antlr-2.7.7.jar:/usr/local/appservice/lib/azure.appservice.jar
2023-05-24T23:57:22.100579190Z Wait for pid == 171 either returned successfully or was interrupted due to a signal 171
2023-05-24T23:57:22.100914498Z Done waiting for main process. GLOBAL_PID_MAIN=171.
2023-05-24T23:57:22.100928998Z Exiting entry script!
/home/LogFiles/2023_05_24_ln1sdlwk0003HY_docker.log  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/2023_05_24_ln1sdlwk0003HY_docker.log)
2023-05-24T23:57:14.840Z INFO  - Pull Image successful, Time taken: 0 Minutes and 0 Seconds
2023-05-24T23:57:14.861Z INFO  - Starting container for site
2023-05-24T23:57:14.862Z INFO  - docker run -d --expose=80 --name abc_0_93c0ccf0 -e WEBSITE_SITE_NAME=abc -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=abc.azurewebsites.net -e WEBSITE_INSTANCE_ID=21a15b1d982dae3c2b57a2e86a3c823a167a9b6352be29357a0c4c65cb775995 -e WEBSITE_USE_DIAGNOSTIC_SERVER=False mcr.microsoft.com/azure-app-service/java:11-java11_221014210614
2023-05-24T23:57:14.863Z INFO  - Logging is not enabled for this container.Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
2023-05-24T23:57:15.436Z INFO  - Initiating warmup request to container abc_0_93c0ccf0 for site abc
2023-05-24T23:57:23.578Z ERROR - Container abc_0_93c0ccf0 for site abc has exited, failing site start
2023-05-24T23:57:23.593Z ERROR - Container abc_0_93c0ccf0 didn't respond to HTTP pings on port: 80, failing site start. See container logs for debugging.
2023-05-24T23:57:23.597Z INFO  - Stopping site abc because it failed during startup.
/home/LogFiles/2023_05_25_ln1sdlwk0003HY_default_docker.log  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/2023_05_25_ln1sdlwk0003HY_default_docker.log)
2023-05-25T10:25:04.504739480Z Caused by: java.lang.ClassNotFoundException: org.springframework.boot.availability.ReadinessState
2023-05-25T10:25:04.504853882Z 	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
2023-05-25T10:25:04.512516160Z 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
2023-05-25T10:25:04.512696664Z 	at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:151)
2023-05-25T10:25:04.517867984Z 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
2023-05-25T10:25:04.528582733Z 	... 6 more
2023-05-25T10:25:04.701549447Z Wait for pid == 171 either returned successfully or was interrupted due to a signal 171
2023-05-25T10:25:04.702391967Z Done waiting for main process. GLOBAL_PID_MAIN=171.
2023-05-25T10:25:04.702426567Z Exiting entry script!
/home/LogFiles/2023_05_25_ln1sdlwk0003HY_docker.log  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/2023_05_25_ln1sdlwk0003HY_docker.log)
2023-05-25T10:43:10.113Z INFO  -  Status: Image is up to date for mcr.microsoft.com/azure-app-service/java:11-java11_221014210614
2023-05-25T10:43:10.116Z INFO  - Pull Image successful, Time taken: 0 Minutes and 0 Seconds
2023-05-25T10:43:10.138Z INFO  - Starting container for site
2023-05-25T10:43:10.139Z INFO  - docker run -d --expose=80 --name abc_1_7caf0d96 -e WEBSITE_SITE_NAME=abc -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=abc.azurewebsites.net -e WEBSITE_INSTANCE_ID=21a15b1d982dae3c2b57a2e86a3c823a167a9b6352be29357a0c4c65cb775995 -e WEBSITE_USE_DIAGNOSTIC_SERVER=False mcr.microsoft.com/azure-app-service/java:11-java11_221014210614
2023-05-25T10:43:10.140Z INFO  - Logging is not enabled for this container.Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
2023-05-25T10:43:10.715Z INFO  - Initiating warmup request to container abc_1_7caf0d96 for site abc
2023-05-25T10:43:25.839Z INFO  - Waiting for response to warmup request for container abc_1_7caf0d96. Elapsed time = 15.1235808 sec
2023-05-25T10:43:35.467Z INFO  - Container abc_1_7caf0d96 for site abc initialized successfully and is ready to serve requests.
/home/LogFiles/2023_05_26_ln1sdlwk0003HY_docker.log  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/2023_05_26_ln1sdlwk0003HY_docker.log)
2023-05-26T09:28:16.378Z INFO  -  Status: Image is up to date for mcr.microsoft.com/azure-app-service/java:11-java11_221014210614
2023-05-26T09:28:16.380Z INFO  - Pull Image successful, Time taken: 0 Minutes and 0 Seconds
2023-05-26T09:28:16.401Z INFO  - Starting container for site
2023-05-26T09:28:16.401Z INFO  - docker run -d --expose=80 --name abc_2_44b0cf35 -e WEBSITE_SITE_NAME=abc -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=abc.azurewebsites.net -e WEBSITE_INSTANCE_ID=21a15b1d982dae3c2b57a2e86a3c823a167a9b6352be29357a0c4c65cb775995 -e WEBSITE_USE_DIAGNOSTIC_SERVER=False mcr.microsoft.com/azure-app-service/java:11-java11_221014210614
2023-05-26T09:28:16.401Z INFO  - Logging is not enabled for this container.Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
2023-05-26T09:28:17.932Z INFO  - Initiating warmup request to container abc_2_44b0cf35 for site abc
2023-05-26T09:28:33.074Z INFO  - Waiting for response to warmup request for container abc_2_44b0cf35. Elapsed time = 15.1417754 sec
2023-05-26T09:28:42.731Z INFO  - Container abc_2_44b0cf35 for site abc initialized successfully and is ready to serve requests.
/home/LogFiles/2023_05_27_ln1sdlwk0003HY_docker.log  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/2023_05_27_ln1sdlwk0003HY_docker.log)
2023-05-27T06:24:42.023Z INFO  -
/home/LogFiles/2023_05_28_ln1sdlwk0003HY_docker.log  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/2023_05_28_ln1sdlwk0003HY_docker.log)
2023-05-28T06:24:42.022Z INFO  -
/home/LogFiles/2023_05_29_ln1sdlwk0003HY_docker.log  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/2023_05_29_ln1sdlwk0003HY_docker.log)
2023-05-29T06:24:42.023Z INFO  -
/home/LogFiles/2023_05_30_ln1sdlwk0003HY_default_docker.log  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/2023_05_30_ln1sdlwk0003HY_default_docker.log)
2023-05-30T23:59:17.395948438Z Failed to query jar entry point. Falling back to legacy command-line
2023-05-30T23:59:17.396107142Z Running command: java -Djava.util.logging.config.file=/usr/local/appservice/logging.properties -Dfile.encoding=UTF-8  -Dserver.port=80 -XX:ErrorFile=/home/LogFiles/java_error_abc_ln1sdlwk0003HY_%p.log -XX:+CrashOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/LogFiles/java_memdump_abc_ln1sdlwk0003HY.log -Duser.dir=/home/site/wwwroot -jar /home/site/wwwroot/app.jar:/usr/local/appservice/lib/azure.appservice.jar
2023-05-30T23:59:17.396941862Z Launched child process with pid: 170
2023-05-30T23:59:17.398556402Z Waiting for main process to exit. GLOBAL_PID_MAIN=170
2023-05-30T23:59:17.399141716Z Waiting for GLOBAL_PID_MAIN == 170
2023-05-30T23:59:17.399595327Z Error: Unable to access jarfile /home/site/wwwroot/app.jar:/usr/local/appservice/lib/azure.appservice.jar
2023-05-30T23:59:17.400363446Z Wait for pid == 170 either returned successfully or was interrupted due to a signal 170
2023-05-30T23:59:17.400382547Z Done waiting for main process. GLOBAL_PID_MAIN=170.
2023-05-30T23:59:17.400388147Z Exiting entry script!
/home/LogFiles/2023_05_30_ln1sdlwk0003HY_docker.log  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/2023_05_30_ln1sdlwk0003HY_docker.log)
2023-05-30T23:59:15.659Z INFO  - Pull Image successful, Time taken: 0 Minutes and 0 Seconds
2023-05-30T23:59:16.282Z INFO  - Starting container for site
2023-05-30T23:59:16.283Z INFO  - docker run -d --expose=80 --name abc_0_1649948e -e WEBSITE_SITE_NAME=abc -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=abc.azurewebsites.net -e WEBSITE_INSTANCE_ID=21a15b1d982dae3c2b57a2e86a3c823a167a9b6352be29357a0c4c65cb775995 -e WEBSITE_USE_DIAGNOSTIC_SERVER=False mcr.microsoft.com/azure-app-service/java:11-java11_221014210614
2023-05-30T23:59:16.285Z INFO  - Logging is not enabled for this container.Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
2023-05-30T23:59:16.890Z INFO  - Initiating warmup request to container abc_0_1649948e for site abc
2023-05-30T23:59:17.916Z ERROR - Container abc_0_1649948e for site abc has exited, failing site start
2023-05-30T23:59:17.933Z ERROR - Container abc_0_1649948e didn't respond to HTTP pings on port: 80, failing site start. See container logs for debugging.
2023-05-30T23:59:17.939Z INFO  - Stopping site abc because it failed during startup.
/home/LogFiles/2023_05_31_ln1sdlwk0003HY_default_docker.log  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/2023_05_31_ln1sdlwk0003HY_default_docker.log)
2023-05-31T04:49:59.078073390Z Failed to query jar entry point. Falling back to legacy command-line
2023-05-31T04:49:59.079011212Z Running command: java -Djava.util.logging.config.file=/usr/local/appservice/logging.properties -Dfile.encoding=UTF-8  -Dserver.port=80 -XX:ErrorFile=/home/LogFiles/java_error_abc_ln1sdlwk0003HY_%p.log -XX:+CrashOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/LogFiles/java_memdump_abc_ln1sdlwk0003HY.log -Duser.dir=/home/site/wwwroot -jar /home/site/wwwroot/app.jar:/usr/local/appservice/lib/azure.appservice.jar
2023-05-31T04:49:59.079037713Z Launched child process with pid: 170
2023-05-31T04:49:59.080179840Z Waiting for main process to exit. GLOBAL_PID_MAIN=170
2023-05-31T04:49:59.080815355Z Waiting for GLOBAL_PID_MAIN == 170
2023-05-31T04:49:59.082956005Z Error: Unable to access jarfile /home/site/wwwroot/app.jar:/usr/local/appservice/lib/azure.appservice.jar
2023-05-31T04:49:59.084401140Z Wait for pid == 170 either returned successfully or was interrupted due to a signal 170
2023-05-31T04:49:59.084415940Z Done waiting for main process. GLOBAL_PID_MAIN=170.
2023-05-31T04:49:59.084420940Z Exiting entry script!
/home/LogFiles/2023_05_31_ln1sdlwk0003HY_docker.log  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/2023_05_31_ln1sdlwk0003HY_docker.log)
2023-05-31T04:49:57.814Z INFO  - Pull Image successful, Time taken: 0 Minutes and 0 Seconds
2023-05-31T04:49:57.834Z INFO  - Starting container for site
2023-05-31T04:49:57.836Z INFO  - docker run -d --expose=80 --name abc_0_13195729 -e WEBSITE_SITE_NAME=abc -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=abc.azurewebsites.net -e WEBSITE_INSTANCE_ID=21a15b1d982dae3c2b57a2e86a3c823a167a9b6352be29357a0c4c65cb775995 -e WEBSITE_USE_DIAGNOSTIC_SERVER=False mcr.microsoft.com/azure-app-service/java:11-java11_221014210614
2023-05-31T04:49:57.838Z INFO  - Logging is not enabled for this container.Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
2023-05-31T04:49:58.425Z INFO  - Initiating warmup request to container abc_0_13195729 for site abc
2023-05-31T04:49:59.457Z ERROR - Container abc_0_13195729 for site abc has exited, failing site start
2023-05-31T04:49:59.476Z ERROR - Container abc_0_13195729 didn't respond to HTTP pings on port: 80, failing site start. See container logs for debugging.
2023-05-31T04:49:59.480Z INFO  - Stopping site abc because it failed during startup.
/home/LogFiles/Application/spring.ln1sdlwk0003HY.log  (https://abc.scm.azurewebsites.net/api/vfs/LogFiles/Application/spring.ln1sdlwk0003HY.log)
Ending Log Tail of existing logs ---
Starting Live Log Stream ---
2023-05-31T04:53:11  No new trace in the past 1 min(s).
2023-05-31T04:54:11  No new trace in the past 2 min(s).

But when I deploy my jar file directly through cli everything work perfectly and I am unable to understand why its not work when deploy through azure toolkits from IntelliJ

 

No RepliesBe the first to reply

Resources