I have collected the output from running sonar-scanner -X:
14:16:02.470 INFO: Load active rules
14:16:02.631 DEBUG: GET 200 https://<OUR_HOST>/sonarqube/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXuClY_1Lkwz77xgNz5g&ps=500&p=1 | time=160ms
14:16:02.815 DEBUG: GET 200 https://<OUR_HOST>/sonarqube/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXuClZERLkwz77xgN0Ad&ps=500&p=1 | time=35ms
14:16:02.907 DEBUG: GET 200 https://<OUR_HOST>/sonarqube/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXuClZIcLkwz77xgN0Ha&ps=500&p=1 | time=87ms
14:16:02.964 DEBUG: GET 200 https://<OUR_HOST>/sonarqube/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXuClZK_Lkwz77xgN0Lu&ps=500&p=1 | time=38ms
14:16:02.987 DEBUG: GET 200 https://<OUR_HOST>/sonarqube/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXuClZMJLkwz77xgN0MO&ps=500&p=1 | time=18ms
14:16:03.013 DEBUG: GET 200 https://<OUR_HOST>/sonarqube/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXuClZOhLkwz77xgN0PO&ps=500&p=1 | time=25ms
14:16:03.061 DEBUG: GET 200 https://<OUR_HOST>/sonarqube/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXuClZMYLkwz77xgN0Nq&ps=500&p=1 | time=45ms
14:16:03.154 DEBUG: GET 200 https://<OUR_HOST>/sonarqube/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXuClZQmLkwz77xgN0VS&ps=500&p=1 | time=89ms
14:16:03.251 DEBUG: GET 200 https://<OUR_HOST>/sonarqube/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXuClZT9Lkwz77xgN0c4&ps=500&p=1 | time=83ms
14:16:03.328 DEBUG: GET 200 https://<OUR_HOST>/sonarqube/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXuClZWoLkwz77xgN0hG&ps=500&p=1 | time=69ms
14:16:03.421 DEBUG: GET 200 https://<OUR_HOST>/sonarqube/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXuClZaOLkwz77xgN0oA&ps=500&p=1 | time=90ms
14:16:03.468 DEBUG: GET 200 https://<OUR_HOST>/sonarqube/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXuClZYtLkwz77xgN0jF&ps=500&p=1 | time=40ms
14:16:03.581 DEBUG: GET 200 https://<OUR_HOST>/sonarqube/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXuClZeZLkwz77xgN0yn&ps=500&p=1 | time=110ms
14:16:03.865 DEBUG: GET 200 https://<OUR_HOST>/sonarqube/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXuGscP4kAU74jFh6sfu&ps=500&p=1 | time=268ms
14:16:03.886 INFO: ------------------------------------------------------------------------
14:16:03.886 INFO: EXECUTION FAILURE
14:16:03.886 INFO: ------------------------------------------------------------------------
14:16:03.886 INFO: Total time: 3.892s
14:16:03.921 INFO: Final Memory: 6M/30M
14:16:03.921 INFO: --------------------------------------------------
I have then gone into the database and started looking around for the mentioned profiles, since the error seems to be indicating that no rules are active.
I found all the mentioned rule IDs in org_qprofiles
, I then joined it to rules_profiles
via org_qprofiles.rules_profile_uuid
.
It shows 13 ‘built-in’ profiles and our custom Java profile. I took that profile ID and ran
select count(*) from active_rules ar where profile_uuid = 'AXuGscP4kAU74jFh6sfv'
> 503
The uuid is the id of our custom java profile. The number 503 matches what I can see on the sonarqube admin interface
Hopefully this helps narrowing down the issue