1

我正在尝试使用 Amazon Elastic Beanstalk 部署声纳服务器。我下载了声纳分布。我跑了build-war.sh. 然后使用这些说明自定义 EC2 实例: http ://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html

.ebextensionssonar.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 

当我通过 beanstalk(在 Tomcat 7/Linux 64 实例上)部署 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 回答