Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonarqube server does not start when scaled vertically along with this plugin #1044

Open
bshrinidhi opened this issue Feb 19, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@bshrinidhi
Copy link

Describe the bug
I have deployed sonarqube 10.3 community edition using helm chart with default JVM parameters . Added this plugin for PR analysis. Due to large no.of projects and lines of code, we had to scale the system with higher JVM values with below values

  sonar.search.javaOpts: -Xmx2G -Xms2G -XX:MaxDirectMemorySize=2G -XX:+HeapDumpOnOutOfMemoryError
  sonar.web.javaOpts: -Xmx2G -XX:+HeapDumpOnOutOfMemoryError
  sonar.ce.javaOpts: -Xmx3G -XX:+HeapDumpOnOutOfMemoryError

and increased the sonarqube deployment's resources to

resources:
  limits:
    cpu: 8
    memory: 16Gi
  requests:
    cpu: 1
    memory: 8Gi

But with this changes sonarqube server does not start. Readiness probe fails. Readiness probe hits localhost:9000/api/system/status and it returns STARTING indefinitely. LOGS are stuck after this line

2025.02.18 05:24:30 INFO  web[][o.h.v.i.util.Version] HV000001: Hibernate Validator null
2025.02.18 05:24:30 DEBUG web[][o.h.v.m.ResourceBundleMessageInterpolator] Loaded expression factory via original TCCL
2025.02.18 05:24:30 DEBUG web[][o.h.v.i.e.AbstractConfigurationImpl] Setting custom MessageInterpolator of type org.springframework.validation.beanvalidation.LocaleContextMessageInterpolator
2025.02.18 05:24:30 DEBUG web[][o.h.v.i.e.AbstractConfigurationImpl] Setting custom ConstraintValidatorFactory of type org.springframework.validation.beanvalidation.SpringConstraintValidatorFactory
2025.02.18 05:24:30 DEBUG web[][o.h.v.i.e.AbstractConfigurationImpl] Setting custom ParameterNameProvider of type org.springframework.validation.beanvalidation.LocalValidatorFactoryBean$1
2025.02.18 05:24:30 DEBUG web[][o.h.v.i.x.c.ValidationXmlParser] Trying to load META-INF/validation.xml for XML based Validator configuration.
2025.02.18 05:24:30 DEBUG web[][o.h.v.i.x.c.ResourceLoaderHelper] Trying to load META-INF/validation.xml via user class loader
2025.02.18 05:24:30 DEBUG web[][o.h.v.i.x.c.ResourceLoaderHelper] Trying to load META-INF/validation.xml via TCCL
2025.02.18 05:24:30 DEBUG web[][o.h.v.i.x.c.ResourceLoaderHelper] Trying to load META-INF/validation.xml via Hibernate Validator's class loader
2025.02.18 05:24:30 DEBUG web[][o.h.v.i.x.c.ValidationXmlParser] No META-INF/validation.xml found. Using annotation based configuration only.
2025.02.18 05:24:30 DEBUG web[][o.h.v.i.e.r.TraversableResolvers] Cannot find javax.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable.
2025.02.18 05:24:30 DEBUG web[][o.h.v.i.e.ValidatorFactoryConfigurationHelper] HV000252: Using org.hibernate.validator.internal.engine.DefaultPropertyNodeNameProvider as property node name provider.
2025.02.18 05:24:30 DEBUG web[][o.h.v.i.e.ValidatorFactoryConfigurationHelper] HV000234: Using org.springframework.validation.beanvalidation.LocaleContextMessageInterpolator as ValidatorFactory-scoped message interpolator.
2025.02.18 05:24:30 DEBUG web[][o.h.v.i.e.ValidatorFactoryConfigurationHelper] HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.
2025.02.18 05:24:30 DEBUG web[][o.h.v.i.e.ValidatorFactoryConfigurationHelper] HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
2025.02.18 05:24:30 DEBUG web[][o.h.v.i.e.ValidatorFactoryConfigurationHelper] HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
2025.02.18 05:24:30 DEBUG web[][o.h.v.i.e.ValidatorFactoryConfigurationHelper] HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
2025.02.18 05:24:30 DEBUG web[][o.s.s.a.TomcatAccessLog] Tomcat is started
2025.02.18 05:24:56 DEBUG web[][c.z.h.p.HikariPool] HikariPool-1 - Before cleanup stats (total=10, active=1, idle=9, waiting=0)
2025.02.18 05:24:56 DEBUG web[][c.z.h.p.HikariPool] HikariPool-1 - After cleanup  stats (total=10, active=1, idle=9, waiting=0)
2025.02.18 05:24:56 DEBUG web[][o.postgresql.Driver] Connecting with URL: jdbc:postgresql://sonarqube-postgresql:5432/sonarDB
2025.02.18 05:24:56 DEBUG web[][o.p.c.v.ConnectionFactoryImpl] Trying to establish a protocol version 3 connection to sonarqube-postgresql:5432
2025.02.18 05:24:56 DEBUG web[][o.p.c.v.ConnectionFactoryImpl] Receive Buffer Size is 43,690
2025.02.18 05:24:56 DEBUG web[][o.p.c.v.ConnectionFactoryImpl] Send Buffer Size is 43,520
2025.02.18 05:24:56 DEBUG web[][c.z.h.p.HikariPool] HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@74004aaf
2025.02.18 05:24:56 DEBUG web[][c.z.h.p.HikariPool] HikariPool-1 - After adding stats (total=11, active=1, idle=10, waiting=0)
2025.02.18 05:25:26 DEBUG web[][c.z.h.p.HikariPool] HikariPool-1 - Before cleanup stats (total=11, active=1, idle=10, waiting=0)
2025.02.18 05:25:26 DEBUG web[][c.z.h.p.HikariPool] HikariPool-1 - After cleanup  stats (total=11, active=1, idle=10, waiting=0)
2025.02.18 05:25:26 DEBUG web[][c.z.h.p.HikariPool] HikariPool-1 - Fill pool skipped, pool has sufficient level or currently being filled (queueDepth=0).
2025.02.18 05:25:56 DEBUG web[][c.z.h.p.HikariPool] HikariPool-1 - Before cleanup stats (total=11, active=1, idle=10, waiting=0)
2025.02.18 05:25:56 DEBUG web[][c.z.h.p.HikariPool] HikariPool-1 - After cleanup  stats (total=11, active=1, idle=10, waiting=0)
2025.02.18 05:25:56 DEBUG web[][c.z.h.p.HikariPool] HikariPool-1 - Fill pool skipped, pool has sufficient level or currently being filled (queueDepth=0).
2025.02.18 05:26:24 DEBUG es[][o.e.m.f.FsHealthService] health check completed

Removing the plugin and re-deploying the chart with same JVM parameter override works fine. There was nothing in the logs of all the services(access.log, ce.log, es.log, web.log) that was helpful either.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy sonarqube 10.3 community edition helm chart with updated values.yaml with below
plugins:
  install:
    - "https://github.com/dmeiners88/sonarqube-prometheus-exporter/releases/download/v1.0.0-SNAPSHOT-2018-07-04/sonar-prometheus-exporter-1.0.0-SNAPSHOT.jar"
    - "https://repo1.maven.org/maven2/io/github/sfeir-open-source/sonar-clover-plugin/4.1/sonar-clover-plugin-4.1.jar"
    - "https://github.com/mc1arke/sonarqube-community-branch-plugin/releases/download/1.18.0/sonarqube-community-branch-plugin-1.18.0.jar"
resources:
  limits:
    cpu: 8
    memory: 16Gi
  requests:
    cpu: 1
    memory: 8Gi
sonarProperties:
  sonar.search.javaOpts: -Xmx2G -Xms2G -XX:MaxDirectMemorySize=2G -XX:+HeapDumpOnOutOfMemoryError
  sonar.web.javaOpts: -Xmx2G -XX:+HeapDumpOnOutOfMemoryError
  sonar.ce.javaOpts: -Xmx3G -XX:+HeapDumpOnOutOfMemoryError
  sonar.web.javaAdditionalOpts: "-javaagent:/opt/sonarqube/extensions/plugins/sonarqube-community-branch-plugin-1.18.0.jar=web"
  sonar.ce.javaAdditionalOpts: "-javaagent:/opt/sonarqube/extensions/plugins/sonarqube-community-branch-plugin-1.18.0.jar=ce"
  1. See sonarqube pod not in ready state.

Expected behavior
Sonarqube server starting successfully
Screenshots
If applicable, add screenshots to help explain your problem.

Software Versions

  • SonarQube Version: Version 10.3 (build 26217)
  • Plugin Version: 1.18.0

Additional context
Also set log level to DEBUG for all 4 services using

  sonar.log.level: DEBUG
  sonar.log.level.app: DEBUG
  sonar.log.level.web: DEBUG
  sonar.log.level.ce: DEBUG
  sonar.log.level.es: DEBUG
@bshrinidhi bshrinidhi added the bug Something isn't working label Feb 19, 2025
@bshrinidhi
Copy link
Author

Also please note, the plugin worked well without modifying the JVM parameters for vertical scaling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant