2016-12-16 94 views
3

我想部署一個Ruby on Rails API到AWS Elastic Beanstalk,但沒有任何運氣。我可以一次部署成功,我只會遇到錯誤,因爲生產環境不會db:seed。但是突然我每次想部署我將不得不爲了回到那個成功地部署,但得到了同樣的錯誤版本原木將RoR部署到AWS Beanstalk時出現Nginx錯誤

------------------------------------- 
/var/app/support/logs/passenger.log 
------------------------------------- 
[ 2016-12-16 13:22:39.2849 5408/7f442ea10780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started! 
2016/12/16 13:22:40 [error] 5427#0: *3 "/var/app/current/public/index.html" is not found (2: No such file or directory), client: 127.0.0.1, server: _, request: "HEAD/HTTP/1.1", host: "0.0.0.0" 
2016/12/16 13:22:40 [error] 5427#0: *3 testing "/var/app/current/public" existence failed (2: No such file or directory) while logging request, client: 127.0.0.1, server: _, request: "HEAD/HTTP/1.1", host: "0.0.0.0" 


------------------------------------- 
/var/log/eb-activity.log 
------------------------------------- 
    + service passenger restart 
    --> Downloading a Phusion Passenger agent binary for your platform 
    --------------------------------------- 
    No precompiled Nginx engine could be downloaded. Compiling it from source instead. 
    -------------------------------------------- 

    Your system does not have a lot of virtual memory 

    Installing... 
    Downloading Nginx 1.8.1 source code... 
    Extracting tarball... 
    Compiling support libraries (step 1 of 2)... 
    Compiling Nginx engine (step 2 of 2)... 

    ./configure: error: invalid option "--with-http_v2_module" 
    *** ERROR: command failed: cd /tmp/passenger-install.158a2iu/nginx-1.8.1 && env PASSENGER_INCLUDEDIR=/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/passenger-5.1.0/src PASSENGER_LIBS=/tmp/passenger-install.158a2iu/common/libpassenger_common/Logging.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/Exceptions.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/Utils/SystemTime.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/Utils/StrIntUtils.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/Utils/StrIntUtilsNoStrictAliasing.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/Utils/IOUtils.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/Utils.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/WatchdogLauncher.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/AppTypes.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/Utils/CachedFileStat.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/UnionStationFilterSupport.o\ /tmp/passenger-install.158a2iu/common/libboost_oxt.a /bin/bash ./configure --prefix=/tmp --with-cc-opt=-Wno-error --without-http_fastcgi_module --without-http_scgi_module --without-http_uwsgi_module --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_addition_module --add-module=/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/passenger-5.1.0/src/nginx_module 

以下錯誤我甚至混帳復歸承諾的時間!

PD: 另一件事我不得不這樣做(之前它的工作第一次)設置的EC2實例的根卷大小爲16吉布,因爲我會得到錯誤引入nokogiri寶石不能被budler安裝,它實際上修復了這個問題

+0

爲什麼你使用nginx的1.8.1版本?這是近一年前發佈的,在nginx的下載頁面上被列爲「傳統」版本... 另外,如果你想在deploy上運行'db:seed',在'.ebextensions'下創建一個文件並使用container_commands指令來做到這一點。更多細節可以在這裏找到:http://stackoverflow.com/questions/14371615/how-do-you-call-dbseed-on-aws-elastic-beanstalk-apps – Brian

+0

@ lucas-rodriguez你能解決這個問題嗎?問題? – einSelbst

回答

1

您看到的錯誤幾乎可能是因爲您在Gemfile中列出了Gem Passenger。如果需要,將其移除或放入development部分即可解決問題。 Passenger已預先安裝在AWS ElasticBeanstalk Ruby Stack上。

+0

如果你還沒有這樣做,我會嘗試重建ElasticBeanstalk環境。這可以通過AWS控制檯完成。 – einSelbst

+0

是!在我刪除了「Passenger」後,在新環境中重新啓動項目就成功了。一定會永久地停止它。 –

相關問題