简体   繁体   中英

ElasticBeanstalk and Rails - Deploying app but only getting 404 Not Found nginx/1.4.3

I've been trying to deploy a simple app I developed to AWS with EB. The app runs without any problems on my local machine, but when I init and deploy to EB, nothing happens. I keep getting a 404 Not Found page with the text "nginx/1.4.3".

As for my Rails app, I'm using Rails v4.0.1 and Ruby 2.0.0 (though I've switched to 1.9.3 and things are working fine). I have used both Passenger and WEBrick successfully on my local machine.

When I push my app to my EB environment, I get the following error in the event log:

[Instance: i-09add427 Module: AWSEBAutoScalingGroup ConfigSet: null] Command failed on instance. Return code: 1 Output: Error occurred during build: Command hooks failed .

I have no idea what's causing this. The advice at this link ( Deploying Rails with Elastic Beanstalk 404 Not Found Error ) did not help.

Here is my eb status:

URL     : app-env-f9xtrrcpch.elasticbeanstalk.com
Status      : Ready
Health      : Green
Environment Name: app-env
Environment ID  : e-fjvq2ztbxh
Environment Tier: WebServer::Standard::1.0
Solution Stack  : 64bit Amazon Linux 2013.09 running Ruby 1.9.3
Version Label   : git-3ea95ce5ee91763bee8a9f2f5987a023725d9af1-1392264246964
Date Created    : 2014-02-12 22:03:10
Date Updated    : 2014-02-12 23:04:31
Description : 

The things I suspect might be causing this are:

The .ebextensions/myapp.config file (Do I need to require gems here?)

Rails version

Some Passenger/Nginx configuration file.

Any and all help is much appreciated. I would be happy to provide more information.

The error message "Command hooks failed" means that the deploy failed. Elastic Beanstalk runs a set of scripts (hooks) that bundle, migrate and deploy your application. One of these steps have failed and you need to check which one.
From your amazon EB console, you need to download your logs. In there you'll find directory-hooks-executor.log and the actual error lies within.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM