Closed simonstaimie closed 5 years ago
I don't know off the top of my head without digging in. Do the log files give any additional details? Do you have any additional app settings?
Does this happen when any plugin is installed or just updated? Is there a particular plugin that gets installed/updated that is the root cause of these?
It may be a few days before I have some free time to try and repro.
Does the app eventually work after the restarts? After I installed the AAD plugin it restarted (which took a few minutes), but came up normally. I haven't tried configuring the AAD plugin yet.
On another note, when updating the plugins (I tried the C# one), SQ did fail to start. I saw this error message in sonar.log 2019.11.06 00:04:23 ERROR web[][o.s.s.p.PlatformImpl] Web server startup failed: Found two versions of the plugin SonarC# [csharp] in the directory extensions/plugins. Please remove one of sonar-csharp-plugin-8.0.0.9566.jar or sonar-csharp-plugin-7.17.0.9346.jar.
Removing the extra jar fixed that issue.
Hi @vanderby thanks for looking into this, I've now hit this wall when when I reset the profile and restarted the service.
"The specified CGI application encountered an error and the server terminated the process."
where I are you finding these logs? are you using the MS portal console?
even without install any additional plugins and I just simply restart the machine from the azure portal, I get: The specified CGI application encountered an error and the server terminated the process.
reading this and this: https://stackoverflow.com/questions/33645242/the-specified-cgi-application-encountered-an-error-and-the-server-terminated-the
https://code-examples.net/en/q/20162ba
I can only see /d/local/Config/rootweb.config
@SuperDuperOne To view the logs, you can use the Kudu site or the App Service editor blade (https://xxxx.scm.azurewebsites.net/dev/wwwroot/) thenwwwroot\sonarqube-X.X\logs
The main ones I find useful are sonar.log and web.log.
cant get to it since it's giving me this: "The specified CGI application encountered an error and the server terminated the process." i'll have to check out the Kudu way..
it would be good I could remote onto the box.... have you ever seen the above error before?
no matter how many times I restart the box I cant get it to work. is it worth rebuilding again, I've done nothing but, install a plugin and getting all these errors
I have not seen that error before. The App Service editor blade is in the Azure Portal for the App Service, not the SQ website.
You can absolutely try deploying a new web app to see what particular action started to cause these issues. That would greatly help in finding the root cause.
Ok. I will be deploying again to Azure, and once up and running, i will restart the box and try connect to it. additionally, I will not be adding/installing any plugins or making change once up. will update here again shortly.
You shouldn't need to restart after deploying. It may take up to 10 minutes to start depending on the SKU you select.
AAD plugin is not the issue. I was able to configure it as normal.
There is an issue with updating plugins #22 that has a manual workaround.
I see, however when I have installed a plugin, SonarQube suggest that I restart the server (within the UI) in order for the plugin to be installed, when I have clicked restart Server I would get that error message: The specified CGI application encountered an error and the server terminated the process.
I have had the SQ up and running so far, but will need to get AAD plugin installed and configure for company use, which again, SQ will suggest that I restart in order for install to complete.
I will upload log shortly.
Once I hopefully get this done, i will look to get setup a database for SQ. I've seen other SonarQube Azure deployment configurations that have databases already setup...
thanks for your help by the way!
update: so far so good... nothing odd in the logs either. I will try getting AAD working fully and attach a database .
I just updated the HttpPlatformHandlerStartup.ps1 script to check for and remove duplicate plugins on startup. That will help alleviate part of your problem.
Depending on what SKU you are running the restart will take a while (the site will actually restart twice), but with patience SQ will come up as expected.
thanks for your help on this @vanderby the box has been running good so far. i;m trying to attach an Azure SQL database to the box but every time i make changes to the sonar.properties file it change it back to the default H2 database...
i have removed the connection to you github also so there is no continuous deployment configured.
any idea?
@SuperDuperOne Set the properties through the App Service config editor. The startup script will update the sonar.properties file for you as per #15
Specifically in your case set sonar.jdbc.username and sonar.jdbc.password.
This makes slot swapping more useful as well as easier to update the settings.
Thanks @vanderby, however I have already done so, and to test if the Azure Database gets picked up, I save the changes in App Service Config Editor, restart the SonarQube to accept the changes, when the box starts up again, my added database config gets commented out...
below is the current database settings:
below is my current changes to the sonar.properties file (see screenshot timestamp) Screen Shot 2019-11-11 at 20 51 58
below after the box starts up again (see screenshot timestamp)
Screen Shot 2019-11-11 at 21 01 15
@SuperDuperOne What does your app settings look like? Yours should look similar to:
The brief instructions on this are here: https://github.com/vanderby/SonarQube-AzureAppService#passthrough-application-settings
Following your README and comment above I added the; url, password and username.
I followed your recomendation from here however in Azure Portal > SQL databases > connection Strings I added the JDBC which give me a longer url
and currently, this is in happening within the logs.
i'm hoping this is only temporary :(
@vanderby After a few endless days and nights, I've finally got it working! with the azure sql db in place, the ability to restart SQ and it not to hang, i'm also able to install apps too! Thank you kindly for the help, it was been much appreciated and informative.
I did however, run into this error: 2019.11.12 10:21:27 ERROR web[][o.s.s.p.PlatformImpl] Web server startup failed: Database collation must be case-sensitive and accent-sensitive. It is SQL_Latin1_General_CP1_CI_AS but should be SQL_Latin1_General_CP1_CS_AS.
I simply created a new db and change the collation.
I'm glad to hear you got it working. Thanks for finding a few bugs for me. The case sensitive/scent sensitive issue is noted in the readme too since it usually burns people.
I'm closing this issue. Feel free to open a new issue if you run into more problems.
Firstly, I would like to say that this is great when working however, whenever I attempt to update the marketplace plugins within SonarQube, (azure AD, SonarQube Gateway and rule update, etc)
the app restart but hits 502/404/400 error....even after restarting the box several times.
I'm using the S2 and P1 because it seems to be complaining about memory and high CPU.
I;ve been tempted to not do any updates to SonarQube because we need static code analyzing in place asap.
any ideas?