SonarOpenCommunity / sonar-cxx

SonarQube C++ Community plugin (cxx plugin): This plugin adds C++ support to SonarQube with the focus on integration of existing C++ tools.
GNU Lesser General Public License v3.0
1k stars 363 forks source link

sonar-cxx-plugin-0.9.7 - Service startup problem with SonarQube Ver-5.6.6(LTS) #1149

Closed mohanss08 closed 7 years ago

mohanss08 commented 7 years ago

Hi Team,

I have problem with my SonarQube-5.6.6(LTS) with SonarQube C++ Community Plugin Version - 0.9.7.

Our Environment details as follows:

SonarQube Server Version - 5.6.6 (64-Bit). Operating System – Ubuntu - 14.04.5 LTS (64-Bit). mysql Ver - 14.14 Distrib 5.6.33. SonarQube C++ Community Plugin Version - 0.9.7.

Problem Description:

I have SonarQube C++ Community Plugin Version - 0.9.7 installed, Then when I tried to start the sonar service, it failed with below error.

Error message from sonar.log file.

2017.05.25 10:29:08 INFO web[c.a.c.s.c.ClientPropertiesImpl] Failed to find value for property: cookie.domain 2017.05.25 10:30:22 INFO web[o.s.p.c.CrowdRealm] Crowd configuration is valid, connection test successful. 2017.05.25 10:30:22 INFO web[org.sonar.INFO] Security realm started 2017.05.25 10:30:22 INFO web[o.s.s.n.NotificationService] Notification service started (delay 60 sec.) 2017.05.25 10:30:22 INFO web[o.s.s.s.RegisterMetrics] Register metrics 2017.05.25 10:30:22 INFO web[o.s.s.r.RegisterRules] Register rules 2017.05.25 10:30:24 INFO web[o.s.s.n.NotificationService] Notification service stopped 2017.05.25 10:30:24 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener org.sonar.api.utils.MessageException: The rule 'cppcheck:uninitVar' is invalid : Constant/issue functions must only have a non empty base effort 2017.05.25 10:30:24 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 2017.05.25 10:30:24 ERROR web[o.a.c.c.StandardContext] Context [] startup failed due to previous errors 2017.05.25 10:30:24 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) 2017.05.25 10:30:24 WARN web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [MultiThreadedHttpConnectionManager cleanup] 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) java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164) org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ReferenceQueueThread.run(MultiThreadedHttpConnectionManager.java:1122) 2017.05.25 10:30:24 INFO web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-107.108.4.211-9000"] 2017.05.25 10:30:24 INFO web[o.s.s.a.TomcatAccessLog] Web server is started 2017.05.25 10:30:24 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000 2017.05.25 10:30:24 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.6.jar:na] at org.sonar.server.app.WebServer.isUp(WebServer.java:47) [sonar-server-5.6.6.jar:na] at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:105) ~[sonar-process-5.6.6.jar:na] at org.sonar.server.app.WebServer.main(WebServer.java:68) [sonar-server-5.6.6.jar:na] 2017.05.25 10:30:24 INFO web[o.a.c.h.Http11NioProtocol] Pausing ProtocolHandler ["http-nio-107.108.4.211-9000"] 2017.05.25 10:30:25 INFO web[o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-107.108.4.211-9000"] 2017.05.25 10:30:25 INFO web[o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-107.108.4.211-9000"] 2017.05.25 10:30:25 INFO web[o.s.s.a.TomcatAccessLog] Web server is stopped 2017.05.25 10:30:26 INFO app[o.s.p.m.Monitor] Process[es] is stopping 2017.05.25 10:30:26 INFO es[o.s.p.StopWatcher] Stopping process 2017.05.25 10:30:26 INFO es[o.elasticsearch.node] [sonar-1495688329158] stopping ... 2017.05.25 10:30:27 INFO es[o.elasticsearch.node] [sonar-1495688329158] stopped 2017.05.25 10:30:27 INFO es[o.elasticsearch.node] [sonar-1495688329158] closing ... 2017.05.25 10:30:27 INFO es[o.elasticsearch.node] [sonar-1495688329158] closed 2017.05.25 10:30:27 INFO app[o.s.p.m.Monitor] Process[es] is stopped <-- Wrapper Stopped

Note: Without - SonarQube C++ Community Plugin Version - 0.9.7, I am able to start the service.

So kindly help me to fix the same with SonarQube-5.6.6(LTS).

Thanks, Mohan

mohanss08 commented 7 years ago

Even tried only with following two plugins, sonar-crowd-plugin-2.0.jar and sonar-cxx-plugin-0.9.7, Still unable to start the service. It fails with the same error.

2017.05.25 13:22:51 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener org.sonar.api.utils.MessageException: The rule 'cppcheck:uninitVar' is invalid : Constant/issue functions must only have a non empty base effort 2017.05.25 13:22:51 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 2017.05.25 13:22:51 ERROR web[o.a.c.c.StandardContext] Context [] startup failed due to previous errors

mohanss08 commented 7 years ago

HI Team,

Actually I have tired with various versions of sonar-cxx-plugins, Finally I am able to start the sonar service successfully with - sonar-cxx-plugin-0.9.2.jar version..

Then I have tried the (sonar-runner-2.4 & sonar-scanner-3.0.3.778), getting below error in both the versions.

22:18:03.150 ERROR: Error during SonarQube Scanner execution java.lang.NoSuchMethodError: org.sonar.api.resources.Project.getFileSystem()Lorg/sonar/api/resources/ProjectFileSystem; at org.sonar.plugins.cxx.squid.CxxSquidSensor.shouldExecuteOnProject(CxxSquidSensor.java:93) at org.sonar.batch.bootstrap.BatchExtensionDictionnary.shouldKeep(BatchExtensionDictionnary.java:260) at org.sonar.batch.bootstrap.BatchExtensionDictionnary.getFilteredExtensions(BatchExtensionDictionnary.java:101) at org.sonar.batch.bootstrap.BatchExtensionDictionnary.select(BatchExtensionDictionnary.java:74) at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:46) at org.sonar.batch.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:83) at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:192) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:241) at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236) at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:234) at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:226) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) at org.sonar.batch.task.ScanTask.execute(ScanTask.java:47) at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:106) at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119) at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63) 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.$Proxy0.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.cli.Main.runAnalysis(Main.java:123) at org.sonarsource.scanner.cli.Main.execute(Main.java:77) at org.sonarsource.scanner.cli.Main.main(Main.java:61)

It looks compatibility issue. Kindly help me to resolve the same.

-Mohan

mohanss08 commented 7 years ago

Today i have tried with latest (sonar-cxx-plugin-0.9.8-SNAPSHOT.jar) still same problem. Unable to start the Sonar Service.

Error Message:

2017.05.26 08:46:58 INFO web[o.s.s.s.RegisterMetrics] Register metrics 2017.05.26 08:46:59 INFO web[o.s.s.s.RegisterMetrics] Disable metric Cyclic dependency violations [CXX-DEPENDENCIES] 2017.05.26 08:46:59 INFO web[o.s.s.s.RegisterMetrics] Disable metric External C++ rules violations [CXX-EXTERNAL] 2017.05.26 08:46:59 INFO web[o.s.s.s.RegisterMetrics] Disable metric Vera++ rule violations [CXX-VERAXX] 2017.05.26 08:46:59 INFO web[o.s.s.s.RegisterMetrics] Disable metric PC-Lint errors [CXX-PCLINT] 2017.05.26 08:46:59 INFO web[o.s.s.r.RegisterRules] Register rules 2017.05.26 08:47:00 INFO web[o.s.s.n.NotificationService] Notification service stopped 2017.05.26 08:47:00 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener org.sonar.api.utils.MessageException: The rule 'cppcheck:uninitVar' is invalid : Constant/issue functions must only have a non empty base effort 2017.05.26 08:47:00 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 2017.05.26 08:47:00 ERROR web[o.a.c.c.StandardContext] Context [] startup failed due to previous errors 2017.05.26 08:47:00 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) 2017.05.26 08:47:00 WARN web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [MultiThreadedHttpConnectionManager cleanup] 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) java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164) org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ReferenceQueueThread.run(MultiThreadedHttpConnectionManager.java:1122) 2017.05.26 08:47:01 INFO web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-107.108.4.211-9000"] 2017.05.26 08:47:01 INFO web[o.s.s.a.TomcatAccessLog] Web server is started 2017.05.26 08:47:01 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000 2017.05.26 08:47:01 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.6.jar:na] at org.sonar.server.app.WebServer.isUp(WebServer.java:47) [sonar-server-5.6.6.jar:na] at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:105) ~[sonar-process-5.6.6.jar:na] at org.sonar.server.app.WebServer.main(WebServer.java:68) [sonar-server-5.6.6.jar:na] 2017.05.26 08:47:01 INFO web[o.a.c.h.Http11NioProtocol] Pausing ProtocolHandler ["http-nio-107.108.4.211-9000"] 2017.05.26 08:47:02 INFO web[o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-107.108.4.211-9000"] 2017.05.26 08:47:02 INFO web[o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-107.108.4.211-9000"] 2017.05.26 08:47:02 INFO web[o.s.s.a.TomcatAccessLog] Web server is stopped 2017.05.26 08:47:02 INFO app[o.s.p.m.Monitor] Process[es] is stopping 2017.05.26 08:47:02 INFO es[o.s.p.StopWatcher] Stopping process 2017.05.26 08:47:02 INFO es[o.elasticsearch.node] [sonar-1495768525635] stopping ... 2017.05.26 08:47:02 INFO es[o.elasticsearch.node] [sonar-1495768525635] stopped 2017.05.26 08:47:02 INFO es[o.elasticsearch.node] [sonar-1495768525635] closing ... 2017.05.26 08:47:02 INFO es[o.elasticsearch.node] [sonar-1495768525635] closed 2017.05.26 08:47:03 INFO app[o.s.p.m.Monitor] Process[es] is stopped <-- Wrapper Stopped -Mohan

jmecosta commented 7 years ago

First be sure you dont have more than one cup plugin, from the logs it looks that you also have the paid cpplint plugin.

Then there are issues with database, and if you can, please try from a new database

On Fri, 26 May 2017, 06:23 mohanss08, notifications@github.com wrote:

Today i have tried with (sonar-cxx-plugin-0.9.8-SNAPSHOT.jar) still same problem.

Error Message:

2017.05.26 08:46:58 INFO web[o.s.s.s.RegisterMetrics] Register metrics 2017.05.26 08:46:59 INFO web[o.s.s.s.RegisterMetrics] Disable metric Cyclic dependency violations [CXX-DEPENDENCIES] 2017.05.26 08:46:59 INFO web[o.s.s.s.RegisterMetrics] Disable metric External C++ rules violations [CXX-EXTERNAL] 2017.05.26 08:46:59 INFO web[o.s.s.s.RegisterMetrics] Disable metric Vera++ rule violations [CXX-VERAXX] 2017.05.26 08:46:59 INFO web[o.s.s.s.RegisterMetrics] Disable metric PC-Lint errors [CXX-PCLINT] 2017.05.26 08:46:59 INFO web[o.s.s.r.RegisterRules] Register rules 2017.05.26 08:47:00 INFO web[o.s.s.n.NotificationService] Notification service stopped 2017.05.26 08:47:00 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener

org.sonar.api.utils.MessageException: The rule 'cppcheck:uninitVar' is invalid : Constant/issue functions must only have a non empty base effort

2017.05.26 08:47:00 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 2017.05.26 08:47:00 ERROR web[o.a.c.c.StandardContext] Context [] startup failed due to previous errors 2017.05.26 08:47:00 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)

2017.05.26 08:47:00 WARN web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [MultiThreadedHttpConnectionManager cleanup] 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) java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)

org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ReferenceQueueThread.run(MultiThreadedHttpConnectionManager.java:1122)

2017.05.26 08:47:01 INFO web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-107.108.4.211-9000"] 2017.05.26 08:47:01 INFO web[o.s.s.a.TomcatAccessLog] Web server is started 2017.05.26 08:47:01 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000 2017.05.26 08:47:01 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.6.jar:na] at org.sonar.server.app.WebServer.isUp(WebServer.java:47) [sonar-server-5.6.6.jar:na] at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:105) ~[sonar-process-5.6.6.jar:na] at org.sonar.server.app.WebServer.main(WebServer.java:68) [sonar-server-5.6.6.jar:na]

2017.05.26 08:47:01 INFO web[o.a.c.h.Http11NioProtocol] Pausing ProtocolHandler ["http-nio-107.108.4.211-9000"] 2017.05.26 08:47:02 INFO web[o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-107.108.4.211-9000"] 2017.05.26 08:47:02 INFO web[o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-107.108.4.211-9000"] 2017.05.26 08:47:02 INFO web[o.s.s.a.TomcatAccessLog] Web server is stopped 2017.05.26 08:47:02 INFO app[o.s.p.m.Monitor] Process[es] is stopping 2017.05.26 08:47:02 INFO es[o.s.p.StopWatcher] Stopping process 2017.05.26 08:47:02 INFO es[o.elasticsearch.node] [sonar-1495768525635] stopping ... 2017.05.26 08:47:02 INFO es[o.elasticsearch.node] [sonar-1495768525635] stopped 2017.05.26 08:47:02 INFO es[o.elasticsearch.node] [sonar-1495768525635] closing ... 2017.05.26 08:47:02 INFO es[o.elasticsearch.node] [sonar-1495768525635] closed 2017.05.26 08:47:03 INFO app[o.s.p.m.Monitor] Process[es] is stopped <-- Wrapper Stopped -Mohan

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SonarOpenCommunity/sonar-cxx/issues/1149#issuecomment-304181218, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_jyHPNrKlthEuItAVq7-gD86k7QvY6ks5r9kW-gaJpZM4NmI_8 .

mohanss08 commented 7 years ago

Actually initially i tried with (sonar-cxx-plugin-plugin and SonarCfamily) plugins. then now i have tried only with sonar-cxx-plugin,

mohanss08 commented 7 years ago

Ok thanks, i will create a new Database and check. Thanks for information.

mohanss08 commented 7 years ago

Checked by new creating new MYSQL DB. Again it failed with same error.

Launching a JVM... Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.

2017.05.29 17:15:05 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube-5.6.6/temp 2017.05.29 17:15:05 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[es]: /usr/lib/jvm/jdk1.8.0_131/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-5.6.6/temp -javaagent:/usr/lib/jvm/jdk1.8.0_131/jre/lib/management-agent.jar -cp ./lib/common/:./lib/search/ org.sonar.search.SearchServer /opt/sonarqube-5.6.6/temp/sq-process7377228230310274389properties 2017.05.29 17:15:07 INFO es[o.s.p.ProcessEntryPoint] Starting es 2017.05.29 17:15:07 INFO es[o.s.s.EsSettings] Elasticsearch listening on 127.0.0.1:9001 2017.05.29 17:15:07 INFO es[o.elasticsearch.node] [sonar-1496058304822] version[1.7.5], pid[2115], build[00f95f4/2016-02-02T09:55:30Z] 2017.05.29 17:15:07 INFO es[o.elasticsearch.node] [sonar-1496058304822] initializing ... 2017.05.29 17:15:07 INFO es[o.e.plugins] [sonar-1496058304822] loaded [], sites [] 2017.05.29 17:15:07 INFO es[o.elasticsearch.env] [sonar-1496058304822] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [55.6gb], net total_space [94.3gb], types [ext4] 2017.05.29 17:15:10 WARN es[o.e.bootstrap] JNA not found. native methods will be disabled. 2017.05.29 17:15:12 INFO es[o.elasticsearch.node] [sonar-1496058304822] initialized 2017.05.29 17:15:12 INFO es[o.elasticsearch.node] [sonar-1496058304822] starting ... 2017.05.29 17:15:12 INFO es[o.e.transport] [sonar-1496058304822] bound_address {inet[/127.0.0.1:9001]}, publish_address {inet[/127.0.0.1:9001]} 2017.05.29 17:15:12 INFO es[o.e.discovery] [sonar-1496058304822] sonarqube/BPkwk1emQSOzBqnxslxiZQ 2017.05.29 17:15:15 INFO es[o.e.cluster.service] [sonar-1496058304822] new_master [sonar-1496058304822][BPkwk1emQSOzBqnxslxiZQ][Sonarqube-test][inet[/127.0.0.1:9001]]{rack_id=sonar-1496058304822}, reason: zen-disco-join (elected_as_master) 2017.05.29 17:15:15 INFO es[o.elasticsearch.node] [sonar-1496058304822] started 2017.05.29 17:15:15 INFO es[o.e.gateway] [sonar-1496058304822] recovered [6] indices into cluster_state 2017.05.29 17:15:19 INFO app[o.s.p.m.Monitor] Process[es] is up 2017.05.29 17:15:19 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]: /usr/lib/jvm/jdk1.8.0_131/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/sonarqube-5.6.6/temp -javaagent:/usr/lib/jvm/jdk1.8.0_131/jre/lib/management-agent.jar -cp ./lib/common/:./lib/server/:/opt/sonarqube-5.6.6/lib/jdbc/mysql/mysql-connector-java-5.1.35.jar org.sonar.server.app.WebServer /opt/sonarqube-5.6.6/temp/sq-process3791144277704187638properties 2017.05.29 17:15:20 INFO web[o.s.p.ProcessEntryPoint] Starting web 2017.05.29 17:15:21 INFO web[o.s.s.a.TomcatContexts] Webapp directory: /opt/sonarqube-5.6.6/web 2017.05.29 17:15:21 INFO web[o.a.c.h.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-107.108.4.211-9000"] 2017.05.29 17:15:21 INFO web[o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read 2017.05.29 17:15:23 INFO web[o.s.s.p.ServerImpl] SonarQube Server / 5.6.6 / e8e13145497bb920921ae4fe11b09f0903f1d298 2017.05.29 17:15:23 INFO web[o.sonar.db.Database] Create JDBC data source for jdbc:mysql://107.108.4.211:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance 2017.05.29 17:15:25 INFO web[o.s.s.p.DefaultServerFileSystem] SonarQube home: /opt/sonarqube-5.6.6 2017.05.29 17:15:26 INFO web[o.e.plugins] [sonar-1496058304822] loaded [], sites [] 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin Analysis Bootstrapper for Visual Studio Projects / 1.2 / debe8e3820709cb34658d23f4de77d65577d42b1 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin Android / 1.1 / 9ab2bbcc83177e67c74d365f009bfe05bf38c7e3 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin C# / 5.10.1.1411 / 748a97f89a5327cbea5cfe1f8aebe87d073c74a0 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin C++ (Community) / 0.9.7 / d33354779a55e09c3af1066f240d8d36d948fb27 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin Checkstyle / 3.6.1 / 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin Clover / 3.1 / 7beaec203a3762e7e14601e4a47ed05c161ed163 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin Cobertura / 1.7 / d14b7978322d19a2795286ebfed225a57b13c3af 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin Crowd / 2.0 / 699040114c48411e968961b1caa61a83f89c8906 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin Findbugs / 3.4.4 / 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin Git / 1.2 / a713dd64daf8719ba4e7f551f9a1966c62690c17 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin Groovy / 1.5 / dcbcd1eeb8f61c8351e5dd1e51e11e52d186df35 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin PMD / 2.6 / f419f834b4bea51f9b6da33517b7f6186db5c066 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SVN / 1.4.0.522 / 1309b92a587d1c8fd55a2981c69ceadc1f79e79c 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarJS / 3.0.0.4962 / d34263e00f57251f23fedeb41b6d76d740f6ba5c 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarJava / 4.9.0.9858 / f04d72a01871c96235fa97e0b9c5582455f313da 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarPHP / 2.10.0.2087 / b24a8fcb16d37cae2f8c6741141f4136c444851f 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarPython / 1.8.0.1496 / 3fe3bc4d0273a5721ea2fb368dc45b1bb82fede3 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin SonarXML / 1.4.2.885 / c00dcd5ef9a01d552daed7e08b240de1be6d413f 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin Sonargraph / 3.5 2017.05.29 17:15:27 INFO web[o.s.s.p.ServerPluginRepository] Deploy plugin Widget Lab / 1.8.1 / 347da6958ec03f3ab72e911234210bd90200718c 2017.05.29 17:15:30 INFO web[o.s.d.c.MysqlCharsetHandler] Verify that database collation is case-sensitive 2017.05.29 17:15:31 INFO web[o.s.s.p.RailsAppsDeployer] Deploying Ruby on Rails applications 2017.05.29 17:15:33 INFO web[o.s.s.p.UpdateCenterClient] Update center: https://update.sonarsource.org/update-center.properties (no proxy) 2017.05.29 17:15:33 INFO web[org.sonar.INFO] Security realm: Crowd 2017.05.29 17:15:33 INFO web[c.a.c.s.c.ClientPropertiesImpl] Loading property: 'application.name' : 'sonarqube' 2017.05.29 17:15:33 INFO web[c.a.c.s.c.ClientPropertiesImpl] Failed to find value for property: application.login.url 2017.05.29 17:15:33 INFO web[c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.tokenkey' : 'session.tokenkey' 2017.05.29 17:15:33 INFO web[c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.lastvalidation' : 'session.lastvalidation' 2017.05.29 17:15:33 INFO web[c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.validationinterval' : '1' 2017.05.29 17:15:33 INFO web[c.a.c.s.c.ClientPropertiesImpl] Failed to find value for property: cookie.domain 2017.05.29 17:16:38 INFO web[o.s.p.c.CrowdRealm] Crowd configuration is valid, connection test successful. 2017.05.29 17:16:38 INFO web[org.sonar.INFO] Security realm started 2017.05.29 17:16:39 INFO web[o.s.s.n.NotificationService] Notification service started (delay 60 sec.) 2017.05.29 17:16:39 INFO web[o.s.s.s.RegisterMetrics] Register metrics 2017.05.29 17:16:39 INFO web[o.s.s.r.RegisterRules] Register rules 2017.05.29 17:16:41 INFO web[o.s.s.n.NotificationService] Notification service stopped 2017.05.29 17:16:41 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener org.sonar.api.utils.MessageException: The rule 'cppcheck:uninitVar' is invalid : Constant/issue functions must only have a non empty base effort 2017.05.29 17:16:41 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 2017.05.29 17:16:41 ERROR web[o.a.c.c.StandardContext] Context [] startup failed due to previous errors 2017.05.29 17:16: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) 2017.05.29 17:16:41 WARN web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [MultiThreadedHttpConnectionManager cleanup] 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) java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164) org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ReferenceQueueThread.run(MultiThreadedHttpConnectionManager.java:1122) 2017.05.29 17:16:41 INFO web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-107.108.4.211-9000"] 2017.05.29 17:16:41 INFO web[o.s.s.a.TomcatAccessLog] Web server is started 2017.05.29 17:16:41 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000 2017.05.29 17:16:41 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.6.jar:na] at org.sonar.server.app.WebServer.isUp(WebServer.java:47) [sonar-server-5.6.6.jar:na] at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:105) ~[sonar-process-5.6.6.jar:na] at org.sonar.server.app.WebServer.main(WebServer.java:68) [sonar-server-5.6.6.jar:na] 2017.05.29 17:16:41 INFO web[o.a.c.h.Http11NioProtocol] Pausing ProtocolHandler ["http-nio-107.108.4.211-9000"] 2017.05.29 17:16:42 INFO web[o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-107.108.4.211-9000"] 2017.05.29 17:16:42 INFO web[o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-107.108.4.211-9000"] 2017.05.29 17:16:42 INFO web[o.s.s.a.TomcatAccessLog] Web server is stopped 2017.05.29 17:16:42 INFO app[o.s.p.m.Monitor] Process[es] is stopping 2017.05.29 17:16:43 INFO es[o.s.p.StopWatcher] Stopping process 2017.05.29 17:16:43 INFO es[o.elasticsearch.node] [sonar-1496058304822] stopping ... 2017.05.29 17:16:43 INFO es[o.elasticsearch.node] [sonar-1496058304822] stopped 2017.05.29 17:16:43 INFO es[o.elasticsearch.node] [sonar-1496058304822] closing ... 2017.05.29 17:16:43 INFO es[o.elasticsearch.node] [sonar-1496058304822] closed 2017.05.29 17:16:43 INFO app[o.s.p.m.Monitor] Process[es] is stopped <-- Wrapper Stopped

-Mohan

mohanss08 commented 7 years ago

Actually i have copied the dumped mysql file from another sonarqube-5.1 version server and I have successfully restored in my current sonarqube-5.6.6 server.then installed requied plugins then migrated db (http://mysonarqubeserver:9000/setup as per guide.

Later when I tried to start the SonarQube service, It shows above details,

mohanss08 commented 7 years ago

Note: Without - SonarQube C++ Community Plugin Version - 0.9.7, I am able to start the service.

mohanss08 commented 7 years ago

Team,

As per this error(The rule 'cppcheck:uninitVar' is invalid : Constant/issue functions must only have a non empty base effort) with sonar-cxx-plugin-0.9.7 plugin.

I have checked the below things.

1) With sonar-cxx-plugin-0.9.7 plugin, I am unable to start the sonar service. 2) Whereas with sonar-cxx-plugin-0.9.2 plugin I am able to start the sonar service and found the following rules under SonarQubeWEB-->Rules-->If we search Like cppcheck. I can see “cppcheck:uninitVar” rule.

Attached screenshot for the reference. It seems some issues with the sonar-cxx-plugin-0.9.7 plugin - cppcheck rules.

cppcheck_working_on_9 2_plugin

Thanks, Mohan

jmecosta commented 7 years ago

have you tried running sonar on a clean database? i mean really clean. try with default database. as i see you are trying to migrate over versions. and indeed there have been issues with those in past.

you can try wiping those from database,

Do you have defined a rule "CustomRuleTemplate" in you custom rules? select * from properties where prop_key like 'sonar.cxx.cppcheck%';

check, if yes, then delete from properties where prop_key='sonar.cxx.cppcheck.uninitVar';

try that

mohanss08 commented 7 years ago

Hi Jorge Costa,

Yes after deleting the custom rule from DB. It worked perfectly

Thank you very much for your continue support.

-Mohan

jmecosta commented 7 years ago

Great :)