Reputation: 4622
Recently our SonarQube
instance started rejecting report submissions. Below is the log entry in the access log.
192.168.23.XXX - - [07/Dec/2015:16:34:53 +1100] "POST
/api/computation/submit_report?projectKey=XXX.Sonar.Test HTTP/1.1" 500 - "-" "SonarQube 5.1"
Can anyone help as to how I would diagnose the issue here, the sonar.log is empty of errors. Am I missing a log location?
Here is the exeception on the client:
ERROR: Error during Sonar runner execution org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.IllegalStateException: Fail to execute request [code=500, url=http://sonar.XXX.com.au:9000/api /computation/submit_report?projectKey=Quantium.Sonar.Test]: <html><body><h1>500 Internal Server Error</h1>If you are the administrator of this website, then please read this web application's log file to find out what went wrong.</body></html>
at org.sonar.batch.report.PublishReportJob.uploadMultiPartReport(PublishReportJob.java:131)
at org.sonar.batch.report.PublishReportJob.execute(PublishReportJob.java:77)
at org.sonar.batch.phases.DatabaseModePhaseExecutor.publishReportJob(DatabaseModePhaseExecutor.java:188)
at org.sonar.batch.phases.DatabaseModePhaseExecutor.execute(DatabaseModePhaseExecutor.java:134)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:264)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:235)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:230)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:220)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:135)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:158)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
Any help would be much appreciated
Upvotes: 0
Views: 1815
Reputation: 4622
The server did actually receive the post, however it responded with a HTTP 500:
2015.12.07 17:03:55 ERROR web[rails] /!\ FAILSAFE /!\ Mon Dec 07 17:03:55 +1100 2015 Status: 500 Internal Server Error No such file or directory - C:/Windows/system32/config/systemprofile/AppData/Local/Temp org/jruby/RubyFile.java:842:in
stat' jar:file:/D:/sonarqube-5.1/lib/server/jruby-complete-1.7.9.jar!/META-INF/jruby.home/lib/ruby/shared/tmpdir.rb:33:in
tmpdir' org/jruby/RubyArray.java:1613:ineach' jar:file:/D:/sonarqube-5.1/lib/server/jruby-complete-1.7.9.jar!/META-INF/jruby.home/lib/ruby/shared/tmpdir.rb:30:in
tmpdir' jar:file:/D:/sonarqube-5.1/lib/server/jruby-complete-1.7.9.jar!/META-INF/jruby.home/lib/ruby/shared/tmpdir.rb:109:intmpdir' jar:file:/D:/sonarqube-5.1/lib/server/jruby-complete-1.7.9.jar!/META-INF/jruby.home/lib/ruby/shared/tmpdir.rb:141:in
create' org/jruby/ext/tempfile/Tempfile.java:88:ininitialize' org/jruby/RubyIO.java:852:in
new' D:/sonarqube-5.1/web/WEB-INF/gems/gems/rack-1.1.6/lib/rack/utils.rb:559:inparse_multipart' org/jruby/RubyKernel.java:1519:in
loop' D:/sonarqube-5.1/web/WEB-INF/gems/gems/rack-1.1.6/lib/rack/utils.rb:537:inparse_multipart' D:/sonarqube-5.1/web/WEB-INF/gems/gems/rack-1.1.6/lib/rack/request.rb:268:in
parse_multipart' D:/sonarqube-5.1/web/WEB-INF/gems/gems/rack-1.1.6/lib/rack/request.rb:146:inPOST' D:/sonarqube-5.1/web/WEB-INF/gems/gems/rack-1.1.6/lib/rack/methodoverride.rb:15:in
call' D:/sonarqube-5.1/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/params_parser.rb:15:incall' file:/D:/sonarqube-5.1/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/session_store.rb:70:in
context' D:/sonarqube-5.1/web/WEB-INF/gems/gems/rack-1.1.6/lib/rack/session/abstract/id.rb:58:incall' D:/sonarqube-5.1/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/failsafe.rb:26:in
call' D:/sonarqube-5.1/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:106:incall' file:/D:/sonarqube-5.1/lib/server/jruby-rack-1.1.13.2.jar!/rack/adapter/rails.rb:34:in
serve_rails' file:/D:/sonarqube-5.1/lib/server/jruby-rack-1.1.13.2.jar!/rack/adapter/rails.rb:39:incall' file:/D:/sonarqube-5.1/lib/server/jruby-rack-1.1.13.2.jar!/rack/handler/servlet.rb:22:in
call'
Seems that the TEMPDIR required by JRuby must be set in the wrapper.conf file - it doesn't read env. var:
set.TMPDIR={Path to tmp dir}
I hope this helps anyone else with this issue
Upvotes: 1