How DO I upgrade sonar qube

I am using sonaqube 7.9.2 and want to upgrade to latest one. I have installed the sonarqube on linux server. I follow the use guild and I downloaded the lateses sonarqube.I see the follwoing error when I try to pull,


docker: Error response from daemon: pull access denied for sonar, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'

My Command is following

sudo docker run -d --name sonarqube -p 9003:9000 -e SONAR_JDBC_USERNAME= sonar -e SONAR_JDBC_PASSWORD= xxx -v sonarqube_data:/opt/sonarqube/data -v sonarqube_logs:/opt/sonarqube/logs sonarqube

I also login to docker
What is missing . ? Thanks in Advance for help.

Hi @Tauqeer_Ahmad ,

as you are comming from a older version, you will need to version hop as described in the upgrade guide. You will also have to probably manually remove all the plugins from the data named volume in order to make the upgrade happen smoothly (more information in the LTS to LTS upgrade notes).

as for the authentication required message during the docker pull, you have a whitespece in between the env statements key/value specification, resulting the docker cli to search for a sonar image (which does not exist) instead of a sonarqube image. The command should look like this:

sudo docker run -d --name sonarqube -p 9003:9000 -e SONAR_JDBC_USERNAME=sonar -e SONAR_JDBC_PASSWORD=xxx -v sonarqube_data:/opt/sonarqube/data -v sonarqube_logs:/opt/sonarqube/logs sonarqube

Hi, I follow this guide and the upgrade was sucessfull. How ever the contanier is close after start. Now I dont have old or the new sonarqube. As per plugines, my instalation didnt had any plugines installed.

Previously all language analyzers were called plug-ins, so if you were really coming from this older version I think you should have some.

Anything in the docker logs from this container?

1 Like
Dropping Privileges
2022.05.02 12:18:50 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2022.05.02 12:18:50 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:36393]
    2022.05.02 12:18:50 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
    could not find java in ES_JAVA_HOME at /usr/lib/jvm/java-11-openjdk/bin/java
    2022.05.02 12:18:50 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
    2022.05.02 12:18:50 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
    2022.05.02 12:18:50 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
    2022.05.02 12:18:50 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
      [1]: https://github.com/SonarSource/docker-sonarqube/issues/493
  [1]: https://github.com/SonarSource/docker-sonarqube/issues/493

I think this is the other issue that you were describing here, so let’s close this thread :wink:

1 Like