I just notices that the latest docker image is broken, downloaded it 10/23/2017 11:15:
The alpine-version has the same behaviour, 5.6.7 still works...
Here are the docker logs:
位 docker run -p 9000:9000 sonarqube
Unable to find image 'sonarqube:latest' locally
latest: Pulling from library/sonarqube
3e17c6eae66c: Already exists
74d44b20f851: Already exists
a156217f3fa4: Already exists
4a1ed13b6faa: Already exists
77980e5d0a6d: Already exists
5458607a81d3: Already exists
e34cf8338f42: Already exists
2f3d3da5c56e: Already exists
2ade7a861e3f: Already exists
878b808920dd: Pull complete
3526affb7d62: Pull complete
Digest: sha256:581704a19c859ae794af889d8c28202ced762b08ebea820c4f6aa913b3242241
Status: Downloaded newer image for sonarqube:latest
2017.10.23 09:13:00 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2017.10.23 09:13:00 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2017.10.23 09:13:00 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
2017.10.23 09:13:00 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2017.10.23 09:13:02 INFO app[][o.e.p.PluginsService] no modules loaded
2017.10.23 09:13:02 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2017.10.23 09:13:06 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
2017.10.23 09:13:06 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
2017.10.23 09:13:06 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
Hi,
same kind of error on kubernetes with sonarqube:6.5-alpine :
10:25:22.485 [main] WARN org.sonar.application.config.JdbcSettings - JDBC URL is recommended to have the property 'rewriteBatchedStatements=true'
10:25:22.491 [main] WARN org.sonar.application.config.JdbcSettings - JDBC URL is recommended to have the property 'useConfigs=maxPerformance'
2017.10.23 10:25:22 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2017.10.23 10:25:22 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2017.10.23 10:25:22 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
2017.10.23 10:25:22 ERROR app[][o.s.a.p.SQProcess] Fail to launch process [es]
java.lang.IllegalStateException: Fail to launch process [es]
at org.sonar.application.process.ProcessLauncherImpl.launchExternal(ProcessLauncherImpl.java:111)
at org.sonar.application.process.ProcessLauncherImpl.launch(ProcessLauncherImpl.java:81)
at org.sonar.application.SchedulerImpl.lambda$tryToStartProcess$2(SchedulerImpl.java:154)
at org.sonar.application.process.SQProcess.start(SQProcess.java:69)
at org.sonar.application.SchedulerImpl.tryToStart(SchedulerImpl.java:160)
at org.sonar.application.SchedulerImpl.tryToStartProcess(SchedulerImpl.java:152)
at org.sonar.application.SchedulerImpl.tryToStartEs(SchedulerImpl.java:110)
at org.sonar.application.SchedulerImpl.tryToStartAll(SchedulerImpl.java:102)
at org.sonar.application.SchedulerImpl.schedule(SchedulerImpl.java:98)
at org.sonar.application.App.start(App.java:64)
at org.sonar.application.App.main(App.java:78)
Caused by: java.io.IOException: Cannot run program "/opt/sonarqube/elasticsearch/bin/elasticsearch" (in directory "/opt/sonarqube/elasticsearch"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at org.sonar.application.process.ProcessLauncherImpl$JavaLangProcessBuilder.start(ProcessLauncherImpl.java:301)
at org.sonar.application.process.ProcessLauncherImpl.launchExternal(ProcessLauncherImpl.java:109)
... 10 common frames omitted
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 12 common frames omitted
2017.10.23 10:25:22 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
2017.10.23 10:25:22 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
Exception in thread "main" java.lang.IllegalStateException: Fail to launch process [es]
at org.sonar.application.process.ProcessLauncherImpl.launchExternal(ProcessLauncherImpl.java:111)
at org.sonar.application.process.ProcessLauncherImpl.launch(ProcessLauncherImpl.java:81)
at org.sonar.application.SchedulerImpl.lambda$tryToStartProcess$2(SchedulerImpl.java:154)
at org.sonar.application.process.SQProcess.start(SQProcess.java:69)
at org.sonar.application.SchedulerImpl.tryToStart(SchedulerImpl.java:160)
at org.sonar.application.SchedulerImpl.tryToStartProcess(SchedulerImpl.java:152)
at org.sonar.application.SchedulerImpl.tryToStartEs(SchedulerImpl.java:110)
at org.sonar.application.SchedulerImpl.tryToStartAll(SchedulerImpl.java:102)
at org.sonar.application.SchedulerImpl.schedule(SchedulerImpl.java:98)
at org.sonar.application.App.start(App.java:64)
at org.sonar.application.App.main(App.java:78)
Caused by: java.io.IOException: Cannot run program "/opt/sonarqube/elasticsearch/bin/elasticsearch" (in directory "/opt/sonarqube/elasticsearch"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at org.sonar.application.process.ProcessLauncherImpl$JavaLangProcessBuilder.start(ProcessLauncherImpl.java:301)
at org.sonar.application.process.ProcessLauncherImpl.launchExternal(ProcessLauncherImpl.java:109)
... 10 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 12 more
@toedter, I also encounter this issue, but I found they have updated the Dockerfile without push latest image to Dockerhub, I pull the latest Dockerfile code and build it by myself, it work well for me right now.
yes, seems the image is buggy. /opt/sonarqube/logs/es.log shows following error
java.lang.RuntimeException: can not run elasticsearch as root
This was fixed in #115.
This fix was merged into master, but not pushed to the public repository. If you want to build it locally, you can use:
cd ~
mkdir my-docker-sonarqube
cd my-docker-sonarqube
curl https://raw.githubusercontent.com/SonarSource/docker-sonarqube/master/6.6/Dockerfile -o Dockerfile
curl https://raw.githubusercontent.com/SonarSource/docker-sonarqube/master/6.6/run.sh -o run.sh
chmod a+x run.sh
docker build -t my-docker-sonarqube .
docker run -p 8080:9000 my-docker-sonarqube
Thx @bartfastiel. Do you know when the fix will be pushed to the public Docker repository?
It will be published once https://github.com/docker-library/official-images/pull/3604 is merged.
Thank you very much for fixing this quickly!
Trying this Docker Thing (My first time with Docker, yes.. I know...)
It stuck there:
+ mktemp -d
+ export GNUPGHOME=/tmp/tmp.FWqj1XGqZb
+ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4
gpg: keybox '/tmp/tmp.FWqj1XGqZb/pubring.kbx' created
Unable to find image 'my-docker-sonarqube:latest' locally
Most helpful comment
Thx @bartfastiel. Do you know when the fix will be pushed to the public Docker repository?