Docker-sonarqube: issue while sonarqube running in conatiner with volume

Created on 31 Jan 2019  Â·  10Comments  Â·  Source: SonarSource/docker-sonarqube

Hi,
when i was trying to run sonarqube latest community edition in docker container with volume mounted to it. container is exited with below logs

2019.01.31 07:35:38 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2019.01.31 07:35:38 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2019.01.31 07:35:38 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonarqube/temp/conf/es
2019.01.31 07:35:39 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2019.01.31 07:35:39 INFO app[][o.e.p.PluginsService] no modules loaded
2019.01.31 07:35:39 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2019.01.31 07:35:42 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
2019.01.31 07:35:42 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
2019.01.31 07:35:42 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped

can anyone help me out to solve this issue

Most helpful comment

Hi,

we had the same problem.
For us ,the problem was due to the migration of the image from alpine to debian.

Before in the alpine there was :
RUN addgroup -S sonarqube && adduser -S -G sonarqube sonarqube
The user was created with sid 100, gid 101 :
sonarqube:x:100:101:Linux User,,,:/home/sonarqube:/bin/false

Now, in the debian there is:
RUN groupadd -r sonarqube && useradd -r -g sonarqube sonarqube
The user is created with sid 999, gid 999 :
sonarqube:x:999:999::/home/sonarqube:

So, we just have to chown our volumes (data + extensions) to 999:999.

Regards,

Vincent

All 10 comments

I'm having the exact same issue.

try by changing volume directory permissions to 766

I just tried and still getting the error:

2019.02.01 12:53:30 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2019.02.01 12:53:30 INFO app[][o.e.p.PluginsService] no modules loaded
2019.02.01 12:53:30 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2019.02.01 12:53:31 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
2019.02.01 12:53:31 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
2019.02.01 12:53:31 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
2019.02.01 12:54:33 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2019.02.01 12:54:33 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2019.02.01 12:54:33 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonarqube/temp/conf/es

chmod 777 did it.

yes

noticed by the logs the issue was that I was running the container as root, and it seems that elasticsearch has issues with that! simply try to run with other user

Hi,

we had the same problem.
For us ,the problem was due to the migration of the image from alpine to debian.

Before in the alpine there was :
RUN addgroup -S sonarqube && adduser -S -G sonarqube sonarqube
The user was created with sid 100, gid 101 :
sonarqube:x:100:101:Linux User,,,:/home/sonarqube:/bin/false

Now, in the debian there is:
RUN groupadd -r sonarqube && useradd -r -g sonarqube sonarqube
The user is created with sid 999, gid 999 :
sonarqube:x:999:999::/home/sonarqube:

So, we just have to chown our volumes (data + extensions) to 999:999.

Regards,

Vincent

sonarqube:x:999:999

999 is a problem, in centos its colliding with polkitd:x:999:998:User for polkitd:/:/sbin/nologin
Someone has an elegant workaround for this?

Thanks.

I encountered this problem when using mac, but not on centos7

sonarqube@1f7d249131fb:/opt/sonarqube$ id sonarqube
uid=999(sonarqube) gid=999(sonarqube) groups=999(sonarqube)
sonarqube@1f7d249131fb:/opt/sonarqube$ chomd -R 777  elasticsearch



md5-3ca84eba1bcf2db224882af497098aef



2019.04.30 01:45:59 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]
2019.04.30 01:45:59 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]
2019.04.30 01:45:59 INFO  es[][o.e.p.PluginsService] loaded module [mapper-extras]
2019.04.30 01:45:59 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2019.04.30 01:45:59 INFO  es[][o.e.p.PluginsService] loaded module [percolator]
2019.04.30 01:45:59 INFO  es[][o.e.p.PluginsService] loaded module [reindex]
2019.04.30 01:45:59 INFO  es[][o.e.p.PluginsService] loaded module [repository-url]
2019.04.30 01:45:59 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2019.04.30 01:45:59 INFO  es[][o.e.p.PluginsService] no plugins loaded
2019.04.30 01:47:25 WARN  es[][o.e.d.c.s.Settings] [http.enabled] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.
2019.04.30 01:47:30 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen] and host providers [settings]
2019.04.30 01:47:33 INFO  es[][o.e.n.Node] initialized
2019.04.30 01:47:33 INFO  es[][o.e.n.Node] starting ...
2019.04.30 01:47:34 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2019.04.30 01:47:37 INFO  es[][o.e.c.s.MasterService] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {sonarqube}{ovhtDo3OSGyOEretf3w8AA}{_K4dEo9URZC91AOVE8-1GA}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}
2019.04.30 01:47:37 INFO  es[][o.e.c.s.ClusterApplierService] new_master {sonarqube}{ovhtDo3OSGyOEretf3w8AA}{_K4dEo9URZC91AOVE8-1GA}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}, reason: apply cluster state (from master [master {sonarqube}{ovhtDo3OSGyOEretf3w8AA}{_K4dEo9URZC91AOVE8-1GA}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]])
2019.04.30 01:47:39 INFO  es[][o.e.n.Node] started

But a new problem arises. The container stops automatically. The image I use is as follows
sonarqube latest 570788666d79 5 days ago 875MB

I'm closing this since there has been no update for a while. Please retry with the latest SQ version and create a new issue if needed, with more details and logs.

Was this page helpful?
0 / 5 - 0 ratings