0

I am trying to deploy sonarqube image 8.7.0 using dockerfile via azure pipelines on Azure Web Service for Linux containers. I have deployed the app service infrastructure (such as App service plan, Azure SQL Database) with ARM template. whenever I deploy the Sonarqube dockerfile, I always get the error: Container sonarqubece87_0_fbe29a39 didn't respond to HTTP pings on port: 8080, failing site start.

I have exposed port 8080 in the dockerfile and websites_port in appsetting of azure app service. also I have exposed port 2222 in the dockerfile as well so that I can open WebSSH.

I have tried many different options (including SSH support in dockerfile) to resolve this HTTP pings on port 8080 error but nothing is working.

Can someone guide me please to resolve this. Thank you

Can someone help me please.

Anil
  • 1
  • 1
  • 6
  • 1
    Can you share the Dockerfile and the steps you follow to deploy the app service? – Charles Xu Feb 19 '21 at 02:52
  • Try to read [post1](https://stackoverflow.com/questions/66196997/azure-deployment-failure-container-didnt-respond-to-http-pings-on-port-8080#comment117079792_66196997) and [post2](https://stackoverflow.com/questions/66212658/react-app-not-loading-with-docker-compose/66213919#66213919), if it useful to you, pls let me know. – Jason Pan Feb 19 '21 at 03:49
  • @JasonPan I tried to use your post1 but still same error. – Anil Feb 19 '21 at 05:51
  • @Anil Pls share your dockerfile as Charles said. – Jason Pan Feb 19 '21 at 06:02
  • JasonPan I tried to use your post1 but still same error. Dockerfile link and associated files (such as run.sh, init.sh etc) are here @CharlesXu: https://drive.google.com/drive/folders/1pgUF4oGXxPhsPSPDXOb1b4vmm18Jh7To?usp=sharing – Anil Feb 19 '21 at 06:03
  • There are two errors in your Dockerfile, one is you do not expose port 2222 in the Dockerfile, and the second is the `ENTRYPOINT` can only exist one. If there are multiple, the last one will be executed and another will be ignored. – Charles Xu Feb 19 '21 at 06:09
  • I have also attached Azure App Service settings screnshort on the above google drive link – Anil Feb 19 '21 at 06:16
  • @CharlesXu: I did expose port 2222 in my dockerfile but still did not work however, let me try CMD instead of ENTRYPOINT (CMD ["bin/sonar.sh"]) – Anil Feb 19 '21 at 06:20
  • @CharlesXu, it did not work again same error – Anil Feb 19 '21 at 06:46
  • Do you check if the image can work fine locally? – Charles Xu Feb 19 '21 at 06:51
  • Why do you try to ping port 8080? Sonarqube listens on port 9000. – raspy Feb 19 '21 at 10:12
  • @CharlesXu, can you please guide me how to check the image work fine locally. sorry I am new to this – Anil Feb 21 '21 at 23:50
  • You can take a look at Docker, I mean you can run the image in your local docker server to check if it can work well. – Charles Xu Feb 25 '21 at 02:46
  • @JasonPan, do you know how to execute two .sh files in either EntryPoint or CMD in dockerfile. I wan to execute two files (Init_container.sh, sonar.sh) here in dockerfile. what is the best way to do this? Many thanks – Anil Feb 25 '21 at 04:26
  • https://stackoverflow.com/questions/64895608/run-post-deployment-action-on-azure-app-service/64905246#64905246 – Jason Pan Feb 25 '21 at 07:45
  • You maybe can exec .sh file by this way. – Jason Pan Feb 25 '21 at 07:45
  • Thank you. I am getting this error now for snoarqube: I am using Azure SQL Server: Web server startup failed 2021-02-25T10:08:22.063660344Z java.lang.IllegalStateException: Fail to connect to database. – Anil Feb 25 '21 at 10:22
  • Finally I am able to connect with Azure SQL Server with Sonarqube via Azure Webapp container service however, I am still unable to do SSH into azure webapp container. Do I need to generate keys for the container as well in order to start sshd – Anil Mar 01 '21 at 07:00
  • Finally, it is working as I am able to connect to Azure SQL Server and can do WebSSH on Azure Web App Containers for Sonarqube Image. – Anil Mar 18 '21 at 08:09

0 Answers0