How to cleanly shutdown containerised SonarQube?

Running SonarQube Developer Edition version: 10.4.1.88267 as a Fargate container in AWS with /opt/sonarqube/data, /opt/sonarqube/logs & /opt/sonarqube/extensions as mounted EFS filesystems

Is there a way to cleanly shutdown Sonarqube? I’ve found references to a shutdown button in the UI but this version doesn’t have one.
At the moment when upgrading versions I have to:

  • connect to the running container
  • rm /opt/sonarqube/data/es8/node.lock && rm /opt/sonarqube/data/es8/_state/write.lock
  • in the AWS console, scale the number of tasks to zero (which shuts down Sonarqube)

If there was a method to cleanly shutdown Sonarqube (and remove the ES lock files), it would simplify the upgrade process.

hello @PabPsion, thanks a lot for taking the time to participate in the community.

Could you share some more details on how you run SonarQube in fargate?

To address your point, SonarQube does handle quite well the interruption signal, so if you send one and let SonarQube shut down itself, everything should be handled well.

1 Like