vanderby / SonarQube-AzureAppService

Instructions and files to host SonarQube on an Azure App Service without a container.
MIT License
90 stars 165 forks source link

App service unable to launch with Azure SQL #42

Closed youdhbir closed 4 years ago

youdhbir commented 4 years ago

Hello Vanderby,

This is a simple integration with Azure SQL but unfortunately not working for me. JDBC settings are updated per instructions and can see reflecting in sonar.properties file as well.

It always return generic errors either "502 - Web server received an invalid response while acting as a gateway or proxy server." or "The specified CGI application encountered an error and the server terminated the process."

No firewall configured for Azure SQL server and verified as I'm able to connect to Azure SQL db using SSMS.

Enabled app insights and log analytics but no hint. I can see that every time I restart app service, all steps in powershell run and logged properly.

Could you please help. Thanks.

vanderby commented 4 years ago

Only two things comes to mind:

  1. Verify the connection string is correct (starts with jdbc:SQLserver://) and the username & password settings are set.
  2. Verify the firewall settings on Azure SQL
youdhbir commented 4 years ago

Thanks for quick response!

Both verified but seems correct to me.

Connection string: jdbc:sqlserver://dbserverName:1433;database=databaseName;encrypt=true; DB Server firewall: No firewall. (Screenshot attached)

SQLServer-Firewall

This is a very basic problem but very important for running SonarQube as Azure App Service. I've tried to deploy template multiple times, just to ensure SonarQube service is running. Already had a setup on VM and now moving to App service due to numerous benefits.

vanderby commented 4 years ago

I finally got some time to circle back to this.

I have this working as expected. You should get more information from the logs\web.log. Easiest way to read the file is to use the "App Service Editor (Preview)" in the Development Tools section.

Did you create the database as SQL_Latin1_General_CP1_CS_AS? The default is SQL_Latin1_General_CP1_CI_AS which SQ does not like.

My firewall settings are the same as yours. And my application settings are what is specified in the project readme. image

vanderby commented 4 years ago

Closing this out due to inactivity.

youdhbir commented 4 years ago

Database collation was the issue. Many thanks for the support @vanderby !

danielrwoodward commented 4 years ago

@vanderby we are having this exact same issue, and are at a loss, is there any other guidance? Are "-" an invalid character in the url perhaps?

danielrwoodward commented 4 years ago

@vanderby the issue was the url, we removed everything except the following - jdbc:sqlserver://XXXXXXX.database.windows.net:1433;database=XXXX;

It needs no other parameters, despite what many people claim lol