我根据http://docs.sonarqube.org/display/SONAR/Installing新安装了Sonar 4.5.1。 但完成安装后会显示以下错误:
org.jruby.rack.RackInitializationException: An error has occurred, all later migrations canceled:
ActiveRecord::JDBCError: Error on rename of '.\sonar\#sql-624_2f8.frm' to '.\sonar\rules_profiles.frm' (Errcode: 13 - Permission denied): ALTER TABLE `rules_profiles` DROP `used_profile`
from D:/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract_adapter.rb:227:in `log'
from D:/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract_adapter.rb:212:in `log'
from D:/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/adapter.rb:183:in `execute'
from D:/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/schema_statements.rb:200:in `remove_column'
from org/jruby/RubyArray.java:1613:in `each'
from D:/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/schema_statements.rb:199:in `remove_column'
from org/jruby/RubyKernel.java:2235:in `send'
from D:/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:352:in `method_missing'
from D:/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:328:in `say_with_time'
from jar:file:/D:/sonarqube-4.5.1/lib/server/jruby-complete-1.7.9.jar!/META-INF/jruby.home/lib/ruby/1.8/benchmark.rb:293:in `measure'
from D:/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:328:in `say_with_time'
from D:/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:348:in `method_missing'
from D:/sonarqube-4.5.1/web/WEB-INF/config/../lib/../db/migrate/549_feed_qprofile_keys.rb:36:in `up'
from org/jruby/RubyKernel.java:2223:in `send'
from D:/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:282:in `migrate'
from jar:file:/D:/sonarqube-4.5.1/lib/server/jruby-complete-1.7.9.jar!/META-INF/jruby.home/lib/ruby/1.8/benchmark.rb:293:in `measure'
from D:/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:282:in `migrate'
from org/jruby/RubyKernel.java:2235:in `send'
from D:1:in `migrate'
from D:/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:491:in `migrate'
from org/jruby/RubyProc.java:290:in `call'
from org/jruby/RubyProc.java:224:in `call'
from D:/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:567:in `ddl_transaction'
from D:/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:490:in `migrate'
from org/jruby/RubyArray.java:1613:in `each'
from D:/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:477:in `migrate'
from D:/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:401:in `up'
from D:/sonarqube-4.5.1/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:383:in `migrate'
from D:/sonarqube-4.5.1/web/WEB-INF/config/../lib/database_version.rb:62:in `upgrade_and_start'
from D:/sonarqube-4.5.1/web/WEB-INF/config/../lib/database_version.rb:73:in `automatic_setup'
from D:/sonarqube-4.5.1/web/WEB-INF/config/environment.rb:243:in `(root)'
from org/jruby/RubyKernel.java:1094:in `load'
from file:/D:/sonarqube-4.5.1/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:1:in `(root)'
from file:/D:/sonarqube-4.5.1/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:25:in `load_environment'
from file:/D:/sonarqube-4.5.1/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/rails_booter.rb:79:in `load_environment'
at org.jruby.rack.RackInitializationException.wrap(RackInitializationException.java:29)
at org.jruby.rack.RackApplicationFactoryDecorator.init(RackApplicationFactoryDecorator.java:98)
at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:50)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.jruby.exceptions.RaiseException: (StandardError) An error has occurred, all later migrations canceled:
ActiveRecord::JDBCError: Error on rename of '.\sonar\#sql-624_2f8.frm' to '.\sonar\rules_profiles.frm' (Errcode: 13 - Permission denied): ALTER TABLE `rules_profiles` DROP `used_profile`
我在Localhost中使用MySql安装,在端口80使用config soner。 我还尝试了两次新文件,但它显示了同样的错误。
如何解决此问题。
答案 0 :(得分:1)
sonar.properties
中配置的用户帐户很可能无权更改数据库架构。尝试与其他用户或授予声纳更多权利。
GRANT ALL ON *.* TO 'sonar'@'%';