Hello, I am trying install on SonarQube on Kubernetes and the plugin installation is failing. Hope you can help me to figure out what is wrong, I am brand new to this, my apologies if it is something dummy.
So, the Sonarqube gets up, but I do not have any language, cannot create quality profiles or rules. Logs do not prompt any error, but some warnings (attached at the end). I do not know what is missing on the setup.
Details:
- SonarQube 9.6
- Client Version: 1.26
- Server Version: 1.25
- External MsSql DB
- FTP server for volumes
Here is the yml, I have applied some forum’s suggestions already without success.
apiVersion: apps/v1
kind: Deployment
metadata:
name: sonarqube
namespace: sonarqube
labels:
app: sonarqube
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: sonarqube
template:
metadata:
labels:
app: sonarqube
spec:
terminationGracePeriodSeconds: 15
nodeSelector:
kubernetes.io/os: linux
initContainers:
- name: sonarqube-es-init
image: busybox:1.27.2
command: ['sysctl', '-w', 'vm.max_map_count=262144']
securityContext:
privileged: true
- name: fix-the-volume-permission
image: busybox
command:
- sh
- -c
- chown -R 1000:1000 /opt/sonarqube/extensions
securityContext:
privileged: true
volumeMounts:
- name: app-pvc-extensions
mountPath: /opt/sonarqube/extensions
- name: fix-the-volume-permission1
image: busybox
command:
- sh
- -c
- chown -R 1000:1000 /opt/sonarqube/data
securityContext:
privileged: true
volumeMounts:
- name: app-pvc-data
mountPath: /opt/sonarqube/data
containers:
- name: sonarqube
image: sonarqube:9.6.0-community
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9000
envFrom:
- configMapRef:
name: sonarqube-config
env:
- name: SONARQUBE_JDBC_USERNAME
valueFrom:
secretKeyRef:
name: sonarqube-secret
key: username
- name: SONARQUBE_JDBC_PASSWORD
valueFrom:
secretKeyRef:
name: sonarqube-secret
key: password
volumeMounts:
- name: app-pvc-data
mountPath: "/opt/sonarqube/data/"
- name: app-pvc-extensions
mountPath: "/opt/sonarqube/extensions/"
- name: app-pvc-lib-extensions
mountPath: "/opt/sonarqube/lib/extensions/"
- name: app-pvc-logs
mountPath: "/opt/sonarqube/logs/"
resources:
requests:
memory: "3000Mi"
cpu: "1000m"
limits:
memory: "4000Mi"
cpu: "6000m"
volumes:
- name: app-pvc-data
persistentVolumeClaim:
claimName: sonarqube-data
- name: app-pvc-extensions
persistentVolumeClaim:
claimName: sonarqube-extensions
- name: app-pvc-lib-extensions
persistentVolumeClaim:
claimName: sonarqube-lib-extensions
- name: app-pvc-logs
persistentVolumeClaim:
claimName: sonarqube-logs
Here are the logs.
2023.01.06 18:25:51 INFO web[][o.s.p.ProcessEntryPoint] Starting Web Server
2023.01.06 18:25:53 INFO web[][o.s.s.p.LogServerVersion] SonarQube Server / 9.6.0.59041 / 688f079e390ba7e89a412b29fe464dbdf3c19908
2023.01.06 18:25:53 INFO web[][o.sonar.db.Database] Create JDBC data source for jdbc:sqlserver://192.168.2.82;databaseName=sonarqube_kubernetes;integratedSecurity=false;encrypt=false;trustServerCertificate=true;
2023.01.06 18:25:55 INFO web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: /opt/sonarqube
2023.01.06 18:25:55 INFO web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2023.01.06 18:25:55 INFO web[][o.s.s.p.d.m.c.MssqlCharsetHandler] Verify that database collation is case-sensitive and accent-sensitive
2023.01.06 18:25:56 INFO web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [http://localhost:9001]
2023.01.06 18:25:56 WARN web[][o.s.a.s.w.WebService$Action] Description is not set on action api/monitoring/metrics
2023.01.06 18:25:56 WARN web[][o.s.a.s.w.WebService$Action] Since is not set on action api/monitoring/metrics
2023.01.06 18:25:56 WARN web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/monitoring/metrics
2023.01.06 18:25:56 WARN web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/system/liveness
2023.01.06 18:25:56 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceFilter@4bf4680c [pattern=UrlPattern{inclusions=[/api/system/migrate_db.*, ...], exclusions=[/api/components/update_key, ...]}]
2023.01.06 18:25:57 INFO web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2023.01.06 18:25:57 INFO web[][o.s.s.p.DetectPluginChange] Detect plugin changes
2023.01.06 18:25:57 INFO web[][o.s.s.p.DetectPluginChange] No plugin change detected
2023.01.06 18:25:58 INFO web[][o.s.s.e.IndexCreator] Create index [metadatas]
2023.01.06 18:26:01 INFO web[][o.s.s.e.IndexCreator] Create type metadatas/metadata
2023.01.06 18:26:02 INFO web[][o.s.s.e.IndexCreator] Create index [components]
2023.01.06 18:26:08 INFO web[][o.s.s.e.IndexCreator] Create type components/auth
2023.01.06 18:26:09 INFO web[][o.s.s.e.IndexCreator] Create index [projectmeasures]
2023.01.06 18:26:14 INFO web[][o.s.s.e.IndexCreator] Create type projectmeasures/auth
2023.01.06 18:26:15 INFO web[][o.s.s.e.IndexCreator] Create index [rules]
2023.01.06 18:26:19 INFO web[][o.s.s.e.IndexCreator] Create type rules/rule
2023.01.06 18:26:19 INFO web[][o.s.s.e.IndexCreator] Create index [issues]
2023.01.06 18:26:25 INFO web[][o.s.s.e.IndexCreator] Create type issues/auth
2023.01.06 18:26:26 INFO web[][o.s.s.e.IndexCreator] Create index [users]
2023.01.06 18:26:29 INFO web[][o.s.s.e.IndexCreator] Create type users/user
2023.01.06 18:26:29 INFO web[][o.s.s.e.IndexCreator] Create index [views]
2023.01.06 18:26:35 INFO web[][o.s.s.e.IndexCreator] Create type views/view
2023.01.06 18:26:35 INFO web[][o.s.s.s.LogServerId] Server ID: B6238B39-AXNuhy2m_n9oy1M5Bhxl
2023.01.06 18:26:36 INFO web[][o.s.s.p.UpdateCenterClient] Update center: https://update.sonarsource.org/update-center.properties (no proxy)
2023.01.06 18:26:37 WARN web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/system/liveness
2023.01.06 18:26:37 WARN web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/plugins/download
2023.01.06 18:26:37 WARN web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/analysis_cache/get
2023.01.06 18:26:37 WARN web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/alm_integrations/check_pat
2023.01.06 18:26:37 WARN web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/push/sonarlint_events
2023.01.06 18:26:37 INFO web[][o.s.s.a.p.ExpiredSessionsCleaner] Purge of expired session tokens has removed 3 elements
2023.01.06 18:26:37 INFO web[][o.s.s.n.NotificationDaemon] Notification service started (delay 60 sec.)
2023.01.06 18:26:37 INFO web[][o.s.s.a.p.ExpiredSessionsCleaner] Purge of expired SAML message ids has removed 0 elements
2023.01.06 18:26:37 INFO web[][o.s.s.t.TelemetryDaemon] Sharing of SonarQube statistics is enabled.
2023.01.06 18:26:37 INFO web[][o.s.s.s.GeneratePluginIndex] Generate scanner plugin index
2023.01.06 18:26:37 INFO web[][o.s.s.s.RegisterPermissionTemplates] Register permission templates
2023.01.06 18:26:37 INFO web[][o.s.s.s.RenameDeprecatedPropertyKeys] Rename deprecated property keys
2023.01.06 18:26:37 INFO web[][o.s.s.s.RegisterPlugins] Register plugins
2023.01.06 18:26:37 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.SonarLintConnectionFilter@2cef8390 [pattern=UrlPattern{inclusions=[/api/*], exclusions=[]}]
2023.01.06 18:26:37 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceFilter@5d0b1d5d [pattern=UrlPattern{inclusions=[/api/issues/delete_comment.*, ...], exclusions=[/api/authentication/login.*, ...]}]
2023.01.06 18:26:37 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceReroutingFilter@3130a6d [pattern=UrlPattern{inclusions=[/api/components/bulk_update_key, ...], exclusions=[]}]
2023.01.06 18:26:37 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.DefaultAdminCredentialsVerifierFilter@44cd5059 [pattern=UrlPattern{inclusions=[/*], exclusions=[*.css, ...]}]
2023.01.06 18:26:37 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.InitFilter@146eb853 [pattern=UrlPattern{inclusions=[/sessions/init/*], exclusions=[]}]
2023.01.06 18:26:37 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.OAuth2CallbackFilter@110abe76 [pattern=UrlPattern{inclusions=[/oauth2/callback/*], exclusions=[]}]
2023.01.06 18:26:37 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.ResetPasswordFilter@a519e58 [pattern=UrlPattern{inclusions=[/*], exclusions=[*.css, ...]}]
2023.01.06 18:26:37 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.ws.LoginAction@57776231 [pattern=UrlPattern{inclusions=[/api/authentication/login], exclusions=[]}]
2023.01.06 18:26:37 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.ws.LogoutAction@6f34d99f [pattern=UrlPattern{inclusions=[/api/authentication/logout], exclusions=[]}]
2023.01.06 18:26:37 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.ws.ValidateAction@695f75bd [pattern=UrlPattern{inclusions=[/api/authentication/validate], exclusions=[]}]
2023.01.06 18:26:37 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.user.ws.ChangePasswordAction@24b048d3 [pattern=UrlPattern{inclusions=[/api/users/change_password], exclusions=[]}]
2023.01.06 18:26:37 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.plugins.PluginsRiskConsentFilter@45fdd036 [pattern=UrlPattern{inclusions=[/*], exclusions=[*.css, ...]}]
2023.01.06 18:26:37 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [rules/rule/activeRule]...
2023.01.06 18:26:41 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [rules/rule/activeRule] done | time=3890ms
2023.01.06 18:26:41 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [rules/rule]...
2023.01.06 18:26:54 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [rules/rule] done | time=12907ms
2023.01.06 18:26:54 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [users/user]...
2023.01.06 18:26:57 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [users/user] done | time=2737ms
2023.01.06 18:26:57 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [projectmeasures/auth/projectmeasure]...
2023.01.06 18:27:01 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [projectmeasures/auth/projectmeasure] done | time=4250ms
2023.01.06 18:27:01 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [components/auth/component]...
2023.01.06 18:27:06 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [components/auth/component] done | time=4242ms
2023.01.06 18:27:06 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [views/view]...
2023.01.06 18:27:07 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of type [views/view] done | time=1887ms
2023.01.06 18:27:07 INFO web[][o.s.s.e.IndexerStartupTask] Trigger asynchronous indexing of type [issues/auth/issue]...
2023.01.06 18:27:07 INFO web[][o.s.s.i.i.AsyncIssueIndexingImpl] 0 pending indexation task found to be deleted...
2023.01.06 18:27:07 INFO web[][o.s.s.i.i.AsyncIssueIndexingImpl] 0 completed indexation task found to be deleted...
2023.01.06 18:27:08 INFO web[][o.s.s.i.i.AsyncIssueIndexingImpl] Indexation task deletion complete.
2023.01.06 18:27:08 INFO web[][o.s.s.i.i.AsyncIssueIndexingImpl] Deleting tasks characteristics...
2023.01.06 18:27:08 INFO web[][o.s.s.i.i.AsyncIssueIndexingImpl] Tasks characteristics deletion complete.
2023.01.06 18:27:08 INFO web[][o.s.s.i.i.AsyncIssueIndexingImpl] 17 branch found in need of issue sync.
2023.01.06 18:27:08 INFO web[][o.s.s.i.i.AsyncIssueIndexingImpl] 17 projects found in need of issue sync.
2023.01.06 18:27:08 INFO web[][o.s.s.e.IndexerStartupTask] Trigger asynchronous indexing of type [issues/auth/issue] done | time=994ms
2023.01.06 18:27:08 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of types [components/auth],[projectmeasures/auth],[issues/auth]...
2023.01.06 18:27:19 INFO web[][o.s.s.e.IndexerStartupTask] Indexing of types [components/auth],[projectmeasures/auth],[issues/auth] done | time=10729ms
2023.01.06 18:27:19 INFO web[][o.s.s.q.ProjectsInWarningDaemon] Counting number of projects in warning is not started as there are no projects in this situation.
2023.01.06 18:27:19 INFO web[][o.s.s.p.p.PlatformLevelStartup] Running Community Edition
2023.01.06 18:27:20 INFO web[][o.s.s.p.Platform] Web Server is operational
Please, let me know if you need any other detail. Thanks in advance