Unable to start sonarqube in docker container

sonarqube

(vijaymailbb) #1

Template for a good bug report, formatted with Markdown:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension) 5.6.6
  • error observed (wrap logs/code around triple quote for proper formatting)Creating docker_sonarqube-5.6.6_1 … done
    Attaching to docker_sonarqube-5.6.6_1
    sonarqube-5.6.6_1 | Starting SonarQube…
    sonarqube-5.6.6_1 | wrapper | --> Wrapper Started as Console
    sonarqube-5.6.6_1 | wrapper | Launching a JVM…
    sonarqube-5.6.6_1 | jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
    sonarqube-5.6.6_1 | jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
    sonarqube-5.6.6_1 | jvm 1 |
    sonarqube-5.6.6_1 | jvm 1 | 2019.02.17 12:00:25 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/cems/sonarqube/temp
    sonarqube-5.6.6_1 | jvm 1 | 2019.02.17 12:00:25 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[es]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/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/cems/sonarqube/temp -javaagent:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/lib/management-agent.jar -cp ./lib/common/:./lib/search/ org.sonar.search.SearchServer /opt/cems/sonarqube/temp/sq-process7111728098199777765properties
    sonarqube-5.6.6_1 | jvm 1 | 2019.02.17 12:00:31 INFO app[o.s.p.m.Monitor] Process[es] is up
    sonarqube-5.6.6_1 | jvm 1 | 2019.02.17 12:00:31 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/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.io.tmpdir=/opt/cems/sonarqube/temp -javaagent:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/lib/management-agent.jar -cp ./lib/common/:./lib/server/:/opt/cems/sonarqube/lib/jdbc/mssql/sqljdbc42.jar org.sonar.server.app.WebServer /opt/cems/sonarqube/temp/sq-process3788737330774490493properties
    sonarqube-5.6.6_1 | jvm 1 | 2019.02.17 12:00:35 INFO app[o.s.p.m.Monitor] Process[es] is stopping
    sonarqube-5.6.6_1 | jvm 1 | 2019.02.17 12:00:36 INFO app[o.s.p.m.Monitor] Process[es] is stopped
    sonarqube-5.6.6_1 | wrapper | <-- Wrapper Stopped
    sonarqube-5.6.6_1 | Failed to start SonarQube.```
  • steps to reproduce - N/A
  • potential workaround - N/A

P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour


(Simon Brandhof) #2

Hi,

The recent versions of the Docker image bring major improvements. I recommend to give them a try and to upgrade from the version 5.6 that is no longer supported.

Regards


(vijaymailbb) #3

Hello Simon,

Thank you for the recommendation. But Sonarqube 5.6.6 is already running in docker container in our production environment. Can you please is there any workaround for the above issue?


(vijaymailbb) #4

Hello Simon,

I have even tried to deploy the latest version which is 7.6 and received above same error. Please find further log files below.

Feb 18 05:47:10 kernel: device vethc252243 entered promiscuous mode
Feb 18 05:47:10 kernel: IPv6: ADDRCONF(NETDEV_UP): vethc252243: link is not ready
Feb 18 05:47:10 kernel: br-c5158bd71578: port 1(vethc252243) entered blocking state
Feb 18 05:47:10 kernel: br-c5158bd71578: port 1(vethc252243) entered forwarding state
Feb 18 05:47:10 NetworkManager[535]: [1550468830.9255] manager: (veth5c09d0a): new Veth device (/org/freedesktop/NetworkManager/Devices/68)
Feb 18 05:47:10 NetworkManager[535]: [1550468830.9295] manager: (vethc252243): new Veth device (/org/freedesktop/NetworkManager/Devices/69)
Feb 18 05:47:11 containerd: time=“2019-02-18T05:47:11.014555585Z” level=info msg=“shim containerd-shim started” address="/containerd-shim/moby/bea3b29b3ed5ec301511172506cae7bd11123d2c65ffddc1349af182e2de6b75/shim.sock" debug=false pid=5491
Feb 18 05:47:11 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): vethc252243: link becomes ready
Feb 18 05:47:11 NetworkManager[535]: [1550468831.3373] device (vethc252243): carrier: link connected
Feb 18 05:47:11 NetworkManager[535]: [1550468831.3376] device (br-c5158bd71578): carrier: link connected
Feb 18 05:47:27 containerd: time=“2019-02-18T05:47:27.150948007Z” level=info msg=“shim reaped” id=bea3b29b3ed5ec301511172506cae7bd11123d2c65ffddc1349af182e2de6b75
Feb 18 05:47:27 dockerd: time=“2019-02-18T05:47:27.160938703Z” level=info msg=“ignoring event” module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Feb 18 05:47:27 kernel: br-c5158bd71578: port 1(vethc252243) entered disabled state
Feb 18 05:47:27 NetworkManager[535]: [1550468847.2414] manager: (veth5c09d0a): new Veth device (/org/freedesktop/NetworkManager/Devices/70)
Feb 18 05:47:27 kernel: br-c5158bd71578: port 1(vethc252243) entered disabled state
Feb 18 05:47:27 kernel: device vethc252243 left promiscuous mode
Feb 18 05:47:27 kernel: br-c5158bd71578: port 1(vethc252243) entered disabled state
Feb 18 05:47:27 NetworkManager[535]: [1550468847.3575] device (vethc252243): released from master device br-c5158bd71578
Feb 18 05:47:27 kernel: br-c5158bd71578: port 1(veth1ed957d) entered blocking state
Feb 18 05:47:27 kernel: br-c5158bd71578: port 1(veth1ed957d) entered disabled state


(Janos Gyerik) #5

In the latest log using the 7.6 image I don’t see anything SonarQube related. Are you sure you posted the relevant logs? This looks network related, and unrelated to SonarQube.


(vijaymailbb) #6

When I start the container with 7.6 version, I used to get below logs.

sonarqube-5.6.6_1 | Starting SonarQube…
sonarqube-5.6.6_1 | wrapper | --> Wrapper Started as Console
sonarqube-5.6.6_1 | wrapper | Launching a JVM…
sonarqube-5.6.6_1 | jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
sonarqube-5.6.6_1 | jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
sonarqube-5.6.6_1 | jvm 1 |
sonarqube-5.6.6_1 | jvm 1 | 2019.02.17 12:00:25 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/cems/sonarqube/temp
sonarqube-5.6.6_1 | jvm 1 | 2019.02.17 12:00:25 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[es]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/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/cems/sonarqube/temp -javaagent:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/lib/management-agent.jar -cp ./lib/common/ :./lib/search/ org.sonar.search.SearchServer /opt/cems/sonarqube/temp/sq-process7111728098199777765properties
sonarqube-5.6.6_1 | jvm 1 | 2019.02.17 12:00:31 INFO app[o.s.p.m.Monitor] Process[es] is up
sonarqube-5.6.6_1 | jvm 1 | 2019.02.17 12:00:31 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/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.io.tmpdir=/opt/cems/sonarqube/temp -javaagent:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/lib/management-agent.jar -cp ./lib/common/ :./lib/server/ :/opt/cems/sonarqube/lib/jdbc/mssql/sqljdbc42.jar org.sonar.server.app.WebServer /opt/cems/sonarqube/temp/sq-process3788737330774490493properties
sonarqube-5.6.6_1 | jvm 1 | 2019.02.17 12:00:35 INFO app[o.s.p.m.Monitor] Process[es] is stopping
sonarqube-5.6.6_1 | jvm 1 | 2019.02.17 12:00:36 INFO app[o.s.p.m.Monitor] Process[es] is stopped
sonarqube-5.6.6_1 | wrapper | <-- Wrapper Stopped
sonarqube-5.6.6_1 | Failed to start SonarQube.```

The logs which I posted in the trail is additional logs which I captured from server messages file.

Unsure where exactly the issue is.


(Simon Brandhof) #7

These logs are still 5.6!