sonarqube - sonar starts and then stops running after 15 seconds without displaying any error -
i have installed sonar on ubuntu 14.04 lts (which running inside windows using vagrant) following tutorial here
and sonar.properties file below
/opt/sonar/conf/sonar.properties
sonar.jdbc.username=sonar sonar.jdbc.password=sonar sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useunicode=true&characterencoding=utf8&rewritebatchedstatements=true&useconfigs=maxperformance sonar.web.host=127.0.0.1 sonar.web.context=/sonar sonar.web.port=9000 sonar.jdbc.driverclassname=com.mysql.jdbc.driver sonar.jdbc.validationquery=select 1 sonar.jdbc.dialect=mysql sonar.jdbc.maxactive=20 sonar.jdbc.maxidle=5 sonar.jdbc.minidle=2 sonar.jdbc.maxwait=5000 sonar.jdbc.minevictableidletimemillis=600000 sonar.jdbc.timebetweenevictionrunsmillis=30000
once after installing restarted, started sonar below
/opt/sonar/bin/linux-x86-64/sonar.sh restart /opt/sonar/bin/linux-x86-64/sonar.sh start
now have checked status of sonar below
/opt/sonar/bin/linux-x86-64/sonar.sh status
and output sonarqube running.
and after time 15 seconds, have checked status again , output sonarqube not running.
i don't what's reason causing sonar shut down because not displaying error
sonar.log(/opt/sonar/logs/sonar.log) file output
--> wrapper started daemon launching jvm... wrapper (version 3.2.3) http://wrapper.tanukisoftware.org copyright 1999-2006 tanuki software, inc. rights reserved. 2017.07.28 06:47:48 info app[o.s.a.appfilesystem] cleaning or creating temp directory /opt/sonar/temp 2017.07.28 06:47:48 info app[o.s.p.m.javaprocesslauncher] launch process[es]: /usr/lib/jvm/java-8-oracle/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/sonar/temp -javaagent:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/search/* org.sonar.search.searchserver /opt/sonar/temp/sq-process8071013234782021313properties 2017.07.28 06:47:48 info es[o.s.p.processentrypoint] starting es 2017.07.28 06:47:48 info es[o.s.s.essettings] elasticsearch listening on 127.0.0.1:9001 2017.07.28 06:47:49 info es[o.elasticsearch.node] [sonar-1501224467799] version[1.7.5], pid[5493], build[00f95f4/2016-02-02t09:55:30z] 2017.07.28 06:47:49 info es[o.elasticsearch.node] [sonar-1501224467799] initializing ... 2017.07.28 06:47:49 info es[o.e.plugins] [sonar-1501224467799] loaded [], sites [] 2017.07.28 06:47:49 info es[o.elasticsearch.env] [sonar-1501224467799] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [34.3gb], net total_space [39.3gb], types [ext4] 2017.07.28 06:47:50 warn es[o.e.bootstrap] jna not found. native methods disabled. 2017.07.28 06:47:52 info es[o.elasticsearch.node] [sonar-1501224467799] initialized 2017.07.28 06:47:52 info es[o.elasticsearch.node] [sonar-1501224467799] starting ... 2017.07.28 06:47:52 info es[o.e.transport] [sonar-1501224467799] bound_address {inet[/127.0.0.1:9001]}, publish_address {inet[/127.0.0.1:9001]} 2017.07.28 06:47:52 info es[o.e.discovery] [sonar-1501224467799] sonarqube/a-drjveqtd6colidmqgfpa 2017.07.28 06:47:55 info es[o.e.cluster.service] [sonar-1501224467799] new_master [sonar-1501224467799][a-drjveqtd6colidmqgfpa][vagrant-ubuntu-trusty-64][inet[/127.0.0.1:9001]]{rack_id=sonar-1501224467799}, reason: zen-disco-join (elected_as_master) 2017.07.28 06:47:55 info es[o.elasticsearch.node] [sonar-1501224467799] started 2017.07.28 06:47:55 info es[o.e.gateway] [sonar-1501224467799] recovered [0] indices cluster_state 2017.07.28 06:47:55 info app[o.s.p.m.monitor] process[es] 2017.07.28 06:47:55 info app[o.s.p.m.javaprocesslauncher] launch process[web]: /usr/lib/jvm/java-8-oracle/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/sonar/temp -javaagent:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/server/*:/opt/sonar/lib/jdbc/mysql/mysql-connector-java-5.1.35.jar org.sonar.server.app.webserver /opt/sonar/temp/sq-process7630170265596703695properties 2017.07.28 06:47:56 info web[o.s.p.processentrypoint] starting web 2017.07.28 06:47:56 info web[o.s.s.a.tomcatcontexts] webapp directory: /opt/sonar/web 2017.07.28 06:47:57 info web[o.a.c.h.http11nioprotocol] initializing protocolhandler ["http-nio-127.0.0.1-9000"] 2017.07.28 06:47:57 info web[o.a.t.u.n.nioselectorpool] using shared selector servlet write/read 2017.07.28 06:47:58 info web[o.s.s.p.serverimpl] sonarqube server / 5.6.4 / 52298794f1a34a4fd713ff8d441a0c13432e40a9 2017.07.28 06:47:58 info web[o.sonar.db.database] create jdbc data source jdbc:mysql://localhost:3306/sonar?useunicode=true&characterencoding=utf8&rewritebatchedstatements=true&useconfigs=maxperformance 2017.07.28 06:47:58 error web[o.a.c.c.c.[.[.[/]] exception sending context initialized event listener instance of class org.sonar.server.platform.platformservletcontextlistener java.lang.numberformatexception: input string: "20 sonar.jdbc.maxidle=5" @ java.lang.numberformatexception.forinputstring(numberformatexception.java:65) ~[na:1.8.0_131] @ java.lang.integer.parseint(integer.java:580) ~[na:1.8.0_131] @ java.lang.integer.parseint(integer.java:615) ~[na:1.8.0_131] @ org.apache.commons.dbcp.basicdatasourcefactory.createdatasource(basicdatasourcefactory.java:223) ~[commons-dbcp-1.4.jar:1.4] @ org.sonar.db.defaultdatabase.initdatasource(defaultdatabase.java:92) ~[sonar-db-5.6.4.jar:na] @ org.sonar.db.defaultdatabase.start(defaultdatabase.java:70) ~[sonar-db-5.6.4.jar:na] @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) ~[na:1.8.0_131] @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) ~[na:1.8.0_131] @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) ~[na:1.8.0_131] @ java.lang.reflect.method.invoke(method.java:498) ~[na:1.8.0_131] @ org.picocontainer.lifecycle.reflectionlifecyclestrategy.invokemethod(reflectionlifecyclestrategy.java:110) ~[picocontainer-2.15.jar:na] @ org.picocontainer.lifecycle.reflectionlifecyclestrategy.start(reflectionlifecyclestrategy.java:89) ~[picocontainer-2.15.jar:na] @ org.sonar.core.platform.componentcontainer$1.start(componentcontainer.java:320) ~[sonar-core-5.6.4.jar:na] @ org.picocontainer.injectors.abstractinjectionfactory$lifecycleadapter.start(abstractinjectionfactory.java:84) ~[picocontainer-2.15.jar:na] --> wrapat org.picocontainer.behaviors.abstractbehavior.start(abstractbehavior.java:169) ~[picocontainer-2.15.jar:na] launchinat org.picocontainer.behaviors.stored$realcomponentlifecycle.start(stored.java:132) ~[picocontainer-2.15.jar:na] wrapper @ org.picocontainer.behaviors.stored.start(stored.java:110) ~[picocontainer-2.15.jar:na] copyriat org.picocontainer.defaultpicocontainer.potentiallystartadapter(defaultpicocontainer.java:1016) ~[picocontainer-2.15.jar:na] @ org.picocontainer.defaultpicocontainer.startadapters(defaultpicocontainer.java:1009) ~[picocontainer-2.15.jar:na] 2017.07.at org.picocontainer.defaultpicocontainer.start(defaultpicocontainer.java:767) ~[picocontainer-2.15.jar:na] 2017.07.at org.sonar.core.platform.componentcontainer.startcomponents(componentcontainer.java:141) ~[sonar-core-5.6.4.jar:na].awt.headless=true -xmx1g -xms256m -xss256k -djava.net.preferipv4stack=true -xx:+useparnewgc -xx:+useconcmarksweepgc -xx:cmat org.sonar.server.platform.platformlevel.platformlevel.start(platformlevel.java:84) ~[sonar-server-5.6.4.jar:na]r=/opt/sonar/temp -javaagent:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/search/* org.sonat org.sonar.server.platform.platform.start(platform.java:216) ~[sonar-server-5.6.4.jar:na] 2017.07.at org.sonar.server.platform.platform.startlevel1container(platform.java:175) ~[sonar-server-5.6.4.jar:na] 2017.07.at org.sonar.server.platform.platform.init(platform.java:90) ~[sonar-server-5.6.4.jar:na] 2017.07.at org.sonar.server.platform.platformservletcontextlistener.contextinitialized(platformservletcontextlistener.java:43) ~[sonar-server-5.6.4.jar:na] 2017.07.at org.apache.catalina.core.standardcontext.listenerstart(standardcontext.java:4812) [tomcat-embed-core-8.0.32.jar:8.0.32] 2017.07.at org.apache.catalina.core.standardcontext.startinternal(standardcontext.java:5255) [tomcat-embed-core-8.0.32.jar:8.0.32] 2017.07.at org.apache.catalina.util.lifecyclebase.start(lifecyclebase.java:147) [tomcat-embed-core-8.0.32.jar:8.0.32])]], net usable_space [34.3gb], net total_space [39.3gb], types [ext4] 2017.07.at org.apache.catalina.core.containerbase$startchild.call(containerbase.java:1408) [tomcat-embed-core-8.0.32.jar:8.0.32] 2017.07.at org.apache.catalina.core.containerbase$startchild.call(containerbase.java:1398) [tomcat-embed-core-8.0.32.jar:8.0.32] 2017.07.at java.util.concurrent.futuretask.run(futuretask.java:266) [na:1.8.0_131]g ... 2017.07.at java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142) [na:1.8.0_131], publish_address {inet[/127.0.0.1:9001]} 2017.07.at java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617) [na:1.8.0_131] 2017.07.at java.lang.thread.run(thread.java:748) [na:1.8.0_131]224467799] new_master [sonar-1501224467799][a-drjveqtd6colidmqgfpa][vagrant-ubuntu-trusty-64][inet[/127.0.0.1:9001]]{rack_id=sonar-1501224467799}, reason: zen-disco-join (electe2017.07.28 06:47:58 error web[o.a.c.c.standardcontext] 1 or more listeners failed start. full details found in appropriate container log file 2017.07.28 06:47:58 error web[o.a.c.c.standardcontext] context [] startup failed due previous errors 2017.07.28 06:47:58 warn web[o.a.c.l.webappclassloaderbase] web application [root] appears have started thread named [abandoned connection cleanup thread] has failed stop it. create memory leak. stack trace of thread: info app[o.s.p.m.monitor] process[es] java.lang.object.wait(native method).javaprocesslauncher] launch process[web]: /usr/lib/jvm/java-8-oracle/jre/bin/java -djava.awt.headless=true -dfile.encoding=utf-8 -djruby.management.enabled=false -djruby.compile.invokedynamic=false -xmx java.lang.ref.referencequeue.remove(referencequeue.java:143)eripv4stack=true -djava.io.tmpdir=/opt/sonar/temp -javaagent:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/server/*:/opt/sonar/lib/jdbc/mysql/my com.mysql.jdbc.abandonedconnectioncleanupthread.run(abandonedconnectioncleanupthread.java:43)265596703695properties 2017.07.28 06:47:58 info web[o.a.c.h.http11nioprotocol] starting protocolhandler ["http-nio-127.0.0.1-9000"] 2017.07.28 06:47:58 info web[o.s.s.a.tomcataccesslog] web server started/sonar/web 2017.07.28 06:47:58 info web[o.s.s.a.embeddedtomcat] http connector enabled on port 9000ttp-nio-127.0.0.1-9000"] 2017.07.28 06:47:58 warn web[o.s.p.processentrypoint] fail start webselector servlet write/read java.lang.illegalstateexception: webapp did not startarqube server / 5.6.4 / 52298794f1a34a4fd713ff8d441a0c13432e40a9 2017.07.at org.sonar.server.app.embeddedtomcat.isup(embeddedtomcat.java:84) ~[sonar-server-5.6.4.jar:na]06/sonar?useunicode=true&characterencoding=utf8&rewritebatchedstatements=true&useconfigs=maxperformance 2017.07.at org.sonar.server.app.webserver.isup(webserver.java:47) [sonar-server-5.6.4.jar:na]to listener instance of class org.sonar.server.platform.platformservletcontextlistener java.lanat org.sonar.process.processentrypoint.launch(processentrypoint.java:105) ~[sonar-process-5.6.4.jar:na] @ org.sonar.server.app.webserver.main(webserver.java:68) [sonar-server-5.6.4.jar:na]:1.8.0_131] 2017.07.28 06:47:58 info web[o.a.c.h.http11nioprotocol] pausing protocolhandler ["http-nio-127.0.0.1-9000"] 2017.07.28 06:47:59 info web[o.a.c.h.http11nioprotocol] stopping protocolhandler ["http-nio-127.0.0.1-9000"] 2017.07.28 06:47:59 info web[o.a.c.h.http11nioprotocol] destroying protocolhandler ["http-nio-127.0.0.1-9000"]ommons-dbcp-1.4.jar:1.4] 2017.07.28 06:47:59 info web[o.s.s.a.tomcataccesslog] web server stopped92) ~[sonar-db-5.6.4.jar:na] 2017.07.28 06:48:00 info app[o.s.p.m.monitor] process[es] stopping ~[sonar-db-5.6.4.jar:na] 2017.07.28 06:48:00 info es[o.s.p.stopwatcher] stopping processhod) ~[na:1.8.0_131] 2017.07.28 06:48:00 info es[o.elasticsearch.node] [sonar-1501224467799] stopping ... 2017.07.28 06:48:00 info es[o.elasticsearch.node] [sonar-1501224467799] stopped 2017.07.28 06:48:00 info es[o.elasticsearch.node] [sonar-1501224467799] closing ... 2017.07.28 06:48:00 info es[o.elasticsearch.node] [sonar-1501224467799] closed 2017.07.28 06:48:00 info app[o.s.p.m.monitor] process[es] stopped <-- wrapper stopped
i have checked whether mysql running or not below , running , up
mysqladmin -u root -p status uptime: 2781 threads: 1 questions: 122 slow queries: 0 opens: 48 flush tables: 1 open tables: 41 queries per second avg: 0.043
so didn't understand makes sonar shut down after time once started, , changes make in order run sonar continuously , debug?
you have missing line break here:
sonar.jdbc.maxactive=20 sonar.jdbc.maxidle=5
sonar can't parse maxactive
option because after first =
parsed integer. fails:
java.lang.numberformatexception: input string: "20 sonar.jdbc.maxidle=5"
simple solution:
sonar.jdbc.maxactive=20 sonar.jdbc.maxidle=5
Comments
Post a Comment