sonarsource / docker-sonarqube Goto Github PK
View Code? Open in Web Editor NEW:whale: SonarQube in Docker
Home Page: https://hub.docker.com/_/sonarqube/
License: GNU Lesser General Public License v3.0
:whale: SonarQube in Docker
Home Page: https://hub.docker.com/_/sonarqube/
License: GNU Lesser General Public License v3.0
Hi Sonar, as per title -- do you plan to deploy lts version on Alpine rather than Debian? It's something $work would consider using.
Hi
Sorry if it is a silly question... Should sonar-runner be included as part of the image? How to run analysis on this?
Thanks
Right now I can configure SONARQUBE_WEB_JVM_OPTS (https://github.com/SonarSource/docker-sonarqube/blob/master/6.3.1/run.sh#L14) to tune JVM for Web Server. There is no way to configure JVM for Compute Engine.
I suggest to introduce SONARQUBE_CE_JVM_OPTS property.
Hello,
I'm using sonarqube:alpine with docker. I always get an error during a restart :
2016.12.28 07:00:34 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
Exception in thread "main" java.lang.RuntimeException: Failed to reset file system
at org.sonar.process.monitor.Monitor.resetFileSystem(Monitor.java:133)
at org.sonar.process.monitor.Monitor.startProcesses(Monitor.java:113)
at org.sonar.process.monitor.Monitor.start(Monitor.java:107)
at org.sonar.application.App.start(App.java:73)
at org.sonar.application.App.main(App.java:184)
Caused by: java.nio.file.NoSuchFileException: /opt/sonarqube/temp/README.txt
But the file '/opt/sonarqube/temp/README.txt' does not exist. Everything works fine if I create the file manually.
The problem occurs during a docker restart or sonarqube restart after installing plugins.
Could you add a volume to $SONARQUBE_HOME/extensions/plugins?
That way, we could install new plugins without having to build a new image based on that one.
Same goes for config folder
Hi
I would like to create a docker image with some specific plugins on it.
I know that it can be added later to the extensions volume, but i would like to have the image with those plugins already contained there
How should i do that? Should i modify the dockerfile to include the reference to those plugins?
Thanks
Hi
I am trying to rebuild the sonarqube 6.4 image to amend it (i want to run it with a lesser privileged user), but i am having an error when building it
What i am doing is creating a dockerfile that contains exactly what is in your git (https://github.com/SonarSource/docker-sonarqube/blob/master/6.4/Dockerfile)
But, i am having an error in the last step, when copying the run.sh file
Step 7 : COPY run.sh $SONARQUBE_HOME/bin/
lstat run.sh: no such file or directory
Any idea what could be the problem?
Thanks
I just setup sonarqube with docker-compose and postgres. Below is my compose file
services:
postgres:
image: postgres
container_name: postgres
volumes:
- postgresql:/var/lib/postgresql
# This needs explicit mapping due to https://github.com/docker-library/postgres/blob/4e48e3228a30763913ece952c611e5e9b95c8759/Dockerfile.template#L52
- postgresql_data:/var/lib/postgresql/data
ports:
- 5432:5432
networks:
- dev
environment:
- POSTGRES_PASSWORD=*****
- POSTGRES_USER=mbi
restart: always
sonarqube:
image: sonarqube
container_name: sonarqube
volumes:
- sonarqube_conf:/opt/sonarqube/conf
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins
ports:
- 9000:9000
networks:
- dev
environment:
- SONARQUBE_JDBC_USERNAME=sonar
- SONARQUBE_JDBC_PASSWORD=*****
- SONARQUBE_JDBC_URL=jdbc:postgresql://postgres:5432/mbi
depends_on:
- "postgres"
restart: always
networks:
dev:
driver: bridge
volumes:
sonarqube_conf:
sonarqube_data:
sonarqube_extensions:
sonarqube_bundled-plugins:
postgresql:
postgresql_data:
I haven't even done anything other than create the image. It starts up, and I can load localhost:9000. However, I left, and when I came back, my computer was running like crazy. I looked at activity monitor and saw that com.docker.hyperkit was at over 300% CPU. I ran docker stop sonarqube, and within a minute, it dropped down to < 5%.
After a few minutes of it hanging at < 5% I started sonarqube again, and it immediately went up to 150% CPU usage. It sometimes drops a little below 100, but is mostly between 150-360% CPU.
Since I had not really done anything yet, I removed the container, and recreated it, and had the same problem. I am running Docker 17.03.1-ce-mac5 (16048). I am on Sierra, 10.12.5 Beta (16F43c).
Hello ,
Please help - I am trying to deploy sonarqube on OpenShift using docker file , Build is working , after deployment , I am seeing error.
2016.08.31 07:37:32 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
Exception in thread "main" java.lang.RuntimeException: Failed to reset file system
at org.sonar.process.monitor.Monitor.resetFileSystem(Monitor.java:127)
at org.sonar.process.monitor.Monitor.startProcesses(Monitor.java:107)
at org.sonar.process.monitor.Monitor.start(Monitor.java:101)
at org.sonar.application.App.start(App.java:54)
at org.sonar.application.App.main(App.java:141)
Caused by: java.nio.file.AccessDeniedException: /opt/sonarqube/temp/README.txt
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244)
at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
at java.nio.file.Files.delete(Files.java:1126)
at org.sonar.application.AppFileSystem$CleanTempDirFileVisitor.visitFile(AppFileSystem.java:149)
at org.sonar.application.AppFileSystem$CleanTempDirFileVisitor.visitFile(AppFileSystem.java:130)
at java.nio.file.Files.walkFileTree(Files.java:2670)
at org.sonar.application.AppFileSystem.createOrCleanTempDirectory(AppFileSystem.java:126)
at org.sonar.application.AppFileSystem.reset(AppFileSystem.java:83)
at org.sonar.process.monitor.Monitor.resetFileSystem(Monitor.java:124)
... 4 more
RUN set -x \
&& yum -y install tar unzip \
&& yum -y update \
&& yum -y clean all
#java
ENV JAVA_HOME /opt/java
ENV JAVA_VERSION_MAJOR 8
ENV JAVA_VERSION_MINOR 102
ENV JAVA_VERSION_BUILD 14
RUN mkdir -p /opt \
&& curl --fail --silent --location --retry 3 \
--header "Cookie: oraclelicense=accept-securebackup-cookie; " \
http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-b${JAVA_VERSION_BUILD}/server-jre-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-linux-x64.tar.gz \
| gunzip \
| tar -x -C /opt \
&& ln -s /opt/jdk1.${JAVA_VERSION_MAJOR}.0_${JAVA_VERSION_MINOR} ${JAVA_HOME}
ENV SONAR_VERSION=6.0 \
SONARQUBE_HOME=/opt/sonarqube \
# Database configuration
# Defaults to using H2
SONARQUBE_JDBC_USERNAME=sonar \
SONARQUBE_JDBC_PASSWORD=sonar \
SONARQUBE_JDBC_URL=
# Http port
EXPOSE 9000
RUN set -x \
# see https://bugs.debian.org/812708
# and https://github.com/SonarSource/docker-sonarqube/pull/18#issuecomment-194045499
&& cd /tmp \
# && curl -fSL -O "https://archive.raspbian.org/raspbian/pool/main/c/ca-certificates/ca-certificates_20130119+deb7u1_all.deb" \
# && echo "3494ecfd607e4233d8d1a656eceb6bd109d756bc0afe9d3b29dfc0acc4fe19cf ca-certificates_20130119+deb7u1_all.deb" | sha256sum -c - \
# && dpkg -P --force-all ca-certificates \
# && dpkg -i ca-certificates_20130119+deb7u1_all.deb \
# && rm ca-certificates_20130119+deb7u1_all.deb \
# pub 2048R/D26468DE 2015-05-25
# Key fingerprint = F118 2E81 C792 9289 21DB CAB4 CFCA 4A29 D264 68DE
# uid sonarsource_deployer (Sonarsource Deployer) <[email protected]>
# sub 2048R/06855C1D 2015-05-25
# && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys F1182E81C792928921DBCAB4CFCA4A29D26468DE \
&& cd /opt \
&& curl -o sonarqube.zip -fSL https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-$SONAR_VERSION.zip \
# && curl -o sonarqube.zip.asc -fSL https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-$SONAR_VERSION.zip.asc \
# && gpg --batch --verify sonarqube.zip.asc sonarqube.zip \
&& unzip sonarqube.zip \
&& mv sonarqube-$SONAR_VERSION sonarqube \
&& rm sonarqube.zip* \
&& rm -rf $SONARQUBE_HOME/bin/*
VOLUME ["$SONARQUBE_HOME/data", "$SONARQUBE_HOME/extensions"]
WORKDIR $SONARQUBE_HOME
COPY containerfiles/run.sh $SONARQUBE_HOME/bin/
RUN chmod a+x $SONARQUBE_HOME/bin/run.sh
ENTRYPOINT ["./bin/run.sh"]
Regards
Naveen
Hello SonarSource community,
We're in the process of moving our SonarQube installation to docker, and have run into a hard issue along the way.
Namely, we can't seem to fetch https://update.sonarsource.org/update-center.properties
or even update.sonarsource.org
- the connection either times out or is reset by peer - from inside docker.
This issue may seem similar to #55, but is not related, as our DNS works just fine.
The funny thing is, this issue just appears inside any docker container running on VMs in OpenStack. On the VMs themselves, curling https://update.sonarsource.org/update-center.properties
works just fine. Inside said docker containers, everything works, we can curl any domain of our liking, even curling sonarsource.org
works fine, so update.sonarsource.org
is the only domain that does not work. To make this issue even weirder, when using docker on VMs that do not run in OpenStack, we have no problems.
We are not using any proxy.
We tried those issues on the following setups:
OpenStack CentOS 7 VM: works
OpenStack CentOS 7 VM with docker: does not work
OpenStack Ubuntu 16.04 VM: works
OpenStack Ubuntu 16.04 VM with docker: does not work
Vagrant Centos 7 VM: works
Vagrant Centos 7 VM in docker: works
In addition, some troubleshooting steps using the official docker image on a CentOS 7 VM in OpenStack:
curling sonarsource.org
:
root@84ceae0e2e71:/opt/sonarqube# curl -v sonarsource.org
* Rebuilt URL to: sonarsource.org/
* Hostname was NOT found in DNS cache
* Trying 75.101.133.159...
* Connected to sonarsource.org (75.101.133.159) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.38.0
> Host: sonarsource.org
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
* Server nginx/1.10.1 is not blacklisted
< Server: nginx/1.10.1
< Date: Wed, 19 Apr 2017 14:40:09 GMT
< Content-Type: text/html
< Content-Length: 185
< Connection: keep-alive
< Location: http://www.sonarqube.org/
<
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.10.1</center>
</body>
</html>
* Connection #0 to host sonarsource.org left intact
curling update.sonarsource.org
(this takes a few minutes):
root@84ceae0e2e71:/opt/sonarqube# curl -v update.sonarsource.org
* Rebuilt URL to: update.sonarsource.org/
* Hostname was NOT found in DNS cache
* Trying 75.101.133.159...
* Connected to update.sonarsource.org (75.101.133.159) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.38.0
> Host: update.sonarsource.org
> Accept: */*
>
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
DNS seems to work fine too:
root@84ceae0e2e71:/opt/sonarqube# nslookup update.sonarsource.org
Server: 127.0.0.11
Address: 127.0.0.11#53
Non-authoritative answer:
Name: update.sonarsource.org
Address: 75.101.133.159
As well as a traceroute:
1 172.18.0.1 (172.18.0.1) 0.020 ms 0.011 ms 0.007 ms
2 < censored >
3 < censored >
4 < censored >
5 < censored >
6 < censored >
7 tele2se-bundle2-vie3.net.uta.at (212.152.189.66) 1.937 ms 1.958 ms 3.395 ms
8 wen3-peer-2.ae3-unit0.tele2.net (130.244.74.245) 1.519 ms 1.938 ms 1.901 ms
9 win-b4-link.telia.net (213.248.76.245) 1.876 ms 2.049 ms 2.047 ms
10 win-bb2-link.telia.net (62.115.136.156) 3.027 ms win-bb2-link.telia.net (62.115.136.250) 2.747 ms win-bb2-link.telia.net (62.115.112.200) 2.289 ms
11 ffm-bb4-link.telia.net (213.155.137.102) 15.861 ms ffm-bb3-link.telia.net (213.155.132.240) 14.685 ms ffm-bb4-link.telia.net (62.115.134.214) 15.387 ms
12 ash-bb4-link.telia.net (80.91.246.64) 111.071 ms ash-bb3-link.telia.net (213.155.135.57) 113.025 ms ash-bb4-link.telia.net (80.91.246.62) 111.162 ms
13 ffm-bb3-link.telia.net (62.115.121.0) 114.601 ms ffm-bb3-link.telia.net (62.115.141.238) 124.174 ms ffm-bb3-link.telia.net (62.115.141.236) 120.334 ms
14 prs-bb3-link.telia.net (62.115.123.15) 120.346 ms vadata-ic-157231-ash-bb1.c.telia.net (62.115.9.62) 106.050 ms 105.300 ms
15 ash-bb3-link.telia.net (62.115.124.132) 114.288 ms * *
16 ash-b1-link.telia.net (62.115.143.1) 114.844 ms * *
17 * vadata-ic-157231-ash-bb1.c.telia.net (62.115.9.62) 106.245 ms *
18 54.239.111.13 (54.239.111.13) 106.832 ms * 54.239.111.9 (54.239.111.9) 108.581 ms
19 * 205.251.245.187 (205.251.245.187) 112.034 ms *
20 * * *
21 54.239.110.133 (54.239.110.133) 3398.749 ms * 54.239.111.5 (54.239.111.5) 107.833 ms
22 * * 205.251.245.224 (205.251.245.224) 108.025 ms
23 * * *
24 * * *
25 * * *
26 ec2-75-101-133-159.compute-1.amazonaws.com (75.101.133.159) 107.872 ms * 107.843 ms
In addition, this is the error SonarQube reports:
2017.04.19 14:27:21 ERROR web[AVuGm90sspQnDbRwAAAT][o.s.s.p.UpdateCenterClient] Fail to connect to update center
org.sonar.api.utils.SonarException: Fail to download: https://update.sonarsource.org/update-center.properties (no proxy)
at org.sonar.core.util.DefaultHttpDownloader.failToDownload(DefaultHttpDownloader.java:156)
at org.sonar.core.util.DefaultHttpDownloader.readString(DefaultHttpDownloader.java:114)
at org.sonar.api.utils.UriReader.readString(UriReader.java:72)
at org.sonar.server.plugins.UpdateCenterClient.init(UpdateCenterClient.java:109)
at org.sonar.server.plugins.UpdateCenterClient.getUpdateCenter(UpdateCenterClient.java:92)
at org.sonar.server.plugins.UpdateCenterMatrixFactory.getUpdateCenter(UpdateCenterMatrixFactory.java:44)
at org.sonar.server.platform.ws.UpgradesAction.writeResponse(UpgradesAction.java:98)
at org.sonar.server.platform.ws.UpgradesAction.handle(UpgradesAction.java:90)
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:103)
at org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:85)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126)
at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:95)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:76)
at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:72)
at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.RoutesFilter.doFilter(RoutesFilter.java:60)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.requestid.RequestIdFilter.doFilter(RequestIdFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
at org.sonar.core.util.DefaultHttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(DefaultHttpDownloader.java:273)
at org.sonar.core.util.DefaultHttpDownloader.readString(DefaultHttpDownloader.java:112)
... 48 common frames omitted
2017.04.19 14:27:28 ERROR web[AVuGm90sspQnDbRwAAAU][o.s.s.p.UpdateCenterClient] Fail to connect to update center
org.sonar.api.utils.SonarException: Fail to download: https://update.sonarsource.org/update-center.properties (no proxy)
at org.sonar.core.util.DefaultHttpDownloader.failToDownload(DefaultHttpDownloader.java:156)
at org.sonar.core.util.DefaultHttpDownloader.readString(DefaultHttpDownloader.java:114)
at org.sonar.api.utils.UriReader.readString(UriReader.java:72)
at org.sonar.server.plugins.UpdateCenterClient.init(UpdateCenterClient.java:109)
at org.sonar.server.plugins.UpdateCenterClient.getUpdateCenter(UpdateCenterClient.java:92)
at org.sonar.server.plugins.UpdateCenterMatrixFactory.getUpdateCenter(UpdateCenterMatrixFactory.java:44)
at org.sonar.server.plugins.ws.AvailableAction.handle(AvailableAction.java:79)
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:103)
at org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:85)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126)
at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:95)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:76)
at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:72)
at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.RoutesFilter.doFilter(RoutesFilter.java:60)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.requestid.RequestIdFilter.doFilter(RequestIdFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
at org.sonar.core.util.DefaultHttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(DefaultHttpDownloader.java:273)
at org.sonar.core.util.DefaultHttpDownloader.readString(DefaultHttpDownloader.java:112)
... 47 common frames omitted
2017.04.19 14:27:28 ERROR web[AVuGm90sspQnDbRwAAAV][o.s.s.p.UpdateCenterClient] Fail to connect to update center
org.sonar.api.utils.SonarException: Fail to download: https://update.sonarsource.org/update-center.properties (no proxy)
at org.sonar.core.util.DefaultHttpDownloader.failToDownload(DefaultHttpDownloader.java:156)
at org.sonar.core.util.DefaultHttpDownloader.readString(DefaultHttpDownloader.java:114)
at org.sonar.api.utils.UriReader.readString(UriReader.java:72)
at org.sonar.server.plugins.UpdateCenterClient.init(UpdateCenterClient.java:109)
at org.sonar.server.plugins.UpdateCenterClient.getUpdateCenter(UpdateCenterClient.java:92)
at org.sonar.server.plugins.UpdateCenterMatrixFactory.getUpdateCenter(UpdateCenterMatrixFactory.java:44)
at org.sonar.server.plugins.ws.PluginWSCommons.compatiblePlugins(PluginWSCommons.java:279)
at org.sonar.server.plugins.ws.PluginWSCommons.compatiblePluginsByKey(PluginWSCommons.java:284)
at org.sonar.server.plugins.ws.PendingAction.handle(PendingAction.java:85)
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:103)
at org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:85)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126)
at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:95)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:76)
at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:72)
at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.RoutesFilter.doFilter(RoutesFilter.java:60)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.requestid.RequestIdFilter.doFilter(RequestIdFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
at org.sonar.core.util.DefaultHttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(DefaultHttpDownloader.java:273)
at org.sonar.core.util.DefaultHttpDownloader.readString(DefaultHttpDownloader.java:112)
... 49 common frames omitted
2017.04.19 14:27:38 ERROR web[AVuGm90sspQnDbRwAAAf][o.s.s.p.UpdateCenterClient] Fail to connect to update center
org.sonar.api.utils.SonarException: Fail to download: https://update.sonarsource.org/update-center.properties (no proxy)
at org.sonar.core.util.DefaultHttpDownloader.failToDownload(DefaultHttpDownloader.java:156)
at org.sonar.core.util.DefaultHttpDownloader.readString(DefaultHttpDownloader.java:114)
at org.sonar.api.utils.UriReader.readString(UriReader.java:72)
at org.sonar.server.plugins.UpdateCenterClient.init(UpdateCenterClient.java:109)
at org.sonar.server.plugins.UpdateCenterClient.getUpdateCenter(UpdateCenterClient.java:92)
at org.sonar.server.plugins.UpdateCenterMatrixFactory.getUpdateCenter(UpdateCenterMatrixFactory.java:44)
at org.sonar.server.plugins.ws.AvailableAction.handle(AvailableAction.java:79)
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:103)
at org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:85)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126)
at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:95)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:76)
at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:72)
at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.RoutesFilter.doFilter(RoutesFilter.java:60)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.requestid.RequestIdFilter.doFilter(RequestIdFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
at org.sonar.core.util.DefaultHttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(DefaultHttpDownloader.java:273)
at org.sonar.core.util.DefaultHttpDownloader.readString(DefaultHttpDownloader.java:112)
... 47 common frames omitted
2017.04.19 14:27:38 ERROR web[AVuGm90sspQnDbRwAAAg][o.s.s.p.UpdateCenterClient] Fail to connect to update center
org.sonar.api.utils.SonarException: Fail to download: https://update.sonarsource.org/update-center.properties (no proxy)
at org.sonar.core.util.DefaultHttpDownloader.failToDownload(DefaultHttpDownloader.java:156)
at org.sonar.core.util.DefaultHttpDownloader.readString(DefaultHttpDownloader.java:114)
at org.sonar.api.utils.UriReader.readString(UriReader.java:72)
at org.sonar.server.plugins.UpdateCenterClient.init(UpdateCenterClient.java:109)
at org.sonar.server.plugins.UpdateCenterClient.getUpdateCenter(UpdateCenterClient.java:92)
at org.sonar.server.plugins.UpdateCenterMatrixFactory.getUpdateCenter(UpdateCenterMatrixFactory.java:44)
at org.sonar.server.plugins.ws.PluginWSCommons.compatiblePlugins(PluginWSCommons.java:279)
at org.sonar.server.plugins.ws.PluginWSCommons.compatiblePluginsByKey(PluginWSCommons.java:284)
at org.sonar.server.plugins.ws.PendingAction.handle(PendingAction.java:85)
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:103)
at org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:85)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126)
at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:95)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:76)
at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:72)
at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.RoutesFilter.doFilter(RoutesFilter.java:60)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.requestid.RequestIdFilter.doFilter(RequestIdFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
at org.sonar.core.util.DefaultHttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(DefaultHttpDownloader.java:273)
at org.sonar.core.util.DefaultHttpDownloader.readString(DefaultHttpDownloader.java:112)
... 49 common frames omitted
2017.04.19 14:27:40 ERROR web[AVuGm90sspQnDbRwAAAi][o.s.s.p.UpdateCenterClient] Fail to connect to update center
org.sonar.api.utils.SonarException: Fail to download: https://update.sonarsource.org/update-center.properties (no proxy)
at org.sonar.core.util.DefaultHttpDownloader.failToDownload(DefaultHttpDownloader.java:156)
at org.sonar.core.util.DefaultHttpDownloader.readString(DefaultHttpDownloader.java:114)
at org.sonar.api.utils.UriReader.readString(UriReader.java:72)
at org.sonar.server.plugins.UpdateCenterClient.init(UpdateCenterClient.java:109)
at org.sonar.server.plugins.UpdateCenterClient.getUpdateCenter(UpdateCenterClient.java:92)
at org.sonar.server.plugins.UpdateCenterMatrixFactory.getUpdateCenter(UpdateCenterMatrixFactory.java:44)
at org.sonar.server.plugins.ws.UpdatesAction.handle(UpdatesAction.java:92)
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:103)
at org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:85)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126)
at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:95)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:76)
at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:72)
at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.RoutesFilter.doFilter(RoutesFilter.java:60)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.requestid.RequestIdFilter.doFilter(RequestIdFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
at org.sonar.core.util.DefaultHttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(DefaultHttpDownloader.java:273)
at org.sonar.core.util.DefaultHttpDownloader.readString(DefaultHttpDownloader.java:112)
... 47 common frames omitted
2017.04.19 14:27:58 ERROR web[AVuGm90sspQnDbRwAAAj][o.s.s.p.UpdateCenterClient] Fail to connect to update center
org.sonar.api.utils.SonarException: Fail to download: https://update.sonarsource.org/update-center.properties (no proxy)
at org.sonar.core.util.DefaultHttpDownloader.failToDownload(DefaultHttpDownloader.java:156)
at org.sonar.core.util.DefaultHttpDownloader.readString(DefaultHttpDownloader.java:114)
at org.sonar.api.utils.UriReader.readString(UriReader.java:72)
at org.sonar.server.plugins.UpdateCenterClient.init(UpdateCenterClient.java:109)
at org.sonar.server.plugins.UpdateCenterClient.getUpdateCenter(UpdateCenterClient.java:92)
at org.sonar.server.plugins.UpdateCenterMatrixFactory.getUpdateCenter(UpdateCenterMatrixFactory.java:44)
at org.sonar.server.plugins.ws.PluginWSCommons.compatiblePlugins(PluginWSCommons.java:279)
at org.sonar.server.plugins.ws.PluginWSCommons.compatiblePluginsByKey(PluginWSCommons.java:284)
at org.sonar.server.plugins.ws.PendingAction.handle(PendingAction.java:85)
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:103)
at org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:85)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126)
at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:95)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:76)
at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:72)
at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.RoutesFilter.doFilter(RoutesFilter.java:60)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.requestid.RequestIdFilter.doFilter(RequestIdFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
at org.sonar.core.util.DefaultHttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(DefaultHttpDownloader.java:273)
at org.sonar.core.util.DefaultHttpDownloader.readString(DefaultHttpDownloader.java:112)
... 49 common frames omitted
So, as you can see, this seems to be a pretty interesting bug. We have already considered an issue in our OpenStack installation, but that just wouldn't make sense, as the issue only appears with one specific domain and only when running inside docker.
Maybe any of you have run into a similar issue?
We're looking forward to any replies, and thank you in advance!
Hi everyone,
I think this image should have a standard way to install required sonar plugins, maybe by passing them in as a list or something like this.
Regards,
Tobi
Hi,
Is there a parameter to define the proxy being used by sonar in combination with docker?
Right now i am setting a proxy in the sonar.properties via Dockerfile like this (which isn't working)
RUN echo "" >> /opt/sonarqube/conf/sonar.properties #newLine before we add some properties RUN echo "http.proxyHost=http://MY_PROXY_URL" >> /opt/sonarqube/conf/sonar.properties RUN echo "http.proxyPort=MY_PROXY_PORT" >> /opt/sonarqube/conf/sonar.properties
So it is being added at the end of the standard sonar.properties file
And I can see the proxy in the http://MY_SONAR_INSTALLATION/system screen. Nevertheless i cannot see any plugins under http://MY_SONAR_INSTALLATION/updatecenter/available so I assume sonar is started in the base image before i am adding the property file. Adding the same entrypoint again at the end of my dockerfile didn't help.
I am glad for any feedback
Hey all,
I'm using docker version of SonarQube. After i run mvn sonar:sonar
at terminal i saw build successful. You can check report at xxx url. But in my projects page i saw "Project is not analyzed yet." at that project file.
Also, i'm not sure about is it fully analyze the whole code.
Waiting for your helps.
Thank you
I have the same problem #25
running with raw "docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube
" is ok
but running "docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 -e SONARQUBE_JDBC_USERNAME=root -e SONARQUBE_JDBC_PASSWORD=root -e SONARQUBE_JDBC_URL=jdbc:mysql://192.168.1.29:3306/sonarqube sonarqube
" was not work,The container cannot start,
When you build the mirror using the dockerfile installation, it is also successful
But when i start the container, prompt run.sh can't find
My SonarQube container failing to start. Using :latest image with very basic settings.
....
"image": "sonarqube:latest",
...
"portMappings": [
{
"hostPort": 9000,
"containerPort": 9000,
"protocol": "tcp"
}],
...
"environment": [
{
"name": "SONARQUBE_JDBC_PASSWORD",
"value": "passsssword_here"
},
{
"name": "SONARQUBE_JDBC_URL",
"value": "jdbc:mysql://my_instance.rds.amazonaws.com:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true"
},
{
"name": "SONARQUBE_JDBC_USERNAME",
"value": "sonar"
}
],
It worked well as I run it first time a month ago. After restarting the container I get:
2016.10.05 08:19:33 WARN web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
No other ERROR or WARN messages... Database is accessible manually using same credentials. Full logs is attached log.txt
Please advice.
exposing conf and logs directory as docker volume
Hi,
I need to change the default web context of sonar to /sonar. Is it possible to set this value through an docker environment variable ?
Thanks,
Romain Schlick
i want use database by mysql
but i set
-v /dev/sonar/conf:/opt/sonarqube/conf
and configure sonar.jdbc.url
but the sonar still use h2 database
only use -e SONARQUBE_JDBC_URL="jdbc:mysql://mysql.sonar.mtime-dev.com:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false"
is okay..
Is there any way to configure a proxy server? I already mounted the directory /opt/sonarqube to modify the /conf/sonar.properties for the proxy configuration, but without any effect.
Thanks!
Hi, I've pulled an sonarcube image with:
docker pull sonarqube:5.6.3
If I try to run a container based on that image (as described) with:
docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 -e SONARQUBE_JDBC_USERNAME=sonar -e SONARQUBE_JDBC_PASSWORD=sonar -e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost/sonar sonarqube:5.6.3
the container always "crashes" with the following log:
2016.12.04 14:14:20 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2016.12.04 14:14:20 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[es]: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonarqube/temp -javaagent:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /opt/sonarqube/temp/sq-process4183878926937211717properties
2016.12.04 14:14:20 INFO es[o.s.p.ProcessEntryPoint] Starting es
2016.12.04 14:14:20 INFO es[o.s.s.EsSettings] Elasticsearch listening on 127.0.0.1:9001
2016.12.04 14:14:20 INFO es[o.elasticsearch.node] [sonar-1480860860022] version[1.7.5], pid[20], build[00f95f4/2016-02-02T09:55:30Z]
2016.12.04 14:14:20 INFO es[o.elasticsearch.node] [sonar-1480860860022] initializing ...
2016.12.04 14:14:20 INFO es[o.e.plugins] [sonar-1480860860022] loaded [], sites []
2016.12.04 14:14:20 INFO es[o.elasticsearch.env] [sonar-1480860860022] using [1] data paths, mounts [[/opt/sonarqube/data (/dev/sda1)]], net usable_space [82.6gb], net total_space [94.3gb], types [ext4]
2016.12.04 14:14:21 WARN es[o.e.bootstrap] JNA not found. native methods will be disabled.
2016.12.04 14:14:22 INFO es[o.elasticsearch.node] [sonar-1480860860022] initialized
2016.12.04 14:14:22 INFO es[o.elasticsearch.node] [sonar-1480860860022] starting ...
2016.12.04 14:14:22 INFO es[o.e.transport] [sonar-1480860860022] bound_address {inet[/127.0.0.1:9001]}, publish_address {inet[/127.0.0.1:9001]}
2016.12.04 14:14:22 INFO es[o.e.discovery] [sonar-1480860860022] sonarqube/383RrHruQXKC9Jd8TVqu0g
2016.12.04 14:14:25 INFO es[o.e.cluster.service] [sonar-1480860860022] new_master [sonar-1480860860022][383RrHruQXKC9Jd8TVqu0g][7633006c8b2d][inet[/127.0.0.1:9001]]{rack_id=sonar-1480860860022}, reason: zen-disco-join (elected_as_master)
2016.12.04 14:14:25 INFO es[o.elasticsearch.node] [sonar-1480860860022] started
2016.12.04 14:14:25 INFO es[o.e.gateway] [sonar-1480860860022] recovered [0] indices into cluster_state
2016.12.04 14:14:25 INFO app[o.s.p.m.Monitor] Process[es] is up
2016.12.04 14:14:25 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.security.egd=file:/dev/./urandom -Djava.io.tmpdir=/opt/sonarqube/temp -javaagent:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/server/*:/opt/sonarqube/lib/jdbc/postgresql/postgresql-9.3-1102-jdbc41.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process1441227969328238100properties
2016.12.04 14:14:26 INFO web[o.s.p.ProcessEntryPoint] Starting web
2016.12.04 14:14:26 INFO web[o.s.s.a.TomcatContexts] Webapp directory: /opt/sonarqube/web
2016.12.04 14:14:26 INFO web[o.a.c.h.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.12.04 14:14:26 INFO web[o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2016.12.04 14:14:26 INFO web[o.s.s.p.ServerImpl] SonarQube Server / 5.6.3 / 3fcc98a73d6afb99388e39f46272909a6d6600b2
2016.12.04 14:14:26 INFO web[o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://localhost/sonar
2016.12.04 14:14:26 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by 'sonar.jdbc.').
at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:104) ~[sonar-db-5.6.3.jar:na]
at org.sonar.db.DefaultDatabase.start(DefaultDatabase.java:71) ~[sonar-db-5.6.3.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) ~[picocontainer-2.15.jar:na]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) ~[picocontainer-2.15.jar:na]
at org.sonar.core.platform.ComponentContainer$1.start(ComponentContainer.java:320) ~[sonar-core-5.6.3.jar:na]
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.Stored.start(Stored.java:110) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767) ~[picocontainer-2.15.jar:na]
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:141) ~[sonar-core-5.6.3.jar:na]
at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:84) ~[sonar-server-5.6.3.jar:na]
at org.sonar.server.platform.Platform.start(Platform.java:216) ~[sonar-server-5.6.3.jar:na]
at org.sonar.server.platform.Platform.startLevel1Container(Platform.java:175) ~[sonar-server-5.6.3.jar:na]
at org.sonar.server.platform.Platform.init(Platform.java:90) ~[sonar-server-5.6.3.jar:na]
at org.sonar.server.platform.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43) ~[sonar-server-5.6.3.jar:na]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) [tomcat-embed-core-8.0.32.jar:8.0.32]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_111]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111]
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) ~[commons-dbcp-1.4.jar:1.4]
at org.sonar.db.profiling.NullConnectionInterceptor.getConnection(NullConnectionInterceptor.java:31) ~[sonar-db-5.6.3.jar:na]
at org.sonar.db.profiling.ProfiledDataSource.getConnection(ProfiledDataSource.java:323) ~[sonar-db-5.6.3.jar:na]
at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:102) ~[sonar-db-5.6.3.jar:na]
... 30 common frames omitted
Caused by: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:215) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:144) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:29) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:21) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:31) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.Driver.makeConnection(Driver.java:410) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.Driver.connect(Driver.java:280) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ~[commons-dbcp-1.4.jar:1.4]
... 35 common frames omitted
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_111]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_111]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_111]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_111]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_111]
at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_111]
at org.postgresql.core.PGStream.<init>(PGStream.java:61) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:109) ~[postgresql-9.3-1102-jdbc41.jar:na]
... 47 common frames omitted
2016.12.04 14:14:26 ERROR web[o.a.c.c.StandardContext] One or more listeners failed to start. Full details will be found in the appropriate container log file
2016.12.04 14:14:26 ERROR web[o.a.c.c.StandardContext] Context [] startup failed due to previous errors
2016.12.04 14:14:26 WARN web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.util.TimerThread.mainLoop(Timer.java:552)
java.util.TimerThread.run(Timer.java:505)
2016.12.04 14:14:26 INFO web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.12.04 14:14:26 INFO web[o.s.s.a.TomcatAccessLog] Web server is started
2016.12.04 14:14:26 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2016.12.04 14:14:26 WARN web[o.s.p.ProcessEntryPoint] Fail to start web
java.lang.IllegalStateException: Webapp did not start
at org.sonar.server.app.EmbeddedTomcat.isUp(EmbeddedTomcat.java:84) ~[sonar-server-5.6.3.jar:na]
at org.sonar.server.app.WebServer.isUp(WebServer.java:47) [sonar-server-5.6.3.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:105) ~[sonar-process-5.6.3.jar:na]
at org.sonar.server.app.WebServer.main(WebServer.java:68) [sonar-server-5.6.3.jar:na]
2016.12.04 14:14:26 INFO web[o.a.c.h.Http11NioProtocol] Pausing ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.12.04 14:14:27 INFO web[o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.12.04 14:14:28 INFO web[o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.12.04 14:14:28 INFO web[o.s.s.a.TomcatAccessLog] Web server is stopped
2016.12.04 14:14:28 INFO app[o.s.p.m.Monitor] Process[es] is stopping
2016.12.04 14:14:28 INFO es[o.s.p.StopWatcher] Stopping process
2016.12.04 14:14:28 INFO es[o.elasticsearch.node] [sonar-1480860860022] stopping ...
2016.12.04 14:14:28 INFO es[o.elasticsearch.node] [sonar-1480860860022] stopped
2016.12.04 14:14:28 INFO es[o.elasticsearch.node] [sonar-1480860860022] closing ...
2016.12.04 14:14:28 INFO es[o.elasticsearch.node] [sonar-1480860860022] closed
2016.12.04 14:14:29 INFO app[o.s.p.m.Monitor] Process[es] is stopped`
Is there something I'm doing wrong?
Thanks & Regards.
Hi there !
Is there any way to make sonarqube and postgreSQL to work in a docker network ?
I've tried many configurations, but stayed confused on how to make the jdbc connector work inside a network container.
Here is my docker-compose:
sonarqube-database:
container_name: sonarqube-db
image: postgres:9.5.1
volumes:
- /home/apside/docker/sonar/postgres-data/:/var/lib/postgresql/data
environment:
- POSTGRES_USER=sonar
- POSTGRES_PASSWORD=sonar
restart: always
net: "ic"
sonarqube:
container_name: sonarqube
image: sonarqube:5.4
ports:
- "9000:9000"
- "5432:5432"
volumes:
- /home/apside/docker/sonar/extensions:/opt/sonarqube/extensions
- /home/apside/docker/sonar/logs:/opt/sonarqube/logs
dns: 10.1.37.15
restart: always
net: "ic"
links:
- sonarqube-database
environment:
- SONARQUBE_JDBC_USERNAME=sonar
- SONARQUBE_JDBC_PASSWORD=sonar
- SONARQUBE_JDBC_URL=jdbc:postgresql://sonarqube-database:5432/sonar
And here is the result of the docker network inspect ic
command:
[
{
"Name": "ic",
"Id": "f0c1ec62f5c7667d3f0f8b3bac18ab9e7a7ec3c55a3bb890c2970f46f016e4a4",
"Scope": "local",
"Driver": "bridge",
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "172.19.0.0/16",
"Gateway": "172.19.0.1/16"
}
]
},
"Containers": {},
"Options": {
"com.docker.network.bridge.enable_icc": "true",
"com.docker.network.bridge.enable_ip_masquerade": "true"
}
}
]
As you can see, i've tried enabling icc, and ip_masquerade, just in case, but with no real succes.
The problem is that the sonarqube container crash, as it can't connect to the database.
Here is the exception sonarqube returns :
Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by 'sonar.jdbc.').
Maybe something i didn't understood about docker networks ?
We have downloaded the sonarqube image and trying to run it by using below command.
docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 -e SONARQUBE_JDBC_USERNAME=X -e SONARQUBE_JDBC_PASSWORD=Y -e SONARQUBE_JDBC_URL=jdbc:oracle:thin://Z.Z.Z.Z:P/orcl sonarqube:5.1
where X = Is my oracle RDS user name.
where Y = Is my oracle RDS password.
Z.Z.Z.Z = IP address of my oracle RDS
P = Port # of my oracle RDS.
orcl = SID name of my oracle RDS.
Whenever I run this command I get error when I check the logs of container.
Not able to find the driver in extensions/jdbc-driver/oracle folder.
How can we copy the driver in this folder inside docker?
I installed the Sonarqube6.2 using docker, but the page "Quality Profiles" is not opening.
The page show me a waiting image and not open.
I notice this happen when I use volumes, below is my docker-compose.yml
:
version: '2'
services:
sonarqube:
image: 'sonarqube:6.2'
ports:
- '9000:9000'
- '9092:9092'
volumes:
- /home/user/docker/sonar/conf:/opt/sonarqube/conf
- /home/user/docker/sonar/conf/data:/opt/sonarqube/data
- /home/user/docker/sonar/conf/extensions:/opt/sonarqube/extensions
- /home/user/docker/sonar/conf/bundled-plugins:/opt/sonarqube/lib/bundled-plugins
2 - If I don't use volumes, what I'll lost?
Can you help me?
sonarqube:6.1
First time start container everythis is ok.
When I restart container,all quality rules disappear.
But scan results still exist.
Why๏ผ
Dockerfile๏ผ
VOLUME "/opt/sonarqube/data"
I have uncommented the mysql template line in /conf/sonar.properties (added user and password as well)but it start using the default H2 database anyway. I tested the same configuration locally and it stars fine.
I run Sonarqube using docker-compose and the recipe https://github.com/SonarSource/docker-sonarqube/blob/master/recipes.md
When I login and check for updates, no update shows, and in the console I see this error (note that in my host I can access https://update.sonarsource.org/update-center.properties):
sonarqube_1 | 2016.12.02 11:57:11 ERROR web[][o.s.s.p.UpdateCenterClient] Fail to connect to update center
sonarqube_1 | org.sonar.api.utils.SonarException: Fail to download: https://update.sonarsource.org/update-center.properties (no proxy)
sonarqube_1 | at org.sonar.core.util.DefaultHttpDownloader.failToDownload(DefaultHttpDownloader.java:157) ~[sonar-core-6.1.jar:na]
sonarqube_1 | at org.sonar.core.util.DefaultHttpDownloader.readString(DefaultHttpDownloader.java:115) ~[sonar-core-6.1.jar:na]
sonarqube_1 | at org.sonar.api.utils.UriReader.readString(UriReader.java:72) ~[sonar-plugin-api-6.1.jar:na]
sonarqube_1 | at org.sonar.server.plugins.UpdateCenterClient.init(UpdateCenterClient.java:109) [sonar-server-6.1.jar:na]
sonarqube_1 | at org.sonar.server.plugins.UpdateCenterClient.getUpdateCenter(UpdateCenterClient.java:92) [sonar-server-6.1.jar:na]
sonarqube_1 | at org.sonar.server.plugins.UpdateCenterMatrixFactory.getUpdateCenter(UpdateCenterMatrixFactory.java:44) [sonar-server-6.1.jar:na]
sonarqube_1 | at org.sonar.server.plugins.ws.PluginWSCommons.compatiblePlugins(PluginWSCommons.java:277) [sonar-server-6.1.jar:na]
sonarqube_1 | at org.sonar.server.plugins.ws.PluginWSCommons.compatiblePluginsByKey(PluginWSCommons.java:282) [sonar-server-6.1.jar:na]
sonarqube_1 | at org.sonar.server.plugins.ws.PendingAction.handle(PendingAction.java:85) [sonar-server-6.1.jar:na]
sonarqube_1 | at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:109) [sonar-server-6.1.jar:na]
sonarqube_1 | at org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:74) [sonar-server-6.1.jar:na]
sonarqube_1 | at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126) [sonar-server-6.1.jar:na]
sonarqube_1 | at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:95) [sonar-server-6.1.jar:na]
sonarqube_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:60) [sonar-server-6.1.jar:na]
sonarqube_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at org.sonar.server.platform.web.RoutesFilter.doFilter(RoutesFilter.java:55) [sonar-server-6.1.jar:na]
sonarqube_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:113) [sonar-server-6.1.jar:na]
sonarqube_1 | at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:81) [sonar-server-6.1.jar:na]
sonarqube_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:191) [logback-access-1.1.3.jar:na]
sonarqube_1 | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_111]
sonarqube_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_111]
sonarqube_1 | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.32.jar:8.0.32]
sonarqube_1 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111]
sonarqube_1 | Caused by: java.net.UnknownHostException: update.sonarsource.org
sonarqube_1 | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) ~[na:1.8.0_111]
sonarqube_1 | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_111]
sonarqube_1 | at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_111]
sonarqube_1 | at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668) ~[na:1.8.0_111]
sonarqube_1 | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) ~[na:1.8.0_111]
sonarqube_1 | at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) ~[na:1.8.0_111]
sonarqube_1 | at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) ~[na:1.8.0_111]
sonarqube_1 | at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264) ~[na:1.8.0_111]
sonarqube_1 | at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) ~[na:1.8.0_111]
sonarqube_1 | at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) ~[na:1.8.0_111]
sonarqube_1 | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138) ~[na:1.8.0_111]
sonarqube_1 | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032) ~[na:1.8.0_111]
sonarqube_1 | at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) ~[na:1.8.0_111]
sonarqube_1 | at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153) ~[na:1.8.0_111]
sonarqube_1 | at org.sonar.core.util.DefaultHttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(DefaultHttpDownloader.java:305) ~[sonar-core-6.1.jar:na]
sonarqube_1 | at org.sonar.core.util.DefaultHttpDownloader.readString(DefaultHttpDownloader.java:113) ~[sonar-core-6.1.jar:na]
sonarqube_1 | ... 38 common frames omitted
When I map the default port (5432) of Postgres to any other port (5433, for example) the SonarQube container can't connect to the database and displays the following error:
java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by 'sonar.jdbc.').
My docker compose is simple just like the example below:
sonarqube:
ย ย image: sonarqube
ย ย ports:
ย ย - "19000: 9000"
ย ย - "19092: 9092"
ย ย links:
ย ย ย ย - sonardb
ย ย environment:
ย ย ย ย ย - SONARQUBE_JDBC_URL=jdbc:postgresql://sonardb:5433/sonar
sonardb:
ย ย image: postgres:latest
ย ย ports:
ย ย ย ย - "5433: 5432"
ย ย environment:
ย ย ย ย - POSTGRES_USER=sonar
ย ย ย ย - POSTGRES_PASSWORD=sonar
All the other configuration is set to default. If I just change the port mapping for "5432: 5432", the Sonar container connect in Postgres container without problems.
After upgrading to 6.1, 6.2, 6.3 or 6.3.1 images (alpine or not), my instance keeps failing with this message. The password is correct and available through the SONARQUBE_JDBC_PASSWORD environment variable set as a secret in Kubernetes. If I go back to 6.0, it just works.
Did something change regarding connecting to the database?
docker 1.12.1
OSX
$ docker run -it --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube
2016.09.30 10:22:09 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2016.09.30 10:22:09 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[es]: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djna.nosys=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonarqube/temp -javaagent:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /opt/sonarqube/temp/sq-process6442907441851531919properties
2016.09.30 10:22:10 INFO es[o.s.p.ProcessEntryPoint] Starting es
2016.09.30 10:22:10 INFO es[o.s.s.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2016.09.30 10:22:10 INFO es[o.elasticsearch.node] [sonar-1475230929584] version[2.3.3], pid[22], build[218bdf1/2016-05-17T15:40:04Z]
2016.09.30 10:22:10 INFO es[o.elasticsearch.node] [sonar-1475230929584] initializing ...
2016.09.30 10:22:10 INFO es[o.e.plugins] [sonar-1475230929584] modules [], plugins [], sites []
2016.09.30 10:22:10 INFO es[o.elasticsearch.env] [sonar-1475230929584] using [1] data paths, mounts [[/opt/sonarqube/data (/dev/vda1)]], net usable_space [4.5gb], net total_space [17.8gb], spins? [possibly], types [ext4]
2016.09.30 10:22:10 INFO es[o.elasticsearch.env] [sonar-1475230929584] heap size [990.7mb], compressed ordinary object pointers [true]
2016.09.30 10:23:16 INFO es[o.elasticsearch.node] [sonar-1475230929584] initialized
2016.09.30 10:23:16 INFO es[o.elasticsearch.node] [sonar-1475230929584] starting ...
2016.09.30 10:23:16 INFO es[o.e.transport] [sonar-1475230929584] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2016.09.30 10:23:16 INFO es[o.e.discovery] [sonar-1475230929584] sonarqube/p74qeoA3SSOVQO0Whuy-OQ
2016.09.30 10:24:05 WARN es[o.e.discovery] [sonar-1475230929584] waited for 30s and no initial state was set by the discovery
2016.09.30 10:24:05 INFO es[o.elasticsearch.node] [sonar-1475230929584] started
2016.09.30 10:24:05 INFO es[o.e.cluster.service] [sonar-1475230929584] new_master {sonar-1475230929584}{p74qeoA3SSOVQO0Whuy-OQ}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonar-1475230929584}, reason: zen-disco-join(elected_as_master, [0] joins received)
2016.09.30 10:24:05 INFO es[o.e.gateway] [sonar-1475230929584] recovered [0] indices into cluster_state
2016.09.30 10:24:05 INFO app[o.s.p.m.Monitor] Process[es] is up
2016.09.30 10:24:05 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom -Djava.io.tmpdir=/opt/sonarqube/temp -javaagent:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/server/*:/opt/sonarqube/lib/jdbc/h2/h2-1.3.176.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process9041180091653102695properties
2016.09.30 10:24:06 INFO web[o.s.p.ProcessEntryPoint] Starting web
2016.09.30 10:24:06 INFO web[o.s.s.a.TomcatContexts] Webapp directory: /opt/sonarqube/web
2016.09.30 10:24:07 INFO web[o.a.c.h.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.09.30 10:24:07 INFO web[o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2016.09.30 10:24:07 INFO web[o.s.s.p.ServerImpl] SonarQube Server / 6.0 / 93442889cd219e78b028c7dcf51a30de74c987fe
2016.09.30 10:24:08 INFO web[o.s.s.d.EmbeddedDatabase] Starting embedded database on port 9092 with url jdbc:h2:tcp://localhost:9092/sonar
2016.09.30 10:24:08 INFO web[o.s.s.d.EmbeddedDatabase] Embedded database started. Data stored in: /opt/sonarqube/data
2016.09.30 10:24:08 INFO web[o.sonar.db.Database] Create JDBC data source for jdbc:h2:tcp://localhost:9092/sonar
2016.09.30 10:24:08 WARN web[o.s.d.DatabaseChecker] H2 database should be used for evaluation purpose only
2016.09.30 10:24:09 INFO web[o.s.s.p.DefaultServerFileSystem] SonarQube home: /opt/sonarqube
2016.09.30 10:24:09 INFO web[o.e.plugins] [sonar-1475230929584] modules [], plugins [], sites []
2016.09.30 10:25:14 INFO web[o.s.s.p.ServerPluginRepository] Plugin C# [csharp] installed
2016.09.30 10:25:14 INFO web[o.s.s.p.ServerPluginRepository] Plugin JavaScript [javascript] installed
2016.09.30 10:25:14 INFO web[o.s.s.p.ServerPluginRepository] Plugin Git [scmgit] installed
2016.09.30 10:25:14 INFO web[o.s.s.p.ServerPluginRepository] Plugin Java [java] installed
2016.09.30 10:25:14 INFO web[o.s.s.p.ServerPluginRepository] Plugin SVN [scmsvn] installed
2016.09.30 10:25:14 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin C# / 5.3.1 / 829e9f5ce2582c2e45f2db2130d2fbaa509fbc64
2016.09.30 10:25:14 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin Git / 1.2 / a713dd64daf8719ba4e7f551f9a1966c62690c17
2016.09.30 10:25:14 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin Java / 4.0 / b653c6c8640ab3d6015d036a060f58e027a653af
2016.09.30 10:25:14 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin JavaScript / 2.14 / 8e37a262d72dd863345f9c6e87421e2d1853a2e6
2016.09.30 10:25:14 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SVN / 1.3 / aff503d48bc77b07c2b62abf93249d0a20bd355c
2016.09.30 10:25:15 INFO web[o.s.s.d.m.DatabaseMigrator] Create database
2016.09.30 10:25:15 INFO web[o.s.s.p.RailsAppsDeployer] Deploying Ruby on Rails applications
2016.09.30 10:25:16 INFO web[o.s.s.p.UpdateCenterClient] Update center: http://update.sonarsource.org/update-center.properties (no proxy)
2016.09.30 10:25:17 INFO web[o.s.s.e.IndexCreator] Create index tests
2016.09.30 10:25:17 INFO es[o.e.cluster.metadata] [sonar-1475230929584] [tests] creating index, cause [api], templates [], shards [5]/[0], mappings []
2016.09.30 10:25:24 INFO web[o.e.client.transport] [sonar-1475230929584] failed to get node info for {#transport#-1}{127.0.0.1}{127.0.0.1:9001}, disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException: [][127.0.0.1:9001][cluster:monitor/nodes/liveness] request_id [3] timed out after [5001ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:679) ~[elasticsearch-2.3.3.jar:2.3.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
2016.09.30 10:25:34 INFO web[o.e.client.transport] [sonar-1475230929584] failed to get node info for {#transport#-1}{127.0.0.1}{127.0.0.1:9001}, disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException: [][127.0.0.1:9001][cluster:monitor/nodes/liveness] request_id [4] timed out after [5000ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:679) ~[elasticsearch-2.3.3.jar:2.3.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
2016.09.30 10:25:44 INFO web[o.e.client.transport] [sonar-1475230929584] failed to get node info for {#transport#-1}{127.0.0.1}{127.0.0.1:9001}, disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException: [][127.0.0.1:9001][cluster:monitor/nodes/liveness] request_id [5] timed out after [5000ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:679) ~[elasticsearch-2.3.3.jar:2.3.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
2016.09.30 10:25:54 INFO web[o.e.client.transport] [sonar-1475230929584] failed to get node info for {#transport#-1}{127.0.0.1}{127.0.0.1:9001}, disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException: [][127.0.0.1:9001][cluster:monitor/nodes/liveness] request_id [6] timed out after [5000ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:679) ~[elasticsearch-2.3.3.jar:2.3.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
2016.09.30 10:26:04 INFO web[o.e.client.transport] [sonar-1475230929584] failed to get node info for {#transport#-1}{127.0.0.1}{127.0.0.1:9001}, disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException: [][127.0.0.1:9001][cluster:monitor/nodes/liveness] request_id [7] timed out after [5001ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:679) ~[elasticsearch-2.3.3.jar:2.3.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
2016.09.30 10:26:14 INFO web[o.e.client.transport] [sonar-1475230929584] failed to get node info for {#transport#-1}{127.0.0.1}{127.0.0.1:9001}, disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException: [][127.0.0.1:9001][cluster:monitor/nodes/liveness] request_id [8] timed out after [5000ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:679) ~[elasticsearch-2.3.3.jar:2.3.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
2016.09.30 10:26:22 WARN es[o.e.cluster.service] [sonar-1475230929584] cluster state update task [create-index [tests], cause [api]] took 1m above the warn threshold of 30s
2016.09.30 10:26:32 INFO web[o.e.client.transport] [sonar-1475230929584] failed to get node info for {#transport#-1}{127.0.0.1}{127.0.0.1:9001}, disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException: [][127.0.0.1:9001][cluster:monitor/nodes/liveness] request_id [10] timed out after [5001ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:679) ~[elasticsearch-2.3.3.jar:2.3.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
2016.09.30 10:26:42 INFO web[o.e.client.transport] [sonar-1475230929584] failed to get node info for {#transport#-1}{127.0.0.1}{127.0.0.1:9001}, disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException: [][127.0.0.1:9001][cluster:monitor/nodes/liveness] request_id [11] timed out after [5000ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:679) ~[elasticsearch-2.3.3.jar:2.3.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
2016.09.30 10:26:52 INFO web[o.e.client.transport] [sonar-1475230929584] failed to get node info for {#transport#-1}{127.0.0.1}{127.0.0.1:9001}, disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException: [][127.0.0.1:9001][cluster:monitor/nodes/liveness] request_id [12] timed out after [5001ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:679) ~[elasticsearch-2.3.3.jar:2.3.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
2016.09.30 10:27:02 INFO web[o.e.client.transport] [sonar-1475230929584] failed to get node info for {#transport#-1}{127.0.0.1}{127.0.0.1:9001}, disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException: [][127.0.0.1:9001][cluster:monitor/nodes/liveness] request_id [13] timed out after [5000ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:679) ~[elasticsearch-2.3.3.jar:2.3.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
2016.09.30 10:27:12 INFO web[o.e.client.transport] [sonar-1475230929584] failed to get node info for {#transport#-1}{127.0.0.1}{127.0.0.1:9001}, disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException: [][127.0.0.1:9001][cluster:monitor/nodes/liveness] request_id [14] timed out after [5000ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:679) ~[elasticsearch-2.3.3.jar:2.3.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
2016.09.30 10:27:22 INFO web[o.e.client.transport] [sonar-1475230929584] failed to get node info for {#transport#-1}{127.0.0.1}{127.0.0.1:9001}, disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException: [][127.0.0.1:9001][cluster:monitor/nodes/liveness] request_id [15] timed out after [5000ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:679) ~[elasticsearch-2.3.3.jar:2.3.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
2016.09.30 10:27:26 INFO web[o.s.s.d.EmbeddedDatabase] Embedded database stopped
2016.09.30 10:27:26 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{127.0.0.1}{127.0.0.1:9001}]
at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:290) ~[elasticsearch-2.3.3.jar:2.3.3]
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:207) ~[elasticsearch-2.3.3.jar:2.3.3]
at org.elasticsearch.client.transport.support.TransportProxyClient.execute(TransportProxyClient.java:55) ~[elasticsearch-2.3.3.jar:2.3.3]
at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:288) ~[elasticsearch-2.3.3.jar:2.3.3]
at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:359) ~[elasticsearch-2.3.3.jar:2.3.3]
at org.elasticsearch.client.support.AbstractClient$ClusterAdmin.execute(AbstractClient.java:853) ~[elasticsearch-2.3.3.jar:2.3.3]
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:86) ~[elasticsearch-2.3.3.jar:2.3.3]
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:56) ~[elasticsearch-2.3.3.jar:2.3.3]
at org.sonar.server.es.request.ProxyClusterHealthRequestBuilder.get(ProxyClusterHealthRequestBuilder.java:42) ~[sonar-server-6.0.jar:na]
at org.sonar.server.es.request.ProxyClusterHealthRequestBuilder.get(ProxyClusterHealthRequestBuilder.java:32) ~[sonar-server-6.0.jar:na]
at org.sonar.server.es.EsClient.waitForStatus(EsClient.java:130) ~[sonar-server-6.0.jar:na]
at org.sonar.server.es.IndexCreator.createIndex(IndexCreator.java:88) ~[sonar-server-6.0.jar:na]
at org.sonar.server.es.IndexCreator.start(IndexCreator.java:66) ~[sonar-server-6.0.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_102]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) ~[picocontainer-2.15.jar:na]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) ~[picocontainer-2.15.jar:na]
at org.sonar.core.platform.ComponentContainer$1.start(ComponentContainer.java:320) ~[sonar-core-6.0.jar:na]
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.Stored.start(Stored.java:110) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767) ~[picocontainer-2.15.jar:na]
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:141) ~[sonar-core-6.0.jar:na]
at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:84) ~[sonar-server-6.0.jar:na]
at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:687) ~[sonar-server-6.0.jar:na]
at org.sonar.server.platform.Platform.start(Platform.java:216) ~[sonar-server-6.0.jar:na]
at org.sonar.server.platform.Platform.startLevel34Containers(Platform.java:190) ~[sonar-server-6.0.jar:na]
at org.sonar.server.platform.Platform.doStart(Platform.java:113) ~[sonar-server-6.0.jar:na]
at org.sonar.server.platform.Platform.doStart(Platform.java:99) ~[sonar-server-6.0.jar:na]
at org.sonar.server.platform.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:44) ~[sonar-server-6.0.jar:na]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) [tomcat-embed-core-8.0.32.jar:8.0.32]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
2016.09.30 10:27:26 ERROR web[o.a.c.c.StandardContext] One or more listeners failed to start. Full details will be found in the appropriate container log file
2016.09.30 10:27:26 ERROR web[o.a.c.c.StandardContext] Context [] startup failed due to previous errors
2016.09.30 10:27:26 INFO web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.09.30 10:27:26 INFO web[o.s.s.a.TomcatAccessLog] Web server is started
2016.09.30 10:27:26 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2016.09.30 10:27:26 WARN web[o.s.p.ProcessEntryPoint] Fail to start web
java.lang.IllegalStateException: Webapp did not start
at org.sonar.server.app.EmbeddedTomcat.isUp(EmbeddedTomcat.java:84) ~[sonar-server-6.0.jar:na]
at org.sonar.server.app.WebServer.isUp(WebServer.java:47) [sonar-server-6.0.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:105) ~[sonar-process-6.0.jar:na]
at org.sonar.server.app.WebServer.main(WebServer.java:68) [sonar-server-6.0.jar:na]
2016.09.30 10:27:26 INFO web[o.a.c.h.Http11NioProtocol] Pausing ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.09.30 10:27:26 INFO web[o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.09.30 10:27:26 INFO web[o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.09.30 10:27:26 INFO web[o.s.s.a.TomcatAccessLog] Web server is stopped
2016.09.30 10:27:26 INFO es[o.e.c.r.allocation] [sonar-1475230929584] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[tests][4]] ...]).
2016.09.30 10:28:29 INFO app[o.s.p.m.Monitor] Process[es] is stopping
2016.09.30 10:28:29 INFO es[o.s.p.StopWatcher] Stopping process
2016.09.30 10:28:29 INFO es[o.elasticsearch.node] [sonar-1475230929584] stopping ...
2016.09.30 10:28:29 INFO es[o.elasticsearch.node] [sonar-1475230929584] stopped
2016.09.30 10:28:29 INFO es[o.elasticsearch.node] [sonar-1475230929584] closing ...
2016.09.30 10:28:29 INFO es[o.elasticsearch.node] [sonar-1475230929584] closed
2016.09.30 10:28:30 INFO app[o.s.p.m.Monitor] Process[es] is stopped
Hello, I try to experience the docker-sonarqube in the recent time.
Since I am just a beginner of docker, I am not sure about the differences between version 5.6 and the 5.6-alpine . Are java:8-alpine and the java:8 just different in tags ?
I am glad to receive your response, thanks a lot :)
I am trying to run docker image of sonarqube with mysql db by below dockercommand:
sudo docker run -d --name hg-sonarqube
-p 9000:9000
-e SONARQUBE_JDBC_USERNAME='sonar'
-e SONARQUBE_JDBC_PASSWORD='sonar'
-e SONARQUBE_JDBC_URL='jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance'
sonarqube
But container is not running due to error:
2016.12.28 11:20:11 INFO web[][o.sonar.db.Database] Create JDBC data source for jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
2016.12.28 11:20:11 ERROR web[][o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.web.PlatformServletContextListener
java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by 'sonar.jdbc.').
at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:108)
MySQL service is running and sonar database already created. I used command to create database and give privileges in Ubuntu-14.04.
echo "GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY 'welcome123'; flush privileges;" | mysql -u root -pwelcome123
echo "CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE USER 'sonar' IDENTIFIED BY 'sonar';GRANT ALL PRIVILEGES ON sonar.* TO 'sonar'@'%' IDENTIFIED BY 'sonar'; GRANT ALL ON sonar.* TO 'sonar'@'localhost' IDENTIFIED BY 'sonar'; flush privileges;" | mysql -u root -pwelcome123
I got the image in Doker-Hub and ran it with Kitematic.
After it started, I updated the required plugins.
Then I wanted to use the Postgresql db provided, by changing the envVar available in Kitematic as the following:
I also try with jdbc:postgresql://db:5432/sonar from the documentation linked recipe https://github.com/SonarSource/docker-sonarqube/blob/master/recipes.md
And the log is the following:
2016.04.27 14:14:31 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2016.04.27 14:14:31 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[search]: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonarqube/temp -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /tmp/sq-process5449093179564171090properties
2016.04.27 14:14:32 INFO es[o.s.p.ProcessEntryPoint] Starting search
2016.04.27 14:14:32 INFO es[o.s.s.SearchSettings] Elasticsearch listening on 127.0.0.1:9001
2016.04.27 14:14:32 INFO es[o.elasticsearch.node] [sonar-1461766470828] version[1.7.2], pid[15], build[e43676b/2015-09-14T09:49:53Z]
2016.04.27 14:14:32 INFO es[o.elasticsearch.node] [sonar-1461766470828] initializing ...
2016.04.27 14:14:32 INFO es[o.e.plugins] [sonar-1461766470828] loaded [], sites []
2016.04.27 14:14:32 INFO es[o.elasticsearch.env] [sonar-1461766470828] using [1] data paths, mounts [[/opt/sonarqube/data (Users)]], net usable_space [22.2gb], net total_space [232.6gb], types [vboxsf]
2016.04.27 14:14:35 WARN es[o.e.bootstrap] JNA not found. native methods will be disabled.
2016.04.27 14:14:38 INFO es[o.elasticsearch.node] [sonar-1461766470828] initialized
2016.04.27 14:14:38 INFO es[o.elasticsearch.node] [sonar-1461766470828] starting ...
2016.04.27 14:14:38 INFO es[o.e.transport] [sonar-1461766470828] bound_address {inet[/127.0.0.1:9001]}, publish_address {inet[/127.0.0.1:9001]}
2016.04.27 14:14:38 INFO es[o.e.discovery] [sonar-1461766470828] sonarqube/WPNyZ44KQG6Hlsgsb561uw
2016.04.27 14:14:41 INFO es[o.e.cluster.service] [sonar-1461766470828] new_master [sonar-1461766470828][WPNyZ44KQG6Hlsgsb561uw][a9b41b55809e][inet[/127.0.0.1:9001]]{rack_id=sonar-1461766470828}, reason: zen-disco-join (elected_as_master)
2016.04.27 14:14:41 INFO es[o.elasticsearch.node] [sonar-1461766470828] started
2016.04.27 14:14:41 INFO es[o.e.gateway] [sonar-1461766470828] recovered [6] indices into cluster_state
2016.04.27 14:14:50 INFO app[o.s.p.m.Monitor] Process[search] is up
2016.04.27 14:14:50 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx768m -Xms256m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.security.egd=file:/dev/./urandom -Djava.io.tmpdir=/opt/sonarqube/temp -cp ./lib/common/*:./lib/server/*:/opt/sonarqube/lib/jdbc/postgresql/postgresql-9.3-1102-jdbc41.jar org.sonar.server.app.WebServer /tmp/sq-process321600078800162041properties
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=160m; support was removed in 8.0
2016.04.27 14:14:51 INFO web[o.s.p.ProcessEntryPoint] Starting web
2016.04.27 14:14:51 INFO web[o.s.s.a.TomcatContexts] Webapp directory: /opt/sonarqube/web
2016.04.27 14:14:52 INFO web[o.a.c.h.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.04.27 14:14:52 INFO web[o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2016.04.27 14:14:53 INFO web[o.s.s.p.ServerImpl] SonarQube Server / 5.4 / 7b02df9be3cd9448699b5857586e1c6e2b28c007
2016.04.27 14:14:53 INFO web[o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://localhost/sonar
2016.04.27 14:14:53 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by 'sonar.jdbc.').
at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:104) ~[sonar-db-5.4.jar:na]
at org.sonar.db.DefaultDatabase.start(DefaultDatabase.java:71) ~[sonar-db-5.4.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45-internal]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45-internal]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45-internal]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45-internal]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) ~[picocontainer-2.15.jar:na]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) ~[picocontainer-2.15.jar:na]
at org.sonar.core.platform.ComponentContainer$1.start(ComponentContainer.java:312) ~[sonar-core-5.4.jar:na]
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.Stored.start(Stored.java:110) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767) ~[picocontainer-2.15.jar:na]
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:134) ~[sonar-core-5.4.jar:na]
at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:84) ~[sonar-server-5.4.jar:na]
at org.sonar.server.platform.Platform.start(Platform.java:214) ~[sonar-server-5.4.jar:na]
at org.sonar.server.platform.Platform.startLevel1Container(Platform.java:173) ~[sonar-server-5.4.jar:na]
at org.sonar.server.platform.Platform.init(Platform.java:90) ~[sonar-server-5.4.jar:na]
at org.sonar.server.platform.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43) ~[sonar-server-5.4.jar:na]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812) [tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255) [tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) [tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) [tomcat-embed-core-8.0.30.jar:8.0.30]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_45-internal]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45-internal]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45-internal]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45-internal]
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) ~[commons-dbcp-1.4.jar:1.4]
at org.sonar.db.profiling.NullConnectionInterceptor.getConnection(NullConnectionInterceptor.java:31) ~[sonar-db-5.4.jar:na]
at org.sonar.db.profiling.ProfiledDataSource.getConnection(ProfiledDataSource.java:323) ~[sonar-db-5.4.jar:na]
at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:102) ~[sonar-db-5.4.jar:na]
... 30 common frames omitted
Caused by: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:215) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:144) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:29) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:21) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:31) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.Driver.makeConnection(Driver.java:410) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.Driver.connect(Driver.java:280) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ~[commons-dbcp-1.4.jar:1.4]
... 35 common frames omitted
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_45-internal]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345) ~[na:1.8.0_45-internal]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_45-internal]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_45-internal]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_45-internal]
at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_45-internal]
at org.postgresql.core.PGStream.<init>(PGStream.java:61) ~[postgresql-9.3-1102-jdbc41.jar:na]
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:109) ~[postgresql-9.3-1102-jdbc41.jar:na]
... 47 common frames omitted
2016.04.27 14:14:53 ERROR web[o.a.c.c.StandardContext] One or more listeners failed to start. Full details will be found in the appropriate container log file
2016.04.27 14:14:53 ERROR web[o.a.c.c.StandardContext] Context [] startup failed due to previous errors
2016.04.27 14:14:54 WARN web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.util.TimerThread.mainLoop(Timer.java:552)
java.util.TimerThread.run(Timer.java:505)
2016.04.27 14:14:54 INFO web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.04.27 14:14:54 INFO web[o.s.s.a.TomcatAccessLog] Web server is started
2016.04.27 14:14:54 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2016.04.27 14:14:54 WARN web[o.s.p.ProcessEntryPoint] Fail to start web
java.lang.IllegalStateException: Webapp did not start
at org.sonar.server.app.EmbeddedTomcat.isReady(EmbeddedTomcat.java:84) ~[sonar-server-5.4.jar:na]
at org.sonar.server.app.WebServer.isReady(WebServer.java:47) [sonar-server-5.4.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:84) ~[sonar-process-5.4.jar:na]
at org.sonar.server.app.WebServer.main(WebServer.java:68) [sonar-server-5.4.jar:na]
2016.04.27 14:14:54 INFO web[o.a.c.h.Http11NioProtocol] Pausing ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.04.27 14:14:55 INFO web[o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.04.27 14:14:55 INFO web[o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.04.27 14:14:55 INFO web[o.s.s.a.TomcatAccessLog] Web server is stopped
2016.04.27 14:14:55 INFO app[o.s.p.m.Monitor] Process[search] is stopping
2016.04.27 14:14:55 INFO es[o.s.p.StopWatcher] Stopping process
2016.04.27 14:14:55 INFO es[o.elasticsearch.node] [sonar-1461766470828] stopping ...
2016.04.27 14:14:57 INFO es[o.elasticsearch.node] [sonar-1461766470828] stopped
2016.04.27 14:14:57 INFO es[o.elasticsearch.node] [sonar-1461766470828] closing ...
2016.04.27 14:14:57 INFO es[o.elasticsearch.node] [sonar-1461766470828] closed
2016.04.27 14:14:57 INFO app[o.s.p.m.Monitor] Process[search] is stopped
Hi all,
I am trying to create a sonarqube server in a docker swarm cluster to have a more automated availability.
According to documentation to have a sonarqube server in a cluster(http://docs.sonarqube.org/display/SONAR/How+To+Implement+an+Active-Passive+Cluster) I should sync some directories before start the backup instance, considering the database has it own cluster solution and balance.
To do this I must be able to expose the data in the $SONAR_HOME/conf, $SONAR_HOME/extensions and $SONAR_HOME/data to any new container in case of failure of the current container. I was planning to use NFS to sonarqube folders and I am not considering here the avaliability of NFS server. Below is an example of the service create command thinking that we will only have 1 container running at any:
192.168.1.1 is a postgresql server
192.168.1.2 is a NFS server
docker service create --name sonarqube
-p 9000:9000 -p 9092:9092
-e SONARQUBE_JDBC_USERNAME=sonar
-e SONARQUBE_JDBC_PASSWORD=sonar
-e SONARQUBE_JDBC_URL=jdbc:postgresql://192.168.1.1/sonar
--mount type=volume,volume-opt=type=nfs,volume-opt=o=addr=192.168.1.2,ro=false,volume-opt=device=:/var/nfs/sonarqube/extensions,source=sonarplugins,target=/opt/sonarqube/extensions
--mount type=volume,volume-opt=type=nfs,volume-opt=o=addr=192.168.1.2,ro=false,volume-opt=device=:/var/nfs/sonarqube/conf,source=sonarplugins,target=/opt/sonarqube/conf
--mount type=volume,volume-opt=type=nfs,volume-opt=o=addr=192.168.1.2,ro=false,volume-opt=device=:/var/nfs/sonarqube/data,source=sonarplugins,target=/opt/sonarqube/data
--replicas 1 sonarqube:alpine
Do you think this is a good solution?
i use windows10,then "&" in cmd line have probleam.
-e SONARQUBE_JDBC_URL=jdbc:mysql://localhost:32768/sonar?useUnicode=true&characterEncoding=utf8
[root@k8s-09 ~]# kubectl logs sonarqube-1-2134697319-d4sha
2016.12.05 22:02:21 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2016.12.05 22:02:21 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[es]: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djna.nosys=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonarqube/temp -javaagent:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /opt/sonarqube/temp/sq-process3775526920578968941properties
2016.12.05 22:02:22 INFO es[][o.s.p.ProcessEntryPoint] Starting es
2016.12.05 22:02:22 INFO es[][o.s.s.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2016.12.05 22:02:22 INFO es[][o.elasticsearch.node] [sonarqube] version[2.3.3], pid[66], build[218bdf1/2016-05-17T15:40:04Z]
2016.12.05 22:02:22 INFO es[][o.elasticsearch.node] [sonarqube] initializing ...
2016.12.05 22:02:22 INFO es[][o.e.plugins] [sonarqube] modules [], plugins [], sites []
2016.12.05 22:02:22 INFO es[][o.elasticsearch.env] [sonarqube] using [1] data paths, mounts [[/opt/sonarqube/data (/dev/mapper/centos-root)]], net usable_space [40.5gb], net total_space [49.9gb], spins? [possibly], types [xfs]
2016.12.05 22:02:22 INFO es[][o.elasticsearch.env] [sonarqube] heap size [989.8mb], compressed ordinary object pointers [true]
2016.12.05 22:02:23 INFO es[][o.elasticsearch.node] [sonarqube] initialized
2016.12.05 22:02:23 INFO es[][o.elasticsearch.node] [sonarqube] starting ...
2016.12.05 22:02:24 INFO es[][o.e.transport] [sonarqube] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2016.12.05 22:02:24 INFO es[][o.e.discovery] [sonarqube] sonarqube/Sy25XaejRS6er-jz8RhESw
2016.12.05 22:02:27 INFO es[][o.e.cluster.service] [sonarqube] new_master {sonarqube}{Sy25XaejRS6er-jz8RhESw}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube, master=true}, reason: zen-disco-join(elected_as_master, [0] joins received)
2016.12.05 22:02:27 INFO es[][o.elasticsearch.node] [sonarqube] started
2016.12.05 22:02:27 INFO es[][o.e.gateway] [sonarqube] recovered [0] indices into cluster_state
2016.12.05 22:02:27 INFO app[][o.s.p.m.Monitor] Process[es] is up
2016.12.05 22:02:27 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[web]: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom -Djava.io.tmpdir=/opt/sonarqube/temp -javaagent:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/server/*:/opt/sonarqube/lib/jdbc/h2/h2-1.3.176.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process348451910190347240properties
2016.12.05 22:02:28 INFO web[][o.s.p.ProcessEntryPoint] Starting web
2016.12.05 22:02:28 INFO web[][o.s.s.a.TomcatContexts] Webapp directory: /opt/sonarqube/web
2016.12.05 22:02:28 INFO web[][o.a.c.h.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.12.05 22:02:28 INFO web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2016.12.05 22:02:29 INFO web[][o.e.plugins] [Masked Rose] modules [], plugins [], sites []
2016.12.05 22:02:29 INFO web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [127.0.0.1:9001]
2016.12.05 22:02:29 INFO web[][o.s.s.p.LogServerVersion] SonarQube Server / 6.1 / dc148a71a1c184ccad588b66251980c994879dff
2016.12.05 22:02:29 INFO web[][o.s.s.p.d.EmbeddedDatabase] Starting embedded database on port 9092 with url jdbc:h2:tcp://localhost:9092/sonar
2016.12.05 22:02:30 ERROR web[][o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.web.PlatformServletContextListener
org.sonar.api.utils.SonarException: Unable to start database
at org.sonar.server.platform.db.EmbeddedDatabase.startServer(EmbeddedDatabase.java:82) ~[sonar-server-6.1.jar:na]
at org.sonar.server.platform.db.EmbeddedDatabase.start(EmbeddedDatabase.java:61) ~[sonar-server-6.1.jar:na]
at org.sonar.server.platform.db.EmbeddedDatabaseFactory.start(EmbeddedDatabaseFactory.java:44) ~[sonar-server-6.1.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) ~[picocontainer-2.15.jar:na]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) ~[picocontainer-2.15.jar:na]
at org.sonar.core.platform.ComponentContainer$1.start(ComponentContainer.java:320) ~[sonar-core-6.1.jar:na]
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.Stored.start(Stored.java:110) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767) ~[picocontainer-2.15.jar:na]
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:141) ~[sonar-core-6.1.jar:na]
at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:88) ~[sonar-server-6.1.jar:na]
at org.sonar.server.platform.Platform.start(Platform.java:216) ~[sonar-server-6.1.jar:na]
at org.sonar.server.platform.Platform.startLevel1Container(Platform.java:175) ~[sonar-server-6.1.jar:na]
at org.sonar.server.platform.Platform.init(Platform.java:90) ~[sonar-server-6.1.jar:na]
at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:44) ~[sonar-server-6.1.jar:na]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) [tomcat-embed-core-8.0.32.jar:8.0.32]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_111]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111]
Caused by: org.h2.jdbc.JdbcSQLException: IO Exception: "java.net.UnknownHostException: sonarqube-1-2134697319-d4sha: sonarqube-1-2134697319-d4sha: Name or service not known" [90028-176]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344) ~[h2-1.3.176.jar:1.3.176]
at org.h2.message.DbException.get(DbException.java:167) ~[h2-1.3.176.jar:1.3.176]
at org.h2.message.DbException.convert(DbException.java:286) ~[h2-1.3.176.jar:1.3.176]
at org.h2.util.NetUtils.getLocalAddress(NetUtils.java:269) ~[h2-1.3.176.jar:1.3.176]
at org.h2.server.TcpServer.getURL(TcpServer.java:203) ~[h2-1.3.176.jar:1.3.176]
at org.h2.tools.Server.start(Server.java:477) ~[h2-1.3.176.jar:1.3.176]
at org.sonar.server.platform.db.EmbeddedDatabase.startServer(EmbeddedDatabase.java:78) ~[sonar-server-6.1.jar:na]
... 31 common frames omitted
Caused by: java.net.UnknownHostException: sonarqube-1-2134697319-d4sha: sonarqube-1-2134697319-d4sha: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1505) ~[na:1.8.0_111]
at org.h2.util.NetUtils.getLocalAddress(NetUtils.java:267) ~[h2-1.3.176.jar:1.3.176]
... 34 common frames omitted
Caused by: java.net.UnknownHostException: sonarqube-1-2134697319-d4sha: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[na:1.8.0_111]
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) ~[na:1.8.0_111]
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) ~[na:1.8.0_111]
at java.net.InetAddress.getLocalHost(InetAddress.java:1500) ~[na:1.8.0_111]
... 35 common frames omitted
.....
[root@k8s-09 ~]#
I test all available SonarQube docker image version with H2. All run into this situation and the pod is in
CrashLoopBackOff
[root@k8s-09 ~]# kubectl get pods
NAME READY STATUS RESTARTS AGE
busybox-3604520811-5ma4w 0/1 CrashLoopBackOff 1154 4d
curl-2421989462-9xhbw 1/1 Running 0 4d
gitlab-1983252133-tlaum 1/1 Running 1 14d
jenkins-2377375696-8qevu 1/1 Running 0 7d
jenkins-two-2811552478-2n462 1/1 Running 1 7d
nexus-1437449777-a11o6 1/1 Running 0 11d
nexus-two-3664299243-fe5cu 1/1 Running 0 6d
sonarqube-1-2134697319-d4sha 0/1 CrashLoopBackOff 1192 4d
[root@k8s-09 ~]#
I find k8s-dns is in unstable status in my k8s cluster. the reason is under checking see
kubernetes/kubernetes#37833
in minikube image is running without any problem and I list the env of container there as
https://gist.github.com/BruceZu/fbf4b60a2abd615e051f2730118097ef
[root@k8s-09 ~]# kubectl get pod
NAME READY STATUS RESTARTS AGE
busybox-3604520811-5ma4w 0/1 CrashLoopBackOff 1417 5d
curl-2421989462-9xhbw 1/1 Running 0 5d
gitlab-1983252133-tlaum 1/1 Running 1 15d
jenkins-2377375696-8qevu 1/1 Running 0 8d
jenkins-two-2811552478-2n462 1/1 Running 1 8d
nexus-1437449777-a11o6 1/1 Running 0 12d
nexus-two-3664299243-fe5cu 1/1 Running 0 7d
sonarqube-1-3688817312-73wy3 0/1 CrashLoopBackOff 151 19h
[root@k8s-09 ~]#
[root@k8s-09 ~]# kubectl get deployment sonarqube-1 -o yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "3"
creationTimestamp: 2016-11-30T23:42:07Z
generation: 6
labels:
run: sonarqube-1
name: sonarqube-1
namespace: default
resourceVersion: "2948488"
selfLink: /apis/extensions/v1beta1/namespaces/default/deployments/sonarqube-1
uid: 9ae0a63a-b756-11e6-9595-ecf4bbc78ce4
spec:
replicas: 1
selector:
matchLabels:
run: sonarqube-1
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
run: sonarqube-1
spec:
containers:
- image: sonarqube:latest
imagePullPolicy: Always
name: sonarqube
ports:
- containerPort: 9000
protocol: TCP
- containerPort: 9092
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
dnsPolicy: ClusterFirst
restartPolicy: Always
securityContext: {}
terminationGracePeriodSeconds: 30
status:
observedGeneration: 6
replicas: 1
unavailableReplicas: 1
updatedReplicas: 1
[root@k8s-09 ~]# kubectl describe pod sonarqube-1-2134697319-d4sha
Name: sonarqube-1-2134697319-d4sha
Namespace: default
Node: k8s-04.huaweilab.com/10.145.101.41
Start Time: Wed, 30 Nov 2016 18:28:33 -0800
Labels: pod-template-hash=2134697319
run=sonarqube-1
Status: Running
IP: 10.32.0.4
Controllers: ReplicaSet/sonarqube-1-2134697319
Containers:
sonarqube:
Container ID: docker://1beba77ea09f146d0bca557d092f1e4f9dbb114311795d2b95d77a9d55937b5c
Image: sonarqube:latest
Image ID: docker://sha256:7333743a8ff3a257d351307a74123f4e7c46933dae4af4aacc5020fc1a6e328f
Ports: 9000/TCP, 9092/TCP
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Completed
Exit Code: 0
Started: Thu, 01 Dec 2016 10:57:30 -0800
Finished: Thu, 01 Dec 2016 10:57:40 -0800
Ready: False
Restart Count: 180
Volume Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-ti679 (ro)
Environment Variables: <none>
Conditions:
Type Status
Initialized True
Ready False
PodScheduled True
Volumes:
default-token-ti679:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-ti679
QoS Class: BestEffort
Tolerations: <none>
Events:
FirstSeen LastSeen Count From SubobjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
15h <invalid> 181 {kubelet k8s-04.huaweilab.com} spec.containers{sonarqube} Normal Pulling pulling image "sonarqube:latest"
15h <invalid> 181 {kubelet k8s-04.huaweilab.com} spec.containers{sonarqube} Normal Pulled Successfully pulled image "sonarqube:latest"
15h <invalid> 172 {kubelet k8s-04.huaweilab.com} spec.containers{sonarqube} Normal Created (events with common reason combined)
15h <invalid> 172 {kubelet k8s-04.huaweilab.com} spec.containers{sonarqube} Normal Started (events with common reason combined)
15h <invalid> 4055 {kubelet k8s-04.huaweilab.com} spec.containers{sonarqube} Warning BackOff Back-off restarting failed docker container
15h <invalid> 4029 {kubelet k8s-04.huaweilab.com} Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "sonarqube" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=sonarqube pod=sonarqube-1-2134697319-d4sha_default(47fcae7f-b765-11e6-9595-ecf4bbc78ce4)"
But I can deploy GitLab, Jenkins and Nexus successfully.
So is there some work around that can avoid hitting the k8s-dns issue just like other image.
Thank you!
Im having trouble starting my container. Im using the standard setup. Has anyone else seen this issue?
Appreciate any tips.
Using sonarqube/5.4 container
2016.04.13 16:59:41 WARN web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)
2016.04.13 16:59:41 INFO web[o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.04.13 16:59:42 INFO web[o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.04.13 16:59:42 INFO web[o.s.s.a.TomcatAccessLog] Web server is stopped
2016.04.13 16:59:42 INFO app[o.s.p.m.Monitor] Process[web] is stopped
2016.04.13 16:59:42 INFO app[o.s.p.m.Monitor] Process[search] is stopping
Is there a version of Sonarqube docker that I can run on Windows 2016?
I work with a project with 4836 files, when analysis is finished the post fail at Error 500 when I use maven and timeout when I use sonnar-scanner, but I think the error is the same.
With small projects works fine.
Caused by: java.lang.IllegalStateException: Fail to request http://localhost:9000/api/ce/submit?projectKey=sispecan:intermediacion&projectName=Intermediacion
at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:177)
at org.sonarqube.ws.client.HttpConnector.post(HttpConnector.java:144)
at org.sonarqube.ws.client.HttpConnector.call(HttpConnector.java:104)
at org.sonar.scanner.bootstrap.ScannerWsClient.call(ScannerWsClient.java:73)
at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:177)
at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:131)
at org.sonar.scanner.phases.PublishPhaseExecutor.publishReportJob(PublishPhaseExecutor.java:72)
at org.sonar.scanner.phases.PublishPhaseExecutor.executeOnRoot(PublishPhaseExecutor.java:54)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:83)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:175)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:262)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:257)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:247)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:118)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:117)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy23.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:78)
... 23 more
Caused by: java.net.SocketTimeoutException: timeout
The current Dockerfile defines two different volumes. I saw a question on Docker Hub about whether or not there are volumes on this image, so it's probably worth having some doc around that.
Dockerfile contains following
# pub 2048R/D26468DE 2015-05-25
# Key fingerprint = F118 2E81 C792 9289 21DB CAB4 CFCA 4A29 D264 68DE
# uid sonarsource_deployer (Sonarsource Deployer) <[email protected]>
# sub 2048R/06855C1D 2015-05-25
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys F1182E81C792928921DBCAB4CFCA4A29D26468DE
However, this key is no longer available at ha.pool.sks-keyservers.net. Therefore building this image seems impossible for now without adding --no-check-certificate
to the wget commands. Gets following error at build
+ gpg --keyserver pgp.key-server.io --recv-keys F1182E81C792928921DBCAB4CFCA4A29D26468DE
gpg: directory '/root/.gnupg' created
gpg: new configuration file '/root/.gnupg/dirmngr.conf' created
gpg: new configuration file '/root/.gnupg/gpg.conf' created
gpg: keybox '/root/.gnupg/pubring.kbx' created
gpg: keyserver receive failed: No keyserver available
Note : this fingerprint does exist at pgp.key-server.io does not match uid/pub/sub
When I restart docker container, my plugins disappear.
I'm using a SQL Server database on hostmachine.
Hi
The container that is created with Sonarqube runs as root. I would need it to be running with a different user
To do that, i have created in my dockerfile a new user
from sonarqube:alpine
COPY . /home/javi
WORKDIR /home/javi
RUN useradd -ms /bin/bash -u 1001 javi
USER 1001
But the container still runs as root
How can i run it as a non root user?
Hi, how can i add an external plugin (a jar file) to sonarqube in this configuration?
Some plugins reads their configuration from the sonar.properties
file in the conf
directory. It could be nice to have an access to that file from the host (i.e. with a volume).
Looking for recommendations on the best way to adjust the Java Heap when using the docker-compose. We're getting with a large project a java memory error
java.lang.OutOfMemoryError: Java heap space
It looks like the following is being set by default.
-Xmx512m -Xms128m
Are there specific environmental variables that should be updated, we've been trying some including SONARQUBE_WEB_JVM_OPTS
We're having some issue deleting a failed job from sonarqube. This is associated with a issue that we ran out of a memory. Then it appeared to work, but ran out again later on. We deleted it through the GUI, but now it seems to have something in the DB that is causing a crash on startup. Any recommendations, or is it easier to 'start over'?
sonarqube_1 | 2017.05.01 20:51:20 ERROR ce[AVuVcwNtLdf8QcRv8YoL][o.s.s.c.t.s.ComputationStepExecutor] Execution of listener failed
sonarqube_1 | java.lang.NullPointerException: key can not be null
sonarqube_1 | at java.util.Objects.requireNonNull(Objects.java:228)
sonarqube_1 | at org.sonar.server.computation.task.projectanalysis.api.posttask.ProjectImpl.<init>(ProjectImpl.java:35)
sonarqube_1 | at org.sonar.server.computation.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.createProject(PostProjectAnalysisTasksExecutor.java:127)
sonarqube_1 | at org.sonar.server.computation.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.createProjectAnalysis(PostProjectAnalysisTasksExecutor.java:116)
sonarqube_1 | at org.sonar.server.computation.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.finished(PostProjectAnalysisTasksExecutor.java:98)
sonarqube_1 | at org.sonar.server.computation.task.step.ComputationStepExecutor.executeListener(ComputationStepExecutor.java:71)
sonarqube_1 | at org.sonar.server.computation.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:56)
sonarqube_1 | at org.sonar.server.computation.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:75)
sonarqube_1 | at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.executeTask(CeWorkerCallableImpl.java:85)
sonarqube_1 | at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:58)
sonarqube_1 | at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:36)
sonarqube_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
sonarqube_1 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
sonarqube_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
sonarqube_1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
sonarqube_1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
sonarqube_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
sonarqube_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
sonarqube_1 | at java.lang.Thread.run(Thread.java:745)
sonarqube_1 | 2017.05.01 20:51:21 ERROR ce[AVuVcwNtLdf8QcRv8YoL][o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task AVuVcwNtLdf8QcRv8YoL
sonarqube_1 | org.sonar.api.utils.MessageException: Compute Engine task component key is null. Project with UUID AVuVcvYCLdf8QcRv8YoK must have been deleted since report was uploaded. Can not proceed.
sonarqube_1 | 2017.05.01 20:51:26 ERROR ce[AVuVcwNtLdf8QcRv8YoL][o.s.s.c.t.CeWorkerCallableImpl] Executed task | type=REPORT | id=AVuVcwNtLdf8QcRv8YoL | time=22708ms
Hi!
In our company we try to use alpine-based containers as much as possible.
Currently there are 5 targets in docker-library:
So, if i want to user latest alpine image, i need to specify 5.6.1-alpine target and update it manually every sonar-release.
Could you add a new latest-alpine target, please?
Thank you!
Hi!
My sonarqube container is down very often because of broken connection to default H2-database.
Default database is ok for my use so I don't need additional db configuration.
After some time the container is down. Start container again recover it for some time but then it is down again.
Here is the logs of container.
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.h2.jdbc.JdbcSQLException: Connection is broken: "java.net.ConnectException: Connection refused (Connection refused): 127.0.0.1:9092" [90067-176]
### The error may exist in org.sonar.db.ce.CeQueueMapper
### The error may involve org.sonar.db.ce.CeQueueMapper.selectPendingByMinimumExecutionCount
### The error occurred while executing a query
### Cause: org.h2.jdbc.JdbcSQLException: Connection is broken: "java.net.ConnectException: Connection refused (Connection refused): 127.0.0.1:9092" [90067-176]
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:119)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
at com.sun.proxy.$Proxy27.selectPendingByMinimumExecutionCount(Unknown Source)
at org.sonar.db.ce.CeQueueDao.selectPendingByMinimumExecutionCount(CeQueueDao.java:87)
at org.sonar.ce.queue.InternalCeQueueImpl.cancelWornOuts(InternalCeQueueImpl.java:163)
at org.sonar.ce.cleaning.CeCleaningSchedulerImpl.cancelWornOuts(CeCleaningSchedulerImpl.java:73)
at org.sonar.ce.cleaning.CeCleaningSchedulerImpl.cleanCeQueue(CeCleaningSchedulerImpl.java:62)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.h2.jdbc.JdbcSQLException: Connection is broken: "java.net.ConnectException: Connection refused (Connection refused): 127.0.0.1:9092" [90067-176]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:434)
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:311)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:107)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:91)
at org.h2.Driver.connect(Driver.java:74)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at org.sonar.db.profiling.NullConnectionInterceptor.getConnection(NullConnectionInterceptor.java:31)
at org.sonar.db.profiling.ProfiledDataSource.getConnection(ProfiledDataSource.java:323)
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.openConnection(JdbcTransaction.java:134)
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:61)
at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:279)
at org.apache.ibatis.executor.ReuseExecutor.prepareStatement(ReuseExecutor.java:75)
at org.apache.ibatis.executor.ReuseExecutor.doQuery(ReuseExecutor.java:56)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)
... 16 common frames omitted
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.h2.util.NetUtils.createSocket(NetUtils.java:123)
at org.h2.util.NetUtils.createSocket(NetUtils.java:103)
at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:100)
at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:430)
... 37 common frames omitted
My docker-compose.yml:
sonarqube:
image: sonarqube
command: -Dsonar.web.context=/sonarqube
ports:
- "9000:9000"
volumes:
- sonarqube_conf:/opt/sonarqube/conf
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins
container_name: "***-sonarqube"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.