1

AmazonElasticBeanstalkを使用してSonarサーバーをデプロイしようとしています。ソナーディストリビューションをダウンロードしました。を実行しましたbuild-war.sh。次に、次の指示を使用してEC2インスタンスをカスタマイズします:http: //docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html

.ebextensionsにディレクトリを作成しましたsonar.war

そのディレクトリにsonar.config、これらのコンテンツを含むファイルを作成しました(私の目標は、ソナーのディストリビューションを解凍し、SONAR_HOME環境変数を更新することです。

sources:   
  /tmp: http://dist.sonar.codehaus.org/sonar-3.4.1.zip  
option_settings: 
  - option_name: SONAR_HOME  
    value: /tmp/sonar-3.4.1 

(Tomcat 7 / Linux 64インスタンスで)beanstalkを介してsonar.warをデプロイすると、次のエラーが発生します。

--- Java Exception
java.lang.NullPointerException
    at org.sonar.server.ui.JRubyFacade.get(JRubyFacade.java:99)
    at org.sonar.server.ui.JRubyFacade.getServerHome(JRubyFacade.java:466)

05:08:31.883 [localhost-startStop-1] ERROR jruby.rack - unable to create shared application instance
org.jruby.rack.RackInitializationException: java.lang.NullPointerException: null
    from org/sonar/server/ui/JRubyFacade.java:466:in `getServerHome'
    from /var/cache/tomcat7/temp/0-ROOT/WEB-INF/config/environment.rb:52:in `(root)'
    from /var/cache/tomcat7/temp/0-ROOT/WEB-INF/gems/gems/rails-2.3.14/lib/initializer.rb:111:in `run'
    from /var/cache/tomcat7/temp/0-ROOT/WEB-INF/config/environment.rb:32:in `(root)'
    from org/jruby/RubyKernel.java:1058:in `load'
    from /var/cache/tomcat7/temp/0-ROOT/WEB-INF/config/environment.rb:23:in `load_environment'
    from /var/cache/tomcat7/work/Catalina/localhost/_/loader/jruby/rack/rails_booter.rb:65:in `load_environment'
    from <script>:1:in `(root)'

    at org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:231) ~[jruby-rack-1.1.10.jar:na]
    at org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:58) ~[jruby-rack-1.1.10.jar:na]
    at org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFactory.java:33) ~[jruby-rack-1.1.10.jar:na]
    at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:48) [jruby-rack-1.1.10.jar:na]
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791) [catalina.jar:7.0.32]
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285) [catalina.jar:7.0.32]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.32]
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) [catalina.jar:7.0.32]
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) [catalina.jar:7.0.32]
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) [catalina.jar:7.0.32]
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1105) [catalina.jar:7.0.32]
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1664) [catalina.jar:7.0.32]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.6.0_24]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.6.0_24]
    at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.6.0_24]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.6.0_24]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.6.0_24]
    at java.lang.Thread.run(Thread.java:679) [na:1.6.0_24]
org.jruby.exceptions.RaiseException: Native Exception: 'class java.lang.NullPointerException'; Message: null; StackTrace: java.lang.NullPointerException
    at org.sonar.server.ui.JRubyFacade.get(JRubyFacade.java:99)
    at org.sonar.server.ui.JRubyFacade.getServerHome(JRubyFacade.java:466)

    at org.sonar.server.ui.JRubyFacade.get(JRubyFacade.java:99) ~[JRubyFacade.class:na]
    at org.sonar.server.ui.JRubyFacade.getServerHome(JRubyFacade.java:466) ~[JRubyFacade.class:na]
Caused by: java.lang.NullPointerException: null
    ... 2 common frames omitted
05:08:31.884 [localhost-startStop-1] ERROR jruby.rack - Error: application initialization failed
org.jruby.rack.RackInitializationException: java.lang.NullPointerException: null
    from org/sonar/server/ui/JRubyFacade.java:466:in `getServerHome'
    from /var/cache/tomcat7/temp/0-ROOT/WEB-INF/config/environment.rb:52:in `(root)'
    from /var/cache/tomcat7/temp/0-ROOT/WEB-INF/gems/gems/rails-2.3.14/lib/initializer.rb:111:in `run'
    from /var/cache/tomcat7/temp/0-ROOT/WEB-INF/config/environment.rb:32:in `(root)'
    from org/jruby/RubyKernel.java:1058:in `load'
    from /var/cache/tomcat7/temp/0-ROOT/WEB-INF/config/environment.rb:23:in `load_environment'
    from /var/cache/tomcat7/work/Catalina/localhost/_/loader/jruby/rack/rails_booter.rb:65:in `load_environment'
    from <script>:1:in `(root)'

    at org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:231) ~[jruby-rack-1.1.10.jar:na]
    at org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:58) ~[jruby-rack-1.1.10.jar:na]
    at org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFactory.java:33) ~[jruby-rack-1.1.10.jar:na]
    at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:48) ~[jruby-rack-1.1.10.jar:na]
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791) [catalina.jar:7.0.32]
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285) [catalina.jar:7.0.32]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.32]
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) [catalina.jar:7.0.32]
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) [catalina.jar:7.0.32]
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) [catalina.jar:7.0.32]
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1105) [catalina.jar:7.0.32]
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1664) [catalina.jar:7.0.32]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.6.0_24]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.6.0_24]
    at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.6.0_24]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.6.0_24]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.6.0_24]
    at java.lang.Thread.run(Thread.java:679) [na:1.6.0_24]
org.jruby.exceptions.RaiseException: Native Exception: 'class java.lang.NullPointerException'; Message: null; StackTrace: java.lang.NullPointerException
    at org.sonar.server.ui.JRubyFacade.get(JRubyFacade.java:99)
    at org.sonar.server.ui.JRubyFacade.getServerHome(JRubyFacade.java:466)

    at org.sonar.server.ui.JRubyFacade.get(JRubyFacade.java:99) ~[JRubyFacade.class:na]
    at org.sonar.server.ui.JRubyFacade.getServerHome(JRubyFacade.java:466) ~[JRubyFacade.class:na]
Caused by: java.lang.NullPointerException: null
    ... 2 common frames omitted
4

1 に答える 1

1

私も同様の問題を抱えていて、ここで答えを見つけました。

これが私がUbuntuにソナーをインストールした方法です

于 2013-02-12T08:35:04.737 に答える