@oscfox错误日志得贴出来吧INFO:Projectrootconfigurationfile:NONE
INFO:SonarQubeScanner2.6.1
INFO:Java1.8.0_91OracleCorporation(32-bit)
INFO:Windows76.1x86
INFO:Usercache:C:\Users\Administrator\.sonar\cache
ERROR:SonarQubeserver[http://localhost:9000]cannotbereached
INFO:------------------------------------------------------------------------
INFO:EXECUTIONFAILURE
INFO:------------------------------------------------------------------------
INFO:Totaltime:5.414s
INFO:FinalMemory:2M/15M
INFO:------------------------------------------------------------------------
ERROR:ErrorduringSonarQubeScannerexecution
ERROR:UnabletoexecuteSonarQube
ERROR:Causedby:Failtodownloadlibrariesfromserver
ERROR:Causedby:Connectionrefused:connect
ERROR:
ERROR:Toseethefullstacktraceoftheerrors,re-runSonarQubeScannerwith
the-eswitch.
ERROR:Re-runSonarQubeScannerusingthe-Xswitchtoenablefulldebuglogging。
@Yashin大神看看这个错误提示
Re-runSonarQubeScannerusingthe-Xswitchtoenablefulldebuglogging。看看详细日志啊,看起来是无法从sonarwebserver下载插件,也看看webserver的日志Sonar/log/sonar.log2016.05.2509:36:04ERRORweb[o.a.c.c.C.[.[.[/]]Exceptionsendingcontextinitializedeventtolistenerinstanceofclassorg.sonar.server.platform.RubyRailsContextListener
org.jruby.rack.RackInitializationException:ActiveRecord::JDBCError:Tablespacefortable'`sonar`.`schema_migrations`'exists.PleaseDISCARDthetablespacebeforeIMPORT.:CREATETABLE`schema_migrations`(`version`varchar(255)NOTNULL)ENGINE=InnoDBCHARACTERSETutf8COLLATEutf8_bin
fromE:/Sonra/sonarqube-5.5/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract_adapter.rb:227:in`log'
fromE:/Sonra/sonarqube-5.5/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/adapter.rb:183:in`execute'
fromE:/Sonra/sonarqube-5.5/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/schema_statements.rb:109:in`create_table'
fromE:/Sonra/sonarqube-5.5/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/mysql/adapter.rb:252:in`create_table'
fromE:/Sonra/sonarqube-5.5/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/schema_statements.rb:371:in`initialize_schema_migrations_table'
fromE:/Sonra/sonarqube-5.5/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:441:in`initialize'
fromE:/Sonra/sonarqube-5.5/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:401:in`up'
fromE:/Sonra/sonarqube-5.5/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:383:in`migrate'
fromE:/Sonra/sonarqube-5.5/web/WEB-INF/config/../lib/database_version.rb:66:in`upgrade_and_start'
fromE:/Sonra/sonarqube-5.5/web/WEB-INF/config/../lib/database_version.rb:77:in`automatic_setup'
fromE:/Sonra/sonarqube-5.5/web/WEB-INF/config/environment.rb:306:in`(root)'
fromorg/jruby/RubyKernel.java:1094:in`load'
fromfile:/E:/Sonra/sonarqube-5.5/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:1:in`(root)'
fromfile:/E:/Sonra/sonarqube-5.5/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:25:in`load_environment'
fromfile:/E:/Sonra/sonarqube-5.5/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails_booter.rb:79:in`load_environment'
atorg.jruby.rack.RackInitializationException.wrap(RackInitializationException.java:29)~[jruby-rack-1.1.13.2.jar:na]
atorg.jruby.rack.RackApplicationFactoryDecorator.init(RackApplicationFactoryDecorator.java:98)~[jruby-rack-1.1.13.2.jar:na]
atorg.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:50)~[jruby-rack-1.1.13.2.jar:na]
atorg.sonar.server.platform.RubyRailsContextListener.contextInitialized(RubyRailsContextListener.java:38)~[sonar-server-5.5.jar:na]
atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812)[tomcat-embed-core-8.0.30.jar:8.0.30]
atorg.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255)[tomcat-embed-core-8.0.30.jar:8.0.30]
atorg.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)[tomcat-embed-core-8.0.30.jar:8.0.30]
atorg.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)[tomcat-embed-core-8.0.30.jar:8.0.30]
atorg.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)[tomcat-embed-core-8.0.30.jar:8.0.30]
atjava.util.concurrent.FutureTask.run(UnknownSource)[na:1.8.0_91]
atjava.util.concurrent.ThreadPoolExecutor.runWorker(UnknownSource)[na:1.8.0_91]
atjava.util.concurrent.ThreadPoolExecutor$Worker.run(UnknownSource)[na:1.8.0_91]
atjava.lang.Thread.run(UnknownSource)[na:1.8.0_91]
Causedby:org.jruby.exceptions.RaiseException:(StatementInvalid)ActiveRecord::JDBCError:Tablespacefortable'`sonar`.`schema_migrations`'exists.PleaseDISCARDthetablespacebeforeIMPORT.:CREATETABLE`schema_migrations`(`version`varchar(255)NOTNULL)ENGINE=InnoDBCHARACTERSETutf8COLLATEutf8_bin
atRUBY.log(E:/Sonra/sonarqube-5.5/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract_adapter.rb:227)~[na:na]
atRUBY.execute(E:/Sonra/sonarqube-5.5/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/adapter.rb:183)~[na:na]
atRUBY.create_table(E:/Sonra/sonarqube-5.5/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/schema_statements.rb:109)~[na:na]
atRUBY.create_table(E:/Sonra/sonarqube-5.5/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/mysql/adapter.rb:252)~[na:na]
atRUBY.initialize_schema_migrations_table(E:/Sonra/sonarqube-5.5/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/schema_statements.rb:371)~[na:na]
atRUBY.initialize(E:/Sonra/sonarqube-5.5/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:441)~[na:na]
atRUBY.up(E:/Sonra/sonarqube-5.5/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:401)~[na:na]
atRUBY.migrate(E:/Sonra/sonarqube-5.5/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:383)~[na:na]
atRUBY.upgrade_and_start(E:/Sonra/sonarqube-5.5/web/WEB-INF/config/../lib/database_version.rb:66)~[na:na]
atRUBY.automatic_setup(E:/Sonra/sonarqube-5.5/web/WEB-INF/config/../lib/database_version.rb:77)~[na:na]
atRUBY.(root)(E:/Sonra/sonarqube-5.5/web/WEB-INF/config/environment.rb:306)~[na:na]
atorg.jruby.RubyKernel.load(org/jruby/RubyKernel.java:1094)~[jruby-complete-1.7.9.jar:na]
atRUBY.(root)(file:/E:/Sonra/sonarqube-5.5/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:1)~[na:na]
atRUBY.load_environment(file:/E:/Sonra/sonarqube-5.5/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:25)~[na:na]
atRUBY.load_environment(file:/E:/Sonra/sonarqube-5.5/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails_booter.rb:79)~[na:na]
2016.05.2509:36:04ERRORweb[o.a.c.c.StandardContext]Oneormorelistenersfailedtostart.Fulldetailswillbefoundintheappropriatecontainerlogfile
2016.05.2509:36:04ERRORweb[o.a.c.c.StandardContext]Context[]startupfailedduetopreviouserrors
2016.05.2509:36:04WARN web[o.a.c.l.WebappClassLoaderBase]Thewebapplication[ROOT]appearstohavestartedathreadnamed[Abandonedconnectioncleanupthread]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Stacktraceofthread:
java.lang.Object.wait(NativeMethod)
java.lang.ref.ReferenceQueue.remove(UnknownSource)
com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)
2016.05.2509:36:04WARN web[o.a.c.l.WebappClassLoaderBase]Thewebapplication[ROOT]appearstohavestartedathreadnamed[JRubyJIT-1]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Stacktraceofthread:
sun.misc.Unsafe.park(NativeMethod)
java.util.concurrent.locks.LockSupport.park(UnknownSource)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(UnknownSource)
java.util.concurrent.LinkedBlockingQueue.take(UnknownSource)
java.util.concurrent.ThreadPoolExecutor.getTask(UnknownSource)
java.util.concurrent.ThreadPoolExecutor.runWorker(UnknownSource)
java.util.concurrent.ThreadPoolExecutor$Worker.run(UnknownSource)
java.lang.Thread.run(UnknownSource)
2016.05.2509:36:04WARN web[o.a.c.l.WebappClassLoaderBase]Thewebapplication[ROOT]appearstohavestartedathreadnamed[JRubyJIT-2]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Stacktraceofthread:
sun.misc.Unsafe.park(NativeMethod)
java.util.concurrent.locks.LockSupport.park(UnknownSource)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(UnknownSource)
java.util.concurrent.LinkedBlockingQueue.take(UnknownSource)
java.util.concurrent.ThreadPoolExecutor.getTask(UnknownSource)
java.util.concurrent.ThreadPoolExecutor.runWorker(UnknownSource)
java.util.concurrent.ThreadPoolExecutor$Worker.run(UnknownSource)
java.lang.Thread.run(UnknownSource)
2016.05.2509:36:04INFO web[o.a.c.h.Http11NioProtocol]StartingProtocolHandler["http-nio-0.0.0.0-9000"]
2016.05.2509:36:05INFO web[o.s.s.a.TomcatAccessLog]Webserverisstarted
2016.05.2509:36:05INFO web[o.s.s.a.EmbeddedTomcat]HTTPconnectorenabledonport9000
2016.05.2509:36:05WARN web[o.s.p.ProcessEntryPoint]Failtostartweb
java.lang.IllegalStateException:Webappdidnotstart
atorg.sonar.server.app.EmbeddedTomcat.isUp(EmbeddedTomcat.java:84)~[sonar-server-5.5.jar:na]
atorg.sonar.server.app.WebServer.isUp(WebServer.java:48)[sonar-server-5.5.jar:na]
atorg.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:105)~[sonar-process-5.5.jar:na]
atorg.sonar.server.app.WebServer.main(WebServer.java:69)[sonar-server-5.5.jar:na]
2016.05.2509:36:05INFO web[o.a.c.h.Http11NioProtocol]PausingProtocolHandler["http-nio-0.0.0.0-9000"]
2016.05.2509:36:06INFO web[o.a.c.h.Http11NioProtocol]StoppingProtocolHandler["http-nio-0.0.0.0-9000"]
2016.05.2509:36:06INFO web[o.a.c.h.Http11NioProtocol]DestroyingProtocolHandler["http-nio-0.0.0.0-9000"]
2016.05.2509:36:06INFO web[o.s.s.a.TomcatAccessLog]Webserverisstopped
JavaHotSpot(TM)ClientVMwarning:ignoringoptionMaxPermSize=160m;supportwasremovedin8.0
2016.05.2509:36:06INFO app[o.s.p.m.Monitor]Process[es]isstopping
2016.05.2509:36:06INFO es[o.s.p.StopWatcher] Stoppingprocess
2016.05.2509:36:06INFO es[o.elasticsearch.node] [sonar-1464140116077]stopping...
2016.05.2509:36:06INFO es[o.elasticsearch.node] [sonar-1464140116077]stopped
2016.05.2509:36:06INFO es[o.elasticsearch.node] [sonar-1464140116077]closing...
2016.05.2509:36:06INFO es[o.elasticsearch.node] [sonar-1464140116077]closed
2016.05.2509:36:07INFO app[o.s.p.m.Monitor]Process[es]isstopped
<--WrapperStopped
@Yashin大神为什么会报这个错误呢?刚开始的时候只是建个数据库而已里面根本就没有表的
sonarstop然后把数据库清空了,再sonarstar。出现这个的原因可能是你首次启动sonarweb的时候启动失败,但却把数据库表建起来了。
@Yashin大神runner运行需要配上项目?
ERROR:ErrorduringSonarrunnerexecutionERROR:UnabletoexecuteSonarERROR:Causedby:Youmustdefinethefollowingmandatorypropertiesfor'Unknown':sonar.projectKey,sonar.projectName,sonar.projectVersion,sonar.sourcesERROR:ERROR:Toseethefullstacktraceoftheerrors,re-runSonarQubeRunnerwiththe-eswitch.ERROR:Re-runSonarQubeRunnerusingthe-Xswitchtoenablefulldebuglogging.@Yashin报错信息
@Yashin已经在项目里配置了运行还是报错上面那个错
SonarQubeRunner2.4
Java1.8.0_141OracleCorporation(64-bit)
Linux3.10.0-693.2.2.el7.x86_64amd64
INFO:Errorstacktracesareturnedon.
INFO:Runnerconfigurationfile:/usr/local/sonar-runner-2.4/conf/sonar-runner.properties
INFO:Projectconfigurationfile:NONE
INFO:Defaultlocale:"en_US",sourcecodeencoding:"UTF-8"
INFO:Workdirectory:/usr/local/sonar-runner-2.4/bin/./.sonar
INFO:------------------------------------------------------------------------
INFO:EXECUTIONFAILURE
INFO:------------------------------------------------------------------------
Totaltime:30.167s
FinalMemory:1M/29M
INFO:------------------------------------------------------------------------
ERROR:ErrorduringSonarrunnerexecution
org.sonar.runner.kevinsawicki.HttpRequest$HttpRequestException:java.net.SocketTimeoutException:connecttimedout
atorg.sonar.runner.kevinsawicki.HttpRequest.code(HttpRequest.java:1392)
atorg.sonar.runner.kevinsawicki.HttpRequest.ok(HttpRequest.java:1417)
atorg.sonar.runner.impl.ServerConnection.downloadString(ServerConnection.java:93)
atorg.sonar.runner.impl.ServerVersion.downloadVersion(ServerVersion.java:47)
atorg.sonar.runner.impl.ServerVersion.version(ServerVersion.java:38)
atorg.sonar.runner.impl.ServerVersion.is37Compatible(ServerVersion.java:58)
atorg.sonar.runner.impl.JarDownloader.checkVersionAndDownload(JarDownloader.java:36)
atorg.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:71)
atjava.security.AccessController.doPrivileged(NativeMethod)
atorg.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
atorg.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
atorg.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
atorg.sonar.runner.api.Runner.execute(Runner.java:100)
atorg.sonar.runner.Main.executeTask(Main.java:70)
atorg.sonar.runner.Main.execute(Main.java:59)
atorg.sonar.runner.Main.main(Main.java:53)
Causedby:java.net.SocketTimeoutException:connecttimedout
atsun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeMethod)
atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
atjava.lang.reflect.Constructor.newInstance(Constructor.java:423)
atsun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1926)
atsun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1921)
atjava.security.AccessController.doPrivileged(NativeMethod)
atsun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1920)
atsun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1490)
atsun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
atjava.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
atorg.sonar.runner.kevinsawicki.HttpRequest.code(HttpRequest.java:1390)
...15more
Causedby:java.net.SocketTimeoutException:connecttimedout
atjava.net.PlainSocketImpl.socketConnect(NativeMethod)
atjava.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
atjava.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
atjava.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
atjava.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
atjava.net.Socket.connect(Socket.java:589)
atsun.net.NetworkClient.doConnect(NetworkClient.java:175)
atsun.net.www.http.HttpClient.openServer(HttpClient.java:463)
atsun.net.www.http.HttpClient.openServer(HttpClient.java:558)
atsun.net.www.http.HttpClient.<init>(HttpClient.java:242)
atsun.net.www.http.HttpClient.New(HttpClient.java:339)
atsun.net.www.http.HttpClient.New(HttpClient.java:357)
atsun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1202)
atsun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
atsun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
atsun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:966)
atsun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1546)
atsun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
atsun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2982)
atorg.sonar.runner.kevinsawicki.HttpRequest.header(HttpRequest.java:1903)
atorg.sonar.runner.kevinsawicki.HttpRequest.contentType(HttpRequest.java:2308)
atorg.sonar.runner.impl.ServerConnection.downloadString(ServerConnection.java:89)
...13more