WinSW.CommandException: Failed to open the service control manager database. Access is denied --->

  • which versions are you using - Developer 10.6.0.92116
  • how is SonarQube deployed: zip - Windows with SQL Server 2019
  • what are you trying to achieve - Start SonarQube with a service

I’m running SonarQube with integrated security. It works fine, but when I try to run it as a service I get the following error. I’m not very well versed in SQL server so I’m not sure what to try.

WinSW.CommandException: Failed to open the service control manager database. Access is denied —> System.ComponentModel.Win32Exception: Access is denied
— End of inner exception stack trace —
at WinSW.Native.Throw.Command.Win32Exception(String message)
at WinSW.Native.ServiceManager.Open(ServiceManagerAccess access)
at WinSW.WrapperService.SignalStopped()
at WinSW.WrapperService.<>c__DisplayClass31_0.g__OnProcessCompleted|0(Process proc)
at WinSW.Util.ProcessHelper.<>c__DisplayClass6_0.b__0()

Hey there.

To install SonarQube as a Service, you’re going to have to have permissions on the Windows machine to install services (typically, this means being an administrator). This isn’t always obvious.

1 Like

I ran and installed the service as an administrator. The service is created and runs, but doesn’t actually startup SonarQube (at least not to the point where I can run it).

So you were able to move past this issue?

If so, then your next stop is the logs

No the issue is still ongoing. This error is from the logs and I don’t understand what it means or where to start.

1 Like

I am also seeing this issue, just suddenly out of nowhere.

@jesmersoy Sometimes this can hide another error:

  • Have you tried reinstalling the service?
  • Have you checked the other log files?

This issue surfaced again, then after restarting SQ service it goes away, which makes me believe it’s not permission/elevated command prompt. No scanning/analysis was occurring, we are still standing up the environment and doing health checks. I’ve attached the errors noticed in web and SonarServiceWrapper logs, any insight would be appreciated.

SQ environment details

SQ Enterprise 9.9.8.100196
Deployed manually, migrated the db from version 9.9.3
Java 17

The jdbc JRE exists at both location mentioned above (system32 and \lib\jdbc\mssql).

SonarServiceWrapper.wrapper.log (65.4 KB)
web.2025-03-08.log (21.9 KB)

I’ve also just applied the license, but still seeing these errors on homepage and Administration page:

I’m seeing 403 forbidden errors on ‘show_license’ request URL in devtools. I’m also seeing forbidden on ‘list’ and ‘app’ and few other Request URLs, testing in both browsers.



Sometimes ‘show_license’ api call works.

After applying license I restarted SQ app + data tiers, but issues persist. I am using a reverse proxy and followed the instructions to increase MaxQueryStrings but to no avail. I’ve checked access logs but all the GET api calls return HTTP 200. SAML Authentication Test is showing as “success” in SQ.

The reverse proxy logs is sending 403 forbidden when accessing admin page but not sure why.

2025-03-12 02:21:21 10.220.13.11 GET /api/rules/app - 443 - 10.220.13.11 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/134.0.0.0+Safari/537.36 https://servername-is.com/admin/settings 403 501 0 221 -

Please advise

Hi @Colin
In order for SQ to work in IIS10 you must disable Dynamic Restriction Settings which come enabled by default under the IP Address and Domain Restrictions feature. Hope this helps someone, this took forever to find.

iis 8 - iis 8 - 403 access is denied - Server Fault

1 Like