Amazon web services AWS Beanstalk django 1.5应用程序不工作

Amazon web services AWS Beanstalk django 1.5应用程序不工作,amazon-web-services,amazon-elastic-beanstalk,amazon-elb,Amazon Web Services,Amazon Elastic Beanstalk,Amazon Elb,我是AWS的新手,请帮帮我。我只写可能对我的问题有影响的东西。若你们需要更多的信息,只需在评论部分写下。 当我ping ELB地址或应用程序地址时,我得到“请求超时” 服务器: Instance type: micro Custom AMI: ami-c37474b7 负载平衡器: Only HTTP, port 80 以及RDS、S3、ElastiCache、SQS 我还使用S3存储django的静态文件,这很有效,因为我可以在我的bucket中看到这些文件。 RDS和SQS也可以工作。E

我是AWS的新手,请帮帮我。我只写可能对我的问题有影响的东西。若你们需要更多的信息,只需在评论部分写下。 当我ping ELB地址或应用程序地址时,我得到“请求超时”

服务器:

Instance type: micro
Custom AMI: ami-c37474b7
负载平衡器:

Only HTTP, port 80
以及RDS、S3、ElastiCache、SQS

我还使用S3存储django的静态文件,这很有效,因为我可以在我的bucket中看到这些文件。
RDS和SQS也可以工作。ElastiCache的问题是超时,libmemcached会触发超时,但这不是主要问题

sg-cced0da3 |用于ElasticBeanstalk环境的SecurityGroup

22 (SSH)    0.0.0.0/0
80 (HTTP)   sg-ceed0da1
sg-ceed0da1 | ELB创建的安全组在创建ELB期间未指定安全组时使用-修改可能会影响未来ELB的流量

80 (HTTP)   0.0.0.0/0
配置文件

packages: 
  yum:
    libevent: []
    libmemcached: []
    libmemcached-devel: []

container_commands:
  01_collectstatic:
    command: "django-admin.py collectstatic --noinput"
  02_syncdb:
    command: "django-admin.py syncdb --noinput"
    leader_only: true
  03_createadmin:
    command: "utilities/scripts/createadmin.py"
    leader_only: true

option_settings:
  - namespace: aws:elasticbeanstalk:container:python
    option_name: WSGIPath
    value: findtofun/wsgi.py
  - option_name: DJANGO_SETTINGS_MODULE
    value: findtofun.settings
  - option_name: AWS_ACCESS_KEY_ID
    value: ...
  - option_name: AWS_SECRET_KEY
    value: ...
  - namespace: aws:elasticbeanstalk:container:python:staticfiles
    option_name: /static/
    value: static/
日志


/var/log/eb-tools.log
  • 2013-06-03 14:52:47908[信息](27814主线程)[directoryHooksExecutor.py-29][root directoryHooksExecutor信息] 脚本成功了
  • 2013-06-03 14:52:47908[信息](27814主线程)[directoryHookeSecutor.py-29][root directoryHookeSecutor信息]执行脚本:
  • /opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py
  • 2013-06-03 14:52:50019[信息](27814主线程)[directoryHookeSecutor.py-29][root directoryHookeSecutor信息]脚本的输出:中的新python可执行文件
  • /opt/python/run/venv/bin/python2.6
  • 安装

/var/log/httpd/error\u log
  • Python/2.6.8已配置--恢复正常操作
  • [Mon Jun 03 16:53:06 2013][error]异常键错误: 忽略中的键错误(140672020449248,)
  • [2013年6月3日星期一14:53:06][通知]本学期即将关闭
  • [2013年6月3日星期一14:53:08][通知]suEXEC机制已启用
    (包装纸:/usr/sbin/suexec)
  • [2013年6月3日星期一14:53:08][通知]摘要:为摘要身份验证生成机密
  • [2013年6月3日星期一14:53:08][通知]摘要:完成
  • [2013年6月3日星期一14:53:08][通知]Apache/2.2.22(Unix)DAV/2 mod_wsgi/3.2
  • Python/2.6.8已配置--恢复正常操作列表项

/opt/python/log/supervisord.log
/var/log/cfn-init.log
我不知道这是否是正确答案,但我想当我在settings.py文件中放入DEBUG=False时,它会起作用。有人能澄清一下吗。

对不起,编辑太多了。我正在努力处理未插入的代码。尝试通过SSH转到机器,看看那里发生了什么。我去了,激活了virutalenv,在端口8000上启动了服务器,没有出现错误。我还能查什么?httpd和python也在运行。
2013-06-03 04:39:35,544 CRIT Supervisor running as root (no user in config file)  
2013-06-03 04:39:35,650 INFO RPC interface 'supervisor' initialized  
2013-06-03 04:39:35,651 CRIT Server 'unix_http_server' running without any HTTP authentication checking  
2013-06-03 04:39:35,651 INFO supervisord started with pid 3488  
2013-06-03 04:39:36,658 INFO spawned: 'httpd' with pid 3498  
2013-06-03 04:39:37,660 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)  
2013-06-03 04:44:51,265 INFO stopped: httpd (exit status 0)  
2013-06-03 04:44:52,280 INFO spawned: 'httpd' with pid 3804  
2013-06-03 04:44:53,283 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)  
2013-06-03 14:53:06,986 INFO stopped: httpd (exit status 0)  
2013-06-03 14:53:08,000 INFO spawned: 'httpd' with pid 27871  
2013-06-03 14:53:09,003 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)  
2013-06-03 14:53:05,520 [DEBUG] Running test for command 03_createadmin  
2013-06-03 14:53:05,535 [DEBUG] Test command output:  
2013-06-03 14:53:05,536 [DEBUG] Test for command 03_createadmin passed  
2013-06-03 14:53:05,986 [INFO] Command 03_createadmin succeeded  
2013-06-03 14:53:05,987 [DEBUG] Command 03_createadmin output:  
2013-06-03 14:53:05,987 [DEBUG] No services specified  
2013-06-03 14:53:05,994 [INFO] ConfigSets completed  
2013-06-03 14:53:06,000 [DEBUG] Not clearing reboot trigger as scheduling support is not available  
2013-06-03 14:53:06,292 [DEBUG] CloudFormation client initialized with endpoint   https://cloudformation.eu-west-1.amazonaws.com  
2013-06-03 14:53:06,292 [DEBUG] Describing resource AWSEBAutoScalingGroup in stack  arn:aws:cloudformation:eu-west-1:352769977590:stack/awseb-e-bwrsuih23z-stack/52c9b3c0-cbf6-11e2-ace7-5017c2ccb886  
2013-06-03 14:53:06,489 [DEBUG] Not setting a reboot trigger as scheduling support is not available  
2013-06-03 14:53:06,510 [INFO] Running configSets: Hook-EnactAppDeploy  
2013-06-03 14:53:06,511 [INFO] Running configSet Hook-EnactAppDeploy  
2013-06-03 14:53:06,512 [INFO] Running config Hook-EnactAppDeploy  
2013-06-03 14:53:06,512 [DEBUG] No packages specified  
2013-06-03 14:53:06,512 [DEBUG] No groups specified  
2013-06-03 14:53:06,512 [DEBUG] No users specified  
2013-06-03 14:53:06,513 [DEBUG] No sources specified  
2013-06-03 14:53:06,513 [DEBUG] /etc/httpd/conf.d/01ebsys.conf already exists  
2013-06-03 14:53:06,513 [DEBUG] Moving /etc/httpd/conf.d/01ebsys.conf to /etc/httpd/conf.d/01ebsys.conf.bak  
2013-06-03 14:53:06,513 [DEBUG] Writing content to /etc/httpd/conf.d/01ebsys.conf  
2013-06-03 14:53:06,514 [DEBUG] No mode specified for /etc/httpd/conf.d/01ebsys.conf  
2013-06-03 14:53:06,514 [DEBUG] Running command aclean  
2013-06-03 14:53:06,514 [DEBUG] No test for command aclean  
2013-06-03 14:53:06,532 [INFO] Command aclean succeeded  
2013-06-03 14:53:06,533 [DEBUG] Command aclean output:  
2013-06-03 14:53:06,533 [DEBUG] Running command clean  
2013-06-03 14:53:06,534 [DEBUG] No test for command clean  
2013-06-03 14:53:06,547 [INFO] Command clean succeeded  
2013-06-03 14:53:06,548 [DEBUG] Command clean output:  
2013-06-03 14:53:06,548 [DEBUG] Running command hooks  
2013-06-03 14:53:06,548 [DEBUG] No test for command hooks  
2013-06-03 14:53:19,278 [INFO] Command hooks succeeded  
2013-06-03 14:53:19,279 [DEBUG] Command hooks output: Executing directory: /opt/elasticbeanstalk/hooks/appdeploy/enact/  
Executing script: /opt/elasticbeanstalk/hooks/appdeploy/enact/01flip.py  
Output from script: httpd: stopped  
httpd: started  
httpd RUNNING pid 27871, uptime 0:00:03  

Script succeeded.  
Executing script: /opt/elasticbeanstalk/hooks/appdeploy/enact/09clean.sh  
Output from script:  
Script succeeded.