SonarQube installation and configuration error in Sonarqube Developer edition

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • what are you trying to achieve
  • what have you tried so far to achieve this

We are trying to setup a fresh SonarQube Developer edition using Azure app services for our Azure repos. We have created the app service, copied the exact mirror copy of configuration that we were using earlier. We wanted to host SonarQube using Azure app service. Though we have successfully able to bring Azure app service and when we tried to use app service URL to login to SonarQube for the first-time using admin/admin credentials (username/default password) we are getting error " The specified CGI application encountered an error, and the server terminated the process". We believe that Elasticsearch is not up. Here also providing details for our existing SonarQube instance:

  1. SonarQube instance server ID # BF75BFA7-AX74idEJupsJMRaitjku
  2. SonarQube license: Developer edition
  3. SonarQube version: SonarQube Developer edition version 9.3

Kindly help us in setting up and configuring SonarQube for our project. Also kindly help us with the license key.

Hi,

Welcome to the community!

First, since you’re just now adopting, you should do it with the latest version: 9.5.

Regarding your error, it’s very difficult if not impossible to diagnose the problem with so little data. Please check your server logs for errors, and post them here if you don’t understand them.

 
HTH,
Ann

Hi Ann,
As mentioned in our earlier communication, we are trying to setup a fresh SonarQube Developer edition using Azure app services for our Azure repos. We have created the app service, copied the exact mirror copy of configuration that we were using earlier. We wanted to host SonarQube using Azure app service. Though we have successfully able to bring Azure app service and when we tried to use app service URL to login to SonarQube for the first-time using admin/admin credentials (username/default password) we are getting error " The specified CGI application encountered an error, and the server terminated the process". We believe that Elasticsearch is not up. Here also providing details for our existing SonarQube instance:

  1. SonarQube instance server ID # BF75BFA7-AX74idEJupsJMRaitjku

  2. SonarQube license: Developer edition

  3. SonarQube version: SonarQube Developer edition version 9.3

Kindly help us in setting up and configuring SonarQube for our project. Also kindly help us with the license key.

Herein also providing server logs :

Hi Ann,
As mentioned in our earlier communication, we are trying to setup a fresh SonarQube Developer edition using Azure app services for our Azure repos. We have created the app service, copied the exact mirror copy of configuration that we were using earlier. We wanted to host SonarQube using Azure app service. Though we have successfully able to bring Azure app service and when we tried to use app service URL to login to SonarQube for the first-time using admin/admin credentials (username/default password) we are getting error " The specified CGI application encountered an error, and the server terminated the process". We believe that Elasticsearch is not up. Here also providing details for our existing SonarQube instance:

SonarQube instance server ID # BF75BFA7-AX74idEJupsJMRaitjku
SonarQube license: Developer edition
SonarQube version: SonarQube Developer edition version 9.3

Kindly help us in setting up and configuring SonarQube for our project. Also kindly help us with the license key.

Herein also providing server logs :

**************************************************************************************************************
2022-07-10T12:59:04  Welcome, you are now connected to log-streaming service. The default timeout is 2 hours. Change the timeout with the App Setting SCM_LOGSTREAM_TIMEOUT (in seconds).
2022-07-10 12:58:18 ~1SONAR-QUBE-APP-SERVICE-PROD GET / - 80 - 10.0.128.34 AlwaysOn - - sonar-qube-app-service-prod.azurewebsites.net 200 0 0 3106 501 23239
2022-07-10 12:58:25 ~1SONAR-QUBE-APP-SERVICE-PROD GET /api/siteextensions/ api-version=2018-11-01&X-ARR-LOG-ID=68253e81-9dfc-47be-9dbf-1a276c052c2c 443 - 52.162.106.192 - - https://management.azure.com/subscriptions/8c0d7314-0b3c-4d79-9154-84e0c9fe1f60/resourceGroups/ServiceLayer-75F/providers/Microsoft.Web/sites/sonar-qube-app-service-prod/siteextensions?api-version=2018-11-01 sonar-qube-app-service-prod.scm.azurewebsites.net 200 0 0 733 6494 5670
2022-07-10 12:58:25 ~1SONAR-QUBE-APP-SERVICE-PROD GET /api/vfs/site/wwwroot/ _=1657457490209&X-ARR-LOG-ID=64f78f5a-2791-4ca5-a865-b688f5a9e443 443 - 115.99.134.115 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/103.0.5060.114+Safari/537.36+Edg/103.0.1264.49 - - sonar-qube-app-service-prod.scm.azurewebsites.net 200 0 0 53032 1601 5859
2022-07-10 12:59:04 ~1SONAR-QUBE-APP-SERVICE-PROD GET / - 80 - 10.0.128.34 AlwaysOn - - sonar-qube-app-service-prod.azurewebsites.net 200 0 0 8135 501 19393
2022-07-10 12:59:04 ~1SONAR-QUBE-APP-SERVICE-PROD GET / - 80 - 10.0.128.34 AlwaysOn - - sonar-qube-app-service-prod.azurewebsites.net 200 0 0 8135 501 9596
**************************************************************************************************************

Hi,

The logging you’ve provided didn’t come from SonarQube. Please check the SonarQube server logs.

 
Ann

Hi Ann,
Herein providing sonarqube web logs:


2022.07.12 05:32:48 DEBUG web[][o.a.h.i.n.c.MainClientExec] [exchange: 120597] Consume content
2022.07.12 05:32:48 DEBUG web[][o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 120597] Connection can be kept alive indefinitely
2022.07.12 05:32:48 DEBUG web[][o.a.h.i.n.c.MainClientExec] [exchange: 120597] Response processed
2022.07.12 05:32:48 DEBUG web[][o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 120597] releasing connection
2022.07.12 05:32:48 DEBUG web[][o.a.h.i.n.c.ManagedNHttpClientConnectionImpl] http-outgoing-2 127.0.0.1:51345<->127.0.0.1:9001[ACTIVE][r:r]: Remove attribute http.nio.exchange-handler
2022.07.12 05:32:48 DEBUG web[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Releasing connection: [id: http-outgoing-2][route: {}->http://127.0.0.1:9001][total kept alive: 4; route allocated: 5 of 10; total allocated: 5 of 30]
2022.07.12 05:32:48 DEBUG web[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection [id: http-outgoing-2][route: {}->http://127.0.0.1:9001] can be kept alive indefinitely
2022.07.12 05:32:48 DEBUG web[][o.a.h.i.n.c.ManagedNHttpClientConnectionImpl] http-outgoing-2 127.0.0.1:51345<->127.0.0.1:9001[ACTIVE][r:r]: Set timeout 0
2022.07.12 05:32:48 DEBUG web[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection released: [id: http-outgoing-2][route: {}->http://127.0.0.1:9001][total kept alive: 5; route allocated: 5 of 10; total allocated: 5 of 30]
2022.07.12 05:32:48 DEBUG web[][o.a.h.i.n.c.InternalIODispatch] http-outgoing-2 [ACTIVE] [content length: 5039; pos: 5039; completed: true]
2022.07.12 05:32:48 TRACE web[][tracer] curl -iX GET 'http://127.0.0.1:9001/_nodes/stats/fs,process,jvm,indices,breaker'\n# HTTP/1.1 200 OK\n# X-elastic-product: Elasticsearch\n# content-type: application/json; charset=UTF-8\n# content-length: 5039\n#\n# {"_nodes":{"total":1,"successful":1,"failed":0},"cluster_name":"sonarqube","nodes":{"Q6dMIZmJTP2BetsxBHyw3g":{"timestamp":1657603968146,"name":"sonarqube","transport_address":"127.0.0.1:52488","host":"127.0.0.1","ip":"127.0.0.1:52488","roles":["data","data_cold","data_content","data_frozen","data_hot","data_warm","ingest","master","remote_cluster_client"],"attributes":{"rack_id":"sonarqube"},"indices":{"docs":{"count":56134,"deleted":438},"shard_stats":{"total_count":24},"store":{"size_in_bytes":20362042,"total_data_set_size_in_bytes":20362042,"reserved_in_bytes":0},"indexing":{"index_total":1,"index_time_in_millis":537,"index_current":0,"index_failed":0,"delete_total":0,"delete_time_in_millis":0,"delete_current":0,"noop_update_total":0,"is_throttled":false,"throttle_time_in_millis":0},"get":{"total":18,"time_in_millis":65,"exists_total":18,"exists_time_in_millis":65,"missing_total":0,"missing_time_in_millis":0,"current":0},"search":{"open_contexts":0,"query_total":740,"query_time_in_millis":41477,"query_current":0,"fetch_total":556,"fetch_time_in_millis":13338,"fetch_current":0,"scroll_total":0,"scroll_time_in_millis":0,"scroll_current":0,"suggest_total":0,"suggest_time_in_millis":0,"suggest_current":0},"merges":{"current":0,"current_docs":0,"current_size_in_bytes":0,"total":0,"total_time_in_millis":0,"total_docs":0,"total_size_in_bytes":0,"total_stopped_time_in_millis":0,"total_throttled_time_in_millis":0,"total_auto_throttle_in_bytes":503316480},"refresh":{"total":52,"total_time_in_millis":1329,"external_total":51,"external_total_time_in_millis":2797,"listeners":0},"flush":{"total":25,"periodic":0,"total_time_in_millis":1644},"warmer":{"current":0,"total":26,"total_time_in_millis":1009},"query_cache":{"memory_size_in_bytes":0,"total_count":236,"hit_count":0,"miss_count":236,"cache_size":0,"cache_count":0,"evictions":0},"fielddata":{"memory_size_in_bytes":697096,"evictions":0},"completion":{"size_in_bytes":0},"segments":{"count":100,"memory_in_bytes":554816,"terms_memory_in_bytes":435136,"stored_fields_memory_in_bytes":49504,"term_vectors_memory_in_bytes":9432,"norms_memory_in_bytes":5248,"points_memory_in_bytes":0,"doc_values_memory_in_bytes":55496,"index_writer_memory_in_bytes":0,"version_map_memory_in_bytes":0,"fixed_bit_set_memory_in_bytes":904,"max_unsafe_auto_id_timestamp":-1,"file_sizes":{}},"translog":{"operations":0,"size_in_bytes":1320,"uncommitted_operations":0,"uncommitted_size_in_bytes":1320,"earliest_last_modified_age":514394529},"request_cache":{"memory_size_in_bytes":70088,"evictions":0,"hit_count":23,"miss_count":37},"recovery":{"current_as_source":0,"current_as_target":0,"throttle_time_in_millis":0}},"process":{"timestamp":1657603968724,"open_file_descriptors":-1,"max_file_descriptors":-1,"cpu":{"percent":-1,"total_in_millis":35206000},"mem":{"total_virtual_in_bytes":831438848}},"jvm":{"timestamp":1657603968724,"uptime_in_millis":649039662,"mem":{"heap_used_in_bytes":353283160,"heap_used_percent":65,"heap_committed_in_bytes":536870912,"heap_max_in_bytes":536870912,"non_heap_used_in_bytes":144511432,"non_heap_committed_in_bytes":154685440,"pools":{"young":{"used_in_bytes":279969792,"max_in_bytes":0,"peak_used_in_bytes":320864256,"peak_max_in_bytes":0},"old":{"used_in_bytes":72264792,"max_in_bytes":536870912,"peak_used_in_bytes":72588632,"peak_max_in_bytes":536870912},"survivor":{"used_in_bytes":1048576,"max_in_bytes":0,"peak_used_in_bytes":26214400,"peak_max_in_bytes":0}}},"threads":{"count":35,"peak_count":35},"gc":{"collectors":{"young":{"collection_count":217,"collection_time_in_millis":5664},"old":{"collection_count":0,"collection_time_in_millis":0}}},"buffer_pools":{"mapped":{"count":237,"used_in_bytes":19726063,"total_capacity_in_bytes":19726063},"direct":{"count":28,"used_in_bytes":2295064,"total_capacity_in_bytes":2295063}},"classes":{"current_loaded_count":15408,"total_loaded_count":15408,"total_unloaded_count":0}},"fs":{"timestamp":1657603968724,"total":{"total_in_bytes":37211860992,"free_in_bytes":3919204352,"available_in_bytes":3919204352},"data":[{"path":"D:\\home\\site\\wwwroot\\sonarqube-9.3.0.51899\\data\\es7\\nodes\\0","mount":"Windows (D:)","type":"NTFS","total_in_bytes":37211860992,"free_in_bytes":3919204352,"available_in_bytes":3919204352}]},"breakers":{"request":{"limit_size_in_bytes":322122547,"limit_size":"307.1mb","estimated_size_in_bytes":0,"estimated_size":"0b","overhead":1.0,"tripped":0},"fielddata":{"limit_size_in_bytes":214748364,"limit_size":"204.7mb","estimated_size_in_bytes":697096,"estimated_size":"680.7kb","overhead":1.03,"tripped":0},"in_flight_requests":{"limit_size_in_bytes":536870912,"limit_size":"512mb","estimated_size_in_bytes":0,"estimated_size":"0b","overhead":2.0,"tripped":0},"accounting":{"limit_size_in_bytes":536870912,"limit_size":"512mb","estimated_size_in_bytes":554816,"estimated_size":"541.8kb","overhead":1.0,"tripped":0},"parent":{"limit_size_in_bytes":510027366,"limit_size":"486.3mb","estimated_size_in_bytes":353283160,"estimated_size":"336.9mb","overhead":1.0,"tripped":0}}}}}
2022.07.12 05:32:48 TRACE web[][es] time=687ms
2022.07.12 05:32:50 TRACE web[][sql] time=0ms | sql=select count(1) from ce_queue where status=? | params=PENDING
2022.07.12 05:32:50 TRACE web[][sql] time=0ms | sql=select ca.uuid, ca.task_type as taskType, ca.component_uuid as componentUuid, ca.main_component_uuid as mainComponentUuid, ca.analysis_uuid as analysisUuid, ca.status as status, ca.submitter_uuid as submitterUuid, ca.submitted_at as submittedAt, ca.worker_uuid as workerUuid, ca.started_at as startedAt, ca.executed_at as executedAt, ca.created_at as createdAt, ca.updated_at as updatedAt, ca.is_last as isLast, ca.is_last_key as isLastKey, ca.main_is_last as mainIsLast, ca.main_is_last_key as mainIsLastKey, ca.execution_time_ms as executionTimeMs, ca.error_message as errorMessage, ca.error_type as errorType , cast(case when csc.task_uuid is null then 0 else 1 end as bit) as hasScannerContext from ce_activity ca left outer join ce_scanner_context csc on csc.task_uuid = ca.uuid where ca.created_at > ? | params=1657603940528
2022.07.12 05:32:50 TRACE web[][sql] time=0ms | sql=select kee as "key", is_empty as empty, text_value as value, created_at as createdAt from internal_properties where kee in ( ? ) | params=sonarsource.license
2022.07.12 05:32:50 TRACE web[][sql] time=37ms | sql=select kee as "key", is_empty as empty, text_value as value, created_at as createdAt from internal_properties where kee in ( ? ) | params=sonarsource.license
2022.07.12 05:32:50 TRACE web[][sql] time=12ms | sql=select sum(sumncloc.maxncloc) from ( select b.project_uuid as projectUuid, max(lm.value) as maxncloc from live_measures lm inner join metrics m on m.uuid = lm.metric_uuid inner join project_branches b on b.uuid = lm.component_uuid inner join projects p on p.uuid = b.project_uuid and p.qualifier = 'TRK' WHERE m.name = ? group by b.project_uuid ) sumncloc | params=ncloc
2022.07.12 05:32:54 TRACE web[][sql] time=0ms | sql=select top (?) uuid, data, created_at from notifications order by created_at asc | params=1
2022.07.12 05:32:55 TRACE web[AYHKODuz17X4F5WzAArC][o.s.s.p.w.UserSessionFilter] Thread[http-nio-0.0.0.0-6968-exec-9,5,main] serves /api/system/logs
2022.07.12 05:32:55 TRACE web[AYHKODuz17X4F5WzAArC][sql] time=0ms | sql=select st.uuid as uuid, st.user_uuid as "userUuid", st.expiration_date as "expirationDate", st.created_at as "createdAt", st.updated_at as "updatedAt" from session_tokens st where st.uuid=? | params=AYHKR7yMp4_s1bweF47l
2022.07.12 05:32:55 TRACE web[AYHKODuz17X4F5WzAArC][sql] time=0ms | sql=SELECT u.uuid as uuid, u.login as login, u.name as name, u.email as email, u.active as "active", u.scm_accounts as "scmAccounts", u.salt as "salt", u.crypted_password as "cryptedPassword", u.hash_method as "hashMethod", u.external_id as "externalId", u.external_login as "externalLogin", u.external_identity_provider as "externalIdentityProvider", u.user_local as "local", u.is_root as "root", u.onboarded as "onboarded", u.reset_password as "resetPassword", u.homepage_type as "homepageType", u.homepage_parameter as "homepageParameter", u.last_connection_date as "lastConnectionDate", u.last_sonarlint_connection as "lastSonarlintConnectionDate", u.sonarlint_ad_seen as "sonarlintAdSeen", u.created_at as "createdAt", u.updated_at as "updatedAt" FROM users u WHERE u.uuid=? | params=AX74iYOFupsJMRaitjkd
2022.07.12 05:32:55 TRACE web[AYHKODuz17X4F5WzAArC][sql] time=0ms | sql=select gr.role from group_roles gr inner join groups_users gu on gr.group_uuid=gu.group_uuid where gr.component_uuid is null and gu.user_uuid=? union select gr.role from group_roles gr where gr.group_uuid is null and gr.component_uuid is null union select ur.role from user_roles ur where ur.user_uuid=? and ur.component_uuid is null | params=AX74iYOFupsJMRaitjkd, AX74iYOFupsJMRaitjkd

Hi,

I don’t see any errors there, and you don’t need logging at TRACE level to find a startup problem. I suggest you tune the log level back down and check all your server logs to see if there are any ERRORs.

 
Ann