Sonarqube community edition installation error in RHEL-7.5

Hi,

I’m trying to install Sonarqube community edition (6.7.5) in RHEL-7.5 with Docker compose files (for app & db), but in when i do tail the app service (docker service logs -f sonarqube_app), I’m getting below errors, could you please let me know, what could be causing the issue. Thank you.

logFilenamePrefix=es]] from /opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonarqube/temp/conf/es
sonarqube_app.1.rjzyupd4f8px@xxxx](sonarqube_app.1.rjzyupd4f8px@xxxx) 2018.12.28 06:50:59 INFO app]o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
sonarqube_app.1.xbo88e91hnvh@xxxx](sonarqube_app.1.xbo88e91hnvh@xxxx) 2018.12.28 06:50:53 WARN app]o.s.a.p.AbstractProcessMonitor] Process exited with exit value es]: 1
sonarqube_app.1.d8g9hwvtmzv2@xxxx](sonarqube_app.1.d8g9hwvtmzv2@xxxx) 2018.12.28 06:51:15 INFO app]o.s.a.p.ProcessLauncherImpl] Launch processkey='es', ipcIndex=1, logFilenamePrefix=es]] from /opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonarqube/temp/conf/es
sonarqube_app.1.na5kxpj19ms7@xxxx](sonarqube_app.1.na5kxpj19ms7@xxxx) 2018.12.28 06:51:09 INFO app]o.s.a.SchedulerImpl] Process es] is stopped
sonarqube_app.1.d8g9hwvtmzv2@xxxx](sonarqube_app.1.d8g9hwvtmzv2@xxxx) 2018.12.28 06:51:15 INFO app]o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
sonarqube_app.1.rjzyupd4f8px@xxxx](sonarqube_app.1.rjzyupd4f8px@xxxx) 2018.12.28 06:51:00 INFO app]o.e.p.PluginsService] no modules loaded
sonarqube_app.1.xbo88e91hnvh@xxxx](sonarqube_app.1.xbo88e91hnvh@xxxx) 2018.12.28 06:50:53 INFO app]o.s.a.SchedulerImpl] Process es] is stopped
sonarqube_app.1.rjzyupd4f8px@xxxx](sonarqube_app.1.rjzyupd4f8px@xxxx) 2018.12.28 06:51:00 INFO app]o.e.p.PluginsService] loaded plugin org.elasticsearch.transport.Netty4Plugin]
sonarqube_app.1.na5kxpj19ms7@xxxx](sonarqube_app.1.na5kxpj19ms7@xxxx) 2018.12.28 06:51:09 INFO app]o.s.a.SchedulerImpl] SonarQube is stopped
sonarqube_app.1.d8g9hwvtmzv2@xxxx](sonarqube_app.1.d8g9hwvtmzv2@xxxx) 2018.12.28 06:51:16 INFO app]o.e.p.PluginsService] no modules loaded
sonarqube_app.1.d8g9hwvtmzv2@xxxx](sonarqube_app.1.d8g9hwvtmzv2@xxxx) 2018.12.28 06:51:16 INFO app]o.e.p.PluginsService] loaded plugin org.elasticsearch.transport.Netty4Plugin]
sonarqube_app.1.xbo88e91hnvh@xxxx](sonarqube_app.1.xbo88e91hnvh@xxxx) 2018.12.28 06:50:53 INFO app]o.s.a.SchedulerImpl] SonarQube is stopped
sonarqube_app.1.rjzyupd4f8px@xxxx](sonarqube_app.1.rjzyupd4f8px@xxxx) 2018.12.28 06:51:01 WARN app]o.s.a.p.AbstractProcessMonitor] Process exited with exit value es]: 1
sonarqube_app.1.rjzyupd4f8px@xxxx](sonarqube_app.1.rjzyupd4f8px@xxxx) 2018.12.28 06:51:01 INFO app]o.s.a.SchedulerImpl] Process es] is stopped
sonarqube_app.1.d8g9hwvtmzv2@xxxx](sonarqube_app.1.d8g9hwvtmzv2@xxxx) 2018.12.28 06:51:17 WARN app]o.s.a.p.AbstractProcessMonitor] Process exited with exit value es]: 1
sonarqube_app.1.d8g9hwvtmzv2@xxxx](sonarqube_app.1.d8g9hwvtmzv2@xxxx) 2018.12.28 06:51:17 INFO app]o.s.a.SchedulerImpl] Process es] is stopped
sonarqube_app.1.rjzyupd4f8px@xxxx](sonarqube_app.1.rjzyupd4f8px@xxxx) 2018.12.28 06:51:01 INFO app]o.s.a.SchedulerImpl] SonarQube is stopped
sonarqube_app.1.d8g9hwvtmzv2@xxxx](sonarqube_app.1.d8g9hwvtmzv2@xxxx) 2018.12.28 06:51:17 INFO app]o.s.a.SchedulerImpl] SonarQube is stopped
sonarqube_app.1.uvl57btg1u00@xxxx](sonarqube_app.1.uvl57btg1u00@xxxx) 2018.12.28 06:51:24 INFO app]o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
sonarqube_app.1.uvl57btg1u00@xxxx](sonarqube_app.1.uvl57btg1u00@xxxx) 2018.12.28 06:51:24 INFO app]o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
sonarqube_app.1.uvl57btg1u00@xxxx](sonarqube_app.1.uvl57btg1u00@xxxx) 2018.12.28 06:51:24 WARN app]o.s.a.es.EsSettings] Elasticsearch HTTP connector is enabled on port 9002. MUST NOT BE USED FOR PRODUCTION
sonarqube_app.1.uvl57btg1u00@xxxx](sonarqube_app.1.uvl57btg1u00@xxxx) 2018.12.28 06:51:24 INFO app]o.s.a.p.ProcessLauncherImpl] Launch processkey='es', ipcIndex=1, logFilenamePrefix=es]] from /opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonarqube/temp/conf/es
sonarqube_app.1.uvl57btg1u00@xxxx](sonarqube_app.1.uvl57btg1u00@xxxx) 2018.12.28 06:51:24 INFO app]o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running

And also for some reason both the app & db containers and services are creating & removing automatically within 5-10 seconds.

Hi,

This log snippet doesn’t show any errors. Perhaps you’ll find them in the other logs.

 
Ann

Hi,

Thanks for the response. I was trying to install SonarQube by using Docker, but for some reason it does not work. And i tried standard installation it works.

But when access the SonarQube (after setting DNS name to server IP), by default (/about) is added automatically. Is this expected ? http://sonarqube-test.xxx.in/about

Can you please let me know how can I remove it (/about at the end)?

Thank you.

I have started docker run -d --name sonar -p 9000:9000 sonarqube:lts and welcome page is on /about. This is just a redirect for any not logged in user. As soon as you login with admin:admin then default page will be /projects.

2 Likes

Thanks a lot for the response. I got it now.

But previously, I was trying to set up SonarQube with Docker in Docker-swarm mode (with compose files) with 3 services (App, DB & Proxy). So when I ran the services, App and DB services are getting failed up and down automatically. And I observed the errors posted in this post. Do you have any idea on how can solve this?

these are the errors.

We are running SQ 7.6 Dev Edition in as a docker container, no swarm. Postgres is running on the same host also in docker nearby. HTTPS reverse proxy is on another VM. So this is constellation. Might be that your installation lacks RAM (physical or allowed, cannot tell much about this, sorry). We have a sonar.properties file that configures some options in the setup.

Check these two options out. One should be for engine and another for elastic search.

sonar.ce.javaOpts=-XX:+UseG1GC -Xmx3G -Xms1G -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/sonarqube/data/dumps -Djava.security.egd=file:/dev/urandom -Djava.net.preferIPv4Stack=true
sonar.search.javaOpts=-Xms2G -Xmx3G -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/sonarqube/data/dumps -Djava.security.egd=file:/dev/urandom -Djava.net.preferIPv4Stack=true

In the environment to sonar container we also have this
SONARQUBE_JDBC_URL: “{{ sonarqube_jdbc_url }}”
SONARQUBE_WEB_JVM_OPTS: “-XX:+UseG1GC -Xms1G -Xmx2G -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/sonarqube/data/dumps -Djava.security.egd=file:/dev/urandom -Djava.net.preferIPv4Stack=true”

SONARQUBE_JDBC_URL have to be specified properly so that sonar can connect to the database. Hope this will help.

As another idea – try find the logs for Elastic search process.

On still running sonar container docker exec -it sonar cat /opt/sonarqube/logs/es.log.

Thanks a lot for the detailed explanation.

The containers are instantly become down (as respective services replicas=0/1) (so, I can’t connect to container to see es.log :frowning:

Think of starting from scratch if you have nothing to loose in your installation. Mount a volume to log folder if it is possible in swarm. Thus you’d be able to get some insight. Probably you need to think about port assignments in swarm. Whether database is acually accessible to sonar and elastic search at the ports they expect to access it or even each other.

There are also tricks how you can look into stopped container. Roughly commit container and then start is with something like bash overriding default entrypoint and/or command. Those are pretty much googlable. I do not know how to help you further.

1 Like

Hi, A million thanks for your suggestions and tips. I will investigate in all possible ways.