Git Product home page Git Product logo

Comments (5)

gregory109 avatar gregory109 commented on July 22, 2024

Hello, @Alok650

Upgrading SonarQube can be a bit tricky, but I’m here to help! Let’s explore the optimal approach for upgrading your existing SonarQube setup with minimum downtime.

Database Migration Approach:
Setting up a new SonarQube instance using the 9.9.4 AMI and migrating the Postgres database data is a valid approach.
However, as you mentioned, this method requires downtime and can be challenging due to changes in the Postgres version.
To minimize downtime, consider scheduling the migration during off-peak hours or when the system load is low.
Ensure that you thoroughly test the migration process in a non-production environment before applying it to the live system.
In-Place Upgrade Approach:
Upgrading the existing EC2 setup directly is another option.
Here are the steps to follow for an in-place upgrade:
Backup: Before proceeding, take a backup of your existing SonarQube installation, including the database.
Java Version: Confirm that you’ve installed Java 17 (as SonarQube 9.9.4 requires it).
Download SonarQube 9.9.4: Download the SonarQube 9.9.4 distribution as a zip file.
Replace Existing Installation:
Unzip the downloaded SonarQube 9.9.4 zip file.
Replace the existing SonarQube folder inside the Bitnami installation directory with the new one.
Configuration Update:
Update the sonar.properties and wrapper.conf files in the new SonarQube installation with the settings from the old installation (web server URL, database, LDAP settings, etc.).
Be cautious not to copy-paste the entire old files; only update the relevant settings.
Restart Services:
Restart the Bitnami service to apply the changes.
Check the logs for any errors during startup (as you’ve encountered exit code 1).
Test: Verify that SonarQube is up and running with the new version.
Monitor: Keep an eye on system performance and stability after the upgrade.

Best Regard,

EDIT: @gongomgra removed third-party links

from vms.

Alok650 avatar Alok650 commented on July 22, 2024

@gregory109 I tried updating the whole /opt folder itself, which includes Java and sonarqube, but it failed. will try with just java and sonarqube folders inside /opt. Also in my current ami I have two folders i.e. stack (at ~) and /opt/bitnami - both contain the same content i.e. sonarqube, java, apache and other components required. Why is this duplicity there?

Also the logs folder inside sonraqube is empty when I restart bitnami and sonarqube fails. Any other place to get specific logs?

from vms.

Alok650 avatar Alok650 commented on July 22, 2024

@gregory109 I attempted the second approach. currently sonarqube fails to restart. These are the logs inside sonar.log:

2024.06.24 11:11:10 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/bitnami/sonarqube/temp
2024.06.24 11:11:10 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:39701]
2024.06.24 11:11:11 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/bitnami/sonarqube/elasticsearch]: /opt/bitnami/sonarqube/elasticsearch/bin/elasticsearch
2024.06.24 11:11:11 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.06.24 11:11:12 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2024.06.24 11:11:12 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [/opt/bitnami/sonarqube]: /opt/bitnami/java/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/bitnami/sonarqube/temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx971m -Xms388m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-9.9.5.90363.jar:/opt/bitnami/sonarqube/lib/jdbc/postgresql/postgresql-42.5.1.jar org.sonar.server.app.WebServer /opt/bitnami/sonarqube/temp/sq-process16879507935916711793properties
2024.06.24 11:11:13 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [Web Server]: 1
2024.06.24 11:11:13 INFO  app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2024.06.24 11:11:13 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2024.06.24 11:11:13 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2024.06.24 11:11:13 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

from vms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.