question

Anup-3894 avatar image
0 Votes"
Anup-3894 asked ·

Dockerized a java spring boot app and deployed docker image to web app but the app is not accessible through Azure URL

Dockerized a java spring boot app and deployed docker image to web app but the app is not accessible.

I'm using Azure DevOps pipeline and created below steps.

Generated jar file using maven
Built a docker image from a Dockerfile
Pushed the docker image to ACR(tagged with build ID)
Created a linux web app and selected docker image from above step
ENV Accept_EULA is Y and container_start_time is 1800
The application is starting however it not accessible and displays below error in logs.

Container myapp_0_de5443dd for site myapp-backend-dev did not start within expected time limit. Elapsed time = 230.2631665 sec
Container myapp_0_de5443dd didn't respond to HTTP pings on port: 7300, failing site start. See container logs for debugging.
home/LogFiles/webssh/pm2.log (https://myapp.scm.azurewebsites.net/api/vfs/LogFiles/webssh/pm2.log)Host: undefinedwebssh2 Login: user=root from=127.0.0.1 host=undefined port=2222 sessionID=undefined allowreplay=undefinedHeaders: {"connection":"close","accept":"text/html, application/xhtml+xml, application/xml; q=0.9, /; q=0.8","accept-encoding":"br, gzip, deflate","accept-language":"en-gb","cookie":"ARRAffinity=0d7eaa93ccf04e2494816f0f168f4e2170cd80b95a36687e39877b2728981272","host":"127.0.0.1:3000","max-forwards":"10","referer":"https://myapp.scm.azurewebsites.net/","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Safari/605.1.15","x-client-ip":"111.11.111.111","x-client-port":"57208","x-waws-unencoded-url":"/webssh/host","client-ip":"111.11.111.111:57208","x-arr-log-id":"SOMETHING-ee62-48cf-813a-724c9acb0ca0","disguised-host":"myapp.scm.azurewebsites.net","x-site-deployment-id":"myapp","was-default-hostname":"myapp.scm.azurewebsites.net","x-original-url":"/webssh/host","x-ms-client-principal-name":"EMAIL@SOMETHING.onmicrosoft.com","x-ms-client-display-name":"SOME NAME","x-forwarded-for":"111.11.111.111:57208","x-arr-ssl":"2048|256|C=US, S=Washington, L=Redmond, O=Microsoft Corporation, OU=Microsoft IT, CN=Microsoft IT TLS CA 5|CN=*.azurewebsites.net","x-forwarded-proto":"https","x-appservice-proto":"https"}Host from file: 172.16.1.2DEBUG: Local ident: 'SSH-2.0-ssh2js0.1.16'on.error - Error: connect ECONNREFUSED 172.16.1.2:2222Status_WatchFile :: Error Error: ENOENT: no such file or directory, open '/appsvctmp/status.txt'

azure-webapps
· 3
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Can you share your Dockerfile (or any non-sensitive snippets)? What port is the container listening on?


0 Votes 0 · ·
Anup-3894 avatar image Anup-3894 JasonFreeberg-3971 ·

@JasonFreeberg-3971 Below is the docker file.

Note: There are few external env variables that are being fetched from Azure Keyvault.

FROM adoptopenjdk/openjdk11:ubi

ARG PROFILE
ENV spring.profiles.active=$PROFILE

ENV ACCEPT_EULA=Y
ENV WEBSITES_PORT=8000
ENV WEBSITE_HTTPLOGGING_RETENTION_DAYS=7
ENV WEBSITES_CONTAINER_START_TIME_LIMIT=1800

ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar

EXPOSE 8000

ENTRYPOINT ["java","-jar","/app.jar"]

0 Votes 0 · ·

Did you configure your app service to point to port 8000 @Anup-3894?


0 Votes 0 · ·

0 Answers