2015-08-15 68 views
0

我已經成功地將我的rails應用程序部署到我的環境中,但是當我看到監視儀表板上有0.0個ELB實例時,爲什麼會這樣?爲什麼它的0.0 ELB實例?

這裏是我的日誌,當我部署:

INFO: Deploying new version to instance(s).       
INFO: New application version was deployed to running EC2 instances. 
INFO: Environment update completed successfully.      

目前我只訪問我的應用程序時,你得到的空白頁,我想那是因爲我得到了0.0 ELB實例

我將如何解決這個問題?

這裏是一個快照:

enter image description here

編輯,活動日誌:

[2015-08-23T17:18:03.570Z] INFO [18661] - [Application update/AppDeployStage1/AppDeployEnactHook/99_reload_app_server.sh] : Starting activity... 
[2015-08-23T17:18:04.993Z] INFO [18661] - [Application update/AppDeployStage1/AppDeployEnactHook/99_reload_app_server.sh] : Completed activity. Result: 
    + service passenger restart 
    According to the PID file '/var/app/support/pids/passenger.pid', 
    Phusion Passenger Standalone doesn't seem to be running. 

    If you know that Phusion Passenger Standalone *is* running then one of these 
    might be the cause of this error: 

    * The Phusion Passenger Standalone instance that you want to stop isn't running 
    on port 80, but on another port. If this is the case then you 
    should specify the right port with --port. 
    If the instance is listening on a Unix socket file instead of a TCP port, 
    then please specify the PID file's filename with --pid-file. 
    * The instance that you want to stop has stored its PID file in a non-standard 
    location. In this case please specify the right PID file with --pid-file. 
    /opt/elasticbeanstalk/support/conf/nginx_config_healthd.erb:49:in `block in write_nginx_config_file': undefined local variable or method `location_config_filename' for #<PhusionPassenger::Standalone::StartCommand:0x007f7ab$ 
     from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/erb.rb:863:in `eval' 
     from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/erb.rb:863:in `result' 
     from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/passenger-5.0.15/lib/phusion_passenger/standalone/start_command/nginx_engine.rb:120:in `block in write_nginx_config_file' 
     from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/passenger-5.0.15/lib/phusion_passenger/standalone/start_command/nginx_engine.rb:113:in `open' 
     from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/passenger-5.0.15/lib/phusion_passenger/standalone/start_command/nginx_engine.rb:113:in `write_nginx_config_file' 
     from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/passenger-5.0.15/lib/phusion_passenger/standalone/start_command/nginx_engine.rb:41:in `start_engine_real' 
     from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/passenger-5.0.15/lib/phusion_passenger/standalone/start_command.rb:609:in `start_engine' 
     from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/passenger-5.0.15/lib/phusion_passenger/standalone/start_command.rb:80:in `run' 
     from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/passenger-5.0.15/lib/phusion_passenger/standalone/main.rb:50:in `run!' 
     from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/passenger-5.0.15/bin/passenger:44:in `<top (required)>' 
     from /opt/rubies/ruby-2.2.2/bin/passenger:23:in `load' 
     from /opt/rubies/ruby-2.2.2/bin/passenger:23:in `<main>' 
[2015-08-23T17:18:04.993Z] INFO [18661] - [Application update/AppDeployStage1/AppDeployEnactHook] : Completed activity. Result: 
    Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/enact. 
+0

你可以附上截圖嗎?不確定你的意思是0.0個實例。 –

+0

請看上面的 – simo

回答

0

看起來你正在使用增強的健康。你可以點擊儀表板鏈接。你會看到一個原因按鈕。點擊原因按鈕,它會告訴你爲什麼你的環境健康是嚴重的。看一個例子截圖這裏定位的原因按鈕:https://aws.amazon.com/blogs/aws/elastic-beanstalk-update-enhanced-application-health-monitoring/

+0

什麼是增強健康?原因按鈕沒有多大意義,它說「ELB健康狀況不佳或不適用於所有實例。」 所有實例的服務受損。「 – simo

+0

控制檯當前不顯示實例健康...同時,您可以使用sdk或aws cli使用來自Beanstalk的DescribeInstancesHealth api。看來你的服務器上沒有運行nginx代理。受損的服務可能意味着代理或應用程序未運行。你能點擊日誌從實例中獲取快照日誌嗎?然後你可以看到詳細的寫信息。 –

+0

以下是如何獲取日誌:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.logging.html –

0

您有0實例上運行的,爲什麼您的應用程序沒有運行,多數民衆贊成。您需要單擊EC2並重新啓動與Elastic Beanstalk相關聯的實例。

相關問題