简体   繁体   English

将Rails应用程序部署到AWS Elastic Beanstalk,超时

[英]Deploying Rails App to AWS Elastic Beanstalk, time out

I have an existing app that runs fine on localhost. 我有一个在localhost上运行良好的现有应用程序。 I tried to deploy it to AWS Elastic Beanstalk today via the step-by-step instructions on this page 我今天尝试通过此页面上的分步说明将其部署到AWS Elastic Beanstalk

After using git aws.push to deploy it onto AWS, I wait for the status of the environment to go to green, and try to access the url it gives me. 在使用git aws.push将其部署到AWS之后,我等待环境状态变为绿色,并尝试访问它给我的URL。 I get a timeout error after a long while of waiting. 经过一段时间的等待后,我收到超时错误。

I know this is really not much to go off of, but I'm equally stumped. 我知道这真的不多,但我同样难过。 Is there some kind of server side error log or console log (similar to what I see when I 'rails s' on my computer) so I can see what the AWS environment is writing out? 是否存在某种服务器端错误日志或控制台日志(类似于我在计算机上运行时所看到的内容),因此我可以看到AWS环境正在写出什么? I'm not even sure where to start debugging here. 我甚至不确定从哪里开始调试。

Your first step is to snapshot your logs from the logs tab of your elastic beanstalk's environment you deployed to. 您的第一步是从您部署到的弹性beanstalk环境的日志选项卡中快照日志。 This will give you a snapshot of the recent log activity. 这将为您提供最近日志活动的快照。 If you do need to ssh into the EC2 instance that backs your Elastic Beanstalk instance, it's not immediately evident how to do that. 如果确实需要ssh到支持Elastic Beanstalk实例的EC2实例,那么如何做到这一点并不是很明显。 You first need to generate a key pair and download it something like my-key.pem. 首先需要生成密钥对并下载类似my-key.pem的密钥对。 Then associate that key with the Elastic beanstalk application by editing the configuration and on the first tab, add my-key (note it's just the name, not the actual key). 然后通过编辑配置将该密钥与Elastic beanstalk应用程序相关联,并在第一个选项卡上添加my-key(注意它只是名称,而不是实际的密钥)。 To ssh into your EC2 instance you use ssh -i /path/to/my-key.pem ec2-user@ 要使用ssh -i /path/to/my-key.pem ec2-user @进入EC2实例

You get the ec2 public url from the ec2 console. 您从ec2控制台获得ec2公共URL。 Hope all this helps. 希望这一切都有帮助。

First you'll need to ssh into your server 首先,您需要ssh到您的服务器

https://stackoverflow.com/a/4921866/274695 https://stackoverflow.com/a/4921866/274695

Then, you can look your application logs (passenger.log, production.log) at /var/app/support/logs/ 然后,您可以在/ var / app / support / logs /中查看应用程序日志(passenger.log,production.log)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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