标头之前的脚本输出结束:wsgi.py将python django部署到AWS EB

时间:2016-05-03 16:07:14

标签: django python-2.7 amazon-web-services elastic-beanstalk

我无法将Django应用程序部署到AWS EB。我正在部署一个Django 1.7应用程序。 日志文件的读数如下。我只收到内部服务器错误,不知道如何解决这个问题。有没有人遇到过这个?

-------------------------------------
/opt/python/log/supervisord.log
-------------------------------------
2016-05-03 15:22:57,677 CRIT Supervisor running as root (no user in config file)
2016-05-03 15:22:57,690 INFO RPC interface 'supervisor' initialized
2016-05-03 15:22:57,690 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-05-03 15:22:57,690 INFO supervisord started with pid 2732
2016-05-03 15:22:58,695 INFO spawned: 'httpd' with pid 2813
2016-05-03 15:22:59,961 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-05-03 15:44:46,405 INFO stopped: httpd (exit status 0)
2016-05-03 15:44:47,410 INFO spawned: 'httpd' with pid 3628
2016-05-03 15:44:48,630 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)



-------------------------------------
/var/log/httpd/error_log
-------------------------------------
[Tue May 03 15:22:58.961698 2016] [suexec:notice] [pid 2813] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue May 03 15:22:58.972366 2016] [auth_digest:notice] [pid 2813] AH01757: generating secret for digest authentication ...
[Tue May 03 15:22:58.972884 2016] [lbmethod_heartbeat:notice] [pid 2813] AH02282: No slotmem from mod_heartmonitor
[Tue May 03 15:22:58.972916 2016] [:warn] [pid 2813] mod_wsgi: Compiled for Python/2.7.9.
[Tue May 03 15:22:58.972919 2016] [:warn] [pid 2813] mod_wsgi: Runtime using Python/2.7.10.
[Tue May 03 15:22:58.974405 2016] [mpm_prefork:notice] [pid 2813] AH00163: Apache/2.4.18 (Amazon) mod_wsgi/3.5 Python/2.7.10 configured -- resuming normal operations
[Tue May 03 15:22:58.974417 2016] [core:notice] [pid 2813] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Tue May 03 15:44:46.393621 2016] [mpm_prefork:notice] [pid 2813] AH00169: caught SIGTERM, shutting down
[Tue May 03 15:44:47.630036 2016] [suexec:notice] [pid 3628] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue May 03 15:44:47.641260 2016] [so:warn] [pid 3628] AH01574: module wsgi_module is already loaded, skipping
[Tue May 03 15:44:47.643427 2016] [auth_digest:notice] [pid 3628] AH01757: generating secret for digest authentication ...
[Tue May 03 15:44:47.644043 2016] [lbmethod_heartbeat:notice] [pid 3628] AH02282: No slotmem from mod_heartmonitor
[Tue May 03 15:44:47.644087 2016] [:warn] [pid 3628] mod_wsgi: Compiled for Python/2.7.9.
[Tue May 03 15:44:47.644093 2016] [:warn] [pid 3628] mod_wsgi: Runtime using Python/2.7.10.
[Tue May 03 15:44:47.646008 2016] [mpm_prefork:notice] [pid 3628] AH00163: Apache/2.4.18 (Amazon) mod_wsgi/3.5 Python/2.7.10 configured -- resuming normal operations
[Tue May 03 15:44:47.646023 2016] [core:notice] [pid 3628] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Tue May 03 15:44:55.327286 2016] [core:error] [pid 3634] [client 127.0.0.1:58160] End of script output before headers: wsgi.py
[Tue May 03 15:45:07.985538 2016] [core:error] [pid 3633] [client 127.0.0.1:58162] End of script output before headers: wsgi.py
[Tue May 03 15:45:21.409032 2016] [core:error] [pid 3634] [client 127.0.0.1:58164] End of script output before headers: wsgi.py
[Tue May 03 15:45:35.873643 2016] [core:error] [pid 3632] [client 127.0.0.1:58166] End of script output before headers: wsgi.py
[Tue May 03 15:45:48.389833 2016] [core:error] [pid 3634] [client 127.0.0.1:58168] End of script output before headers: wsgi.py
[Tue May 03 15:46:00.246771 2016] [core:error] [pid 3636] [client 127.0.0.1:58170] End of script output before headers: wsgi.py
[Tue May 03 15:46:13.163713 2016] [core:error] [pid 3632] [client 127.0.0.1:58172] End of script output before headers: wsgi.py
[Tue May 03 15:46:25.899205 2016] [core:error] [pid 3751] [client 127.0.0.1:58174] End of script output before headers: wsgi.py

127.0.0.1 (-) - - [03/May/2016:15:48:56 +0000] "GET / HTTP/1.1" 500 527 "-" "Python-urllib/2.7"
127.0.0.1 (-) - - [03/May/2016:15:49:09 +0000] "GET / HTTP/1.1" 500 527 "-" "Python-urllib/2.7"
127.0.0.1 (-) - - [03/May/2016:15:49:21 +0000] "GET / HTTP/1.1" 500 527 "-" "Python-urllib/2.7"
127.0.0.1 (-) - - [03/May/2016:15:49:33 +0000] "GET / HTTP/1.1" 500 527 "-" "Python-urllib/2.7"
127.0.0.1 (-) - - [03/May/2016:15:49:46 +0000] "GET / HTTP/1.1" 500 527 "-" "Python-urllib/2.7"
127.0.0.1 (-) - - [03/May/2016:15:49:59 +0000] "GET / HTTP/1.1" 500 527 "-" "Python-urllib/2.7"
127.0.0.1 (-) - - [03/May/2016:15:50:13 +0000] "GET / HTTP/1.1" 500 527 "-" "Python-urllib/2.7"
127.0.0.1 (-) - - [03/May/2016:15:50:27 +0000] "GET / HTTP/1.1" 500 527 "-" "Python-urllib/2.7"
127.0.0.1 (-) - - [03/May/2016:15:50:39 +0000] "GET / HTTP/1.1" 500 527 "-" "Python-urllib/2.7"
127.0.0.1 (-) - - [03/May/2016:15:50:52 +0000] "GET / HTTP/1.1" 500 527 "-" "Python-urllib/2.7"
127.0.0.1 (-) - - [03/May/2016:15:51:05 +0000] "GET / HTTP/1.1" 500 527 "-"

-------------------------------------
/var/log/eb-activity.log
-------------------------------------
  Collecting requests-oauthlib==0.4.1 (from -r /opt/python/ondeck/app/requirements.txt (line 15))
    Downloading requests_oauthlib-0.4.1-py2.py3-none-any.whl
  Collecting static==0.4 (from -r /opt/python/ondeck/app/requirements.txt (line 16))
    Downloading static-0.4.tar.gz
  Requirement already satisfied (use --upgrade to upgrade): wsgiref==0.1.2 in /usr/lib64/python2.7 (from -r /opt/python/ondeck/app/requirements.txt (line 17))
  Collecting yql-finance==0.1.0 (from -r /opt/python/ondeck/app/requirements.txt (line 18))
    Downloading yql-finance-0.1.0.tar.gz
  Collecting django-extensions==1.5.6 (from -r /opt/python/ondeck/app/requirements.txt (line 19))
    Downloading django_extensions-1.5.6-py2.py3-none-any.whl (249kB)
  Collecting facebook (from -r /opt/python/ondeck/app/requirements.txt (line 20))
    Downloading Facebook-0.0.tar.gz
  Collecting nltk (from -r /opt/python/ondeck/app/requirements.txt (line 21))
    Downloading nltk-3.2.1.tar.gz (1.1MB)
  Collecting django-cors-headers (from -r /opt/python/ondeck/app/requirements.txt (line 22))
    Downloading django-cors-headers-1.1.0.tar.gz
  Collecting djangorestframework (from -r /opt/python/ondeck/app/requirements.txt (line 23))
    Downloading djangorestframework-3.3.3-py2.py3-none-any.whl (662kB)
  Collecting slugify (from -r /opt/python/ondeck/app/requirements.txt (line 24))
    Downloading slugify-0.0.1.tar.gz
  Collecting yelp (from -r /opt/python/ondeck/app/requirements.txt (line 25))
    Downloading yelp-1.0.2-py2-none-any.whl
  Requirement already satisfied (use --upgrade to upgrade): setuptools in /opt/python/run/venv/lib/python2.7/site-packages (from yql-finance==0.1.0->-r /opt/python/ondeck/app/requirements.txt (line 18))
  Collecting python-dateutil (from yql-finance==0.1.0->-r /opt/python/ondeck/app/requirements.txt (line 18))
    Downloading python_dateutil-2.5.3-py2.py3-none-any.whl (201kB)
  Collecting six>=1.2 (from django-extensions==1.5.6->-r /opt/python/ondeck/app/requirements.txt (line 19))
    Downloading six-1.10.0-py2.py3-none-any.whl
  Collecting oauth2 (from yelp->-r /opt/python/ondeck/app/requirements.txt (line 25))
    Downloading oauth2-1.9.0.post1-py2.py3-none-any.whl
  Collecting httplib2 (from yelp->-r /opt/python/ondeck/app/requirements.txt (line 25))
    Downloading httplib2-0.9.2.zip (210kB)
  Installing collected packages: Django, PyYAML, dj-database-url, static, dj-static, python-openid, requests, oauthlib, requests-oauthlib, django-allauth, django-bootstrap-form, psycopg2, gunicorn, django-toolbelt, newrelic, pystache, six, python-dateutil, yql-finance, django-extensions, facebook, nltk, django-cors-headers, djangorestframework, slugify, httplib2, oauth2, yelp
    Running setup.py install for PyYAML
    Running setup.py install for static
    Running setup.py install for dj-static
    Running setup.py install for python-openid
    Running setup.py install for oauthlib
    Running setup.py install for django-allauth
    Running setup.py install for django-bootstrap-form
    Running setup.py install for psycopg2
    Running setup.py install for gunicorn
    Running setup.py install for django-toolbelt
    Running setup.py install for newrelic
    Running setup.py install for pystache
    Running setup.py install for yql-finance
    Running setup.py install for facebook
    Running setup.py install for nltk
    Running setup.py install for django-cors-headers
    Running setup.py install for slugify
    Running setup.py install for httplib2
  Successfully installed Django-1.7.1 PyYAML-3.11 dj-database-url-0.3.0 dj-static-0.0.5 django-allauth-0.17.0 django-bootstrap-form-3.1 django-cors-headers-1.1.0 django-extensions-1.5.6 django-toolbelt-0.0.1 djangorestframework-3.3.3 facebook-0.0 gunicorn-19.0.0 httplib2-0.9.2 newrelic nltk-3.2.1 oauth2-1.9.0.post1 oauthlib-0.6.3 psycopg2-2.5.3 pystache-0.5.4 python-dateutil-2.5.3 python-openid-2.2.5 requests-2.3.0 requests-oauthlib-0.4.1 six-1.10.0 slugify-0.0.1 static-0.4 yelp-1.0.2 yql-finance-0.1.0
  You are using pip version 7.1.2, however version 8.1.1 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.
[2016-05-03T15:44:42.926Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage0/AppDeployPreHook/04configen.py] : Starting activity...
[2016-05-03T15:44:44.996Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage0/AppDeployPreHook/04configen.py] : Completed activity.
[2016-05-03T15:44:44.996Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage0/AppDeployPreHook] : Completed activity. Result:
  Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/pre.
[2016-05-03T15:44:44.996Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage0/EbExtensionPostBuild] : Starting activity...
[2016-05-03T15:44:45.469Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild] : Starting activity...
[2016-05-03T15:44:45.469Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild] : Completed activity.
[2016-05-03T15:44:45.487Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage0/EbExtensionPostBuild] : Completed activity.
[2016-05-03T15:44:45.487Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage0/InfraCleanEbextension] : Starting activity...
[2016-05-03T15:44:45.537Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage0/InfraCleanEbextension] : Completed activity. Result:
  Cleaned ebextensions subdirectories from /opt/python/ondeck/app.
[2016-05-03T15:44:45.537Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage0] : Completed activity. Result:
  Application update - Command CMD-AppDeploy stage 0 completed
[2016-05-03T15:44:45.537Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage1] : Starting activity...
[2016-05-03T15:44:45.537Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage1/AppDeployEnactHook] : Starting activity...
[2016-05-03T15:44:45.558Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage1/AppDeployEnactHook/01flip.py] : Starting activity...
[2016-05-03T15:57:56.923Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage1/AppDeployEnactHook/01flip.py] : Completed activity. Result:
  httpd: stopped
  httpd: started
  httpd                            RUNNING   pid 3628, uptime 0:00:03
  2016-05-03 15:57:56,831 WARNING  Apache is running, but root page is not responding in 5mins.
[2016-05-03T15:57:56.977Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage1/AppDeployEnactHook/02create_pids_for_monitoring.sh] : Starting activity...
[2016-05-03T15:57:57.937Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage1/AppDeployEnactHook/02create_pids_for_monitoring.sh] : Completed activity. Result:
  + chmod 0755 /var/run/httpd
  + /opt/elasticbeanstalk/bin/healthd-track-pidfile --proxy httpd
  + /opt/elasticbeanstalk/bin/healthd-track-pidfile --name application --location /opt/python/run/supervisord.pid
[2016-05-03T15:57:57.937Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage1/AppDeployEnactHook] : Completed activity. Result:
  Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/enact.
[2016-05-03T15:57:57.952Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage1/AppDeployPostHook] : Starting activity...
[2016-05-03T15:57:57.953Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage1/AppDeployPostHook] : Completed activity. Result:
  Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/post.
[2016-05-03T15:57:57.954Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AppDeployStage1] : Completed activity. Result:
  Application version switch - Command CMD-AppDeploy stage 1 completed
[2016-05-03T15:57:57.954Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AddonsAfter] : Starting activity...
[2016-05-03T15:57:57.954Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AddonsAfter/ConfigLogRotation] : Starting activity...
[2016-05-03T15:57:57.966Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AddonsAfter/ConfigLogRotation/10-config.sh] : Starting activity...
[2016-05-03T15:57:58.789Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AddonsAfter/ConfigLogRotation/10-config.sh] : Completed activity. Result:
  Disabled forced hourly log rotation.
[2016-05-03T15:57:58.789Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AddonsAfter/ConfigLogRotation] : Completed activity. Result:
  Successfully execute hooks in directory /opt/elasticbeanstalk/addons/logpublish/hooks/config.
[2016-05-03T15:57:58.789Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2/AddonsAfter] : Completed activity.
[2016-05-03T15:57:58.789Z] INFO  [3262]  - [Application update app-64dd-160503_163926@2] : Completed activity. Result:
  Application update - Command CMD-AppDeploy succeeded
[2016-05-03T16:01:16.757Z] INFO  [5116]  - [CMD-TailLogs] : Starting activity...
[2016-05-03T16:01:16.758Z] INFO  [5116]  - [CMD-TailLogs/AddonsBefore] : Starting activity...
[2016-05-03T16:01:16.758Z] INFO  [5116]  - [CMD-TailLogs/AddonsBefore] : Completed activity.
[2016-05-03T16:01:16.758Z] INFO  [5116]  - [CMD-TailLogs/TailLogs] : Starting activity...
[2016-05-03T16:01:16.758Z] INFO  [5116]  - [CMD-TailLogs/TailLogs/TailLogs] : Starting activity...



-------------------------------------
/var/log/eb-commandprocessor.log
-------------------------------------
[2016-05-03T15:36:43.725Z] DEBUG [3119]  : Checking if the received command stage is valid..
[2016-05-03T15:36:43.725Z] INFO  [3119]  : No stage_num in command. Valid stage..
[2016-05-03T15:36:43.725Z] INFO  [3119]  : Received command CMD-TailLogs: {"execution_data":"{\"aws_access_key_id\":\"ASIAIU3PLHMLTUXDRSDA\",\"signature\":\"WjIRC5afYDutyTN5VAjD5xHwmL8=\",\"security_token\":\"FQoDYXdzEEkaDPn2PJGaUqpYePe5uSLYAu4unC5lPBrp4t60gtzZiz3Y42PXZsyMOZ\\\/aVsbZy47XbEKQl89s8tF8Xk+7UrAvVAPT2PRpteadXRA1GtRFA16akUwlz0uH2H03pv8IeiLUtvGa7dEmLwYNYDToa6nCyAiDoX\\\/TgQ5\\\/ez2pttGozivs1LyDDNfqRnAKEN7OHwt7PjcBBeNFrZCGbxr8436XIqn1AuY53dzEVE4id7KaTisthm4lcEYdeMLFIZT5wc4NFXQeVMwd4NWKShsOJhauGKTW0\\\/LpL5HnzVRTbypZR+aUf+KW8PbLjcRdlwBMilorMxxyCGrXYhepruxc33EdHwGeHVLPqUY89JCjIp+KGzlJaJ7gXdgSU3lQm+eizXcPgYF3dbB0oTK72XhcB+RX3nrURZr6ryZkePX4CGQsy8M9q21PEOziGE+mv7EAggoY8xcXXX6X+2hZh3YtsOB38sGo8Jd5okQjKLLNobkF\",\"policy\":\"eyJleHBpcmF0aW9uIjoiMjAxNi0wNS0wM1QxNjowNjo0MS43NTJaIiwiY29uZGl0aW9ucyI6W1sic3RhcnRzLXdpdGgiLCIkeC1hbXotbWV0YS10aW1lX3N0YW1wIiwiIl0sWyJzdGFydHMtd2l0aCIsIiR4LWFtei1tZXRhLXB1Ymxpc2hfbWVjaGFuaXNtIiwiIl0sWyJzdGFydHMtd2l0aCIsIiRrZXkiLCJyZXNvdXJjZXNcL2Vudmlyb25tZW50c1wvbG9nc1wvIl0sWyJzdGFydHMtd2l0aCIsIiR4LWFtei1tZXRhLWJhdGNoX2lkIiwiIl0sWyJzdGFydHMtd2l0aCIsIiR4LWFtei1tZXRhLWZpbGVfbmFtZSIsIiJdLFsic3RhcnRzLXdpdGgiLCIkeC1hbXotc2VjdXJpdHktdG9rZW4iLCIiXSxbInN0YXJ0cy13aXRoIiwiJENvbnRlbnQtVHlwZSIsIiJdLFsiZXEiLCIkYnVja2V0IiwiZWxhc3RpY2JlYW5zdGFsay11cy13ZXN0LTItNDgwNzAzNDUwNTM4Il0sWyJlcSIsIiRhY2wiLCJwcml2YXRlIl1dfQ==\"}","instance_ids":["i-3f9799e7"],"data":"d545d29b-1144-11e6-9820-f562aa5e0b83","command_name":"CMD-TailLogs","api_version":"1.0","resource_name":"AWSEBAutoScalingGroup","request_id":"d545d29b-1144-11e6-9820-f562aa5e0b83","command_timeout":"600"}
[2016-05-03T15:36:43.725Z] INFO  [3119]  : Command processor should execute command.
[2016-05-03T15:36:43.725Z] DEBUG [3119]  : Storing current stage..
[2016-05-03T15:36:43.725Z] DEBUG [3119]  : Stage_num does not exist. Not saving null stage. Returning..
[2016-05-03T15:36:43.725Z] DEBUG [3119]  : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2016-05-03T15:36:43.725Z] DEBUG [3119]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2016-05-03T15:36:43.725Z] DEBUG [3119]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2016-05-03T15:36:43.726Z] INFO  [3119]  : Found enabled addons: ["logpublish"].
[2016-05-03T15:36:43.727Z] INFO  [3119]  : Updating Command definition of addon logpublish.
[2016-05-03T15:36:43.727Z] DEBUG [3119]  : Loaded definition of Command CMD-TailLogs.
[2016-05-03T15:36:43.727Z] INFO  [3119]  : Executing CMD-TailLogs
[2016-05-03T15:36:43.727Z] INFO  [3119]  : Executing command: CMD-TailLogs...
[2016-05-03T15:36:43.727Z] INFO  [3119]  : Executing command CMD-TailLogs activities...
[2016-05-03T15:36:43.727Z] DEBUG [3119]  : Setting environment variables..
[2016-05-03T15:36:43.727Z] INFO  [3119]  : Running AddonsBefore for command CMD-TailLogs...
[2016-05-03T15:36:43.727Z] DEBUG [3119]  : Running stages of Command CMD-TailLogs from stage 0 to stage 0...
[2016-05-03T15:36:43.727Z] INFO  [3119]  : Running stage 0 of command CMD-TailLogs...
[2016-05-03T15:36:43.727Z] DEBUG [3119]  : Loaded 1 actions for stage 0.
[2016-05-03T15:36:43.727Z] INFO  [3119]  : Running 1 of 1 actions: TailLogs...
[2016-05-03T15:36:43.907Z] INFO  [3119]  : Running AddonsAfter for command CMD-TailLogs...
[2016-05-03T15:36:43.907Z] INFO  [3119]  : Command CMD-TailLogs succeeded!
[2016-05-03T15:36:43.908Z] INFO  [3119]  : Command processor returning results: 
{"status":"SUCCESS","api_version":"1.0","results":[{"status":"SUCCESS","msg":"","returncode":0,"events":[{"msg":"[Instance: i-3f9799e7] Successfully finished tailing 5 log(s)","severity":"INFO","timestamp":1462289803907}]}]}
[2016-05-03T15:43:43.621Z] DEBUG [3262]  : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2016-05-03T15:43:43.621Z] DEBUG [3262]  : Checking if the command processor should execute...
[2016-05-03T15:43:43.624Z] DEBUG [3262]  : Checking whether the command is applicable to instance (i-3f9799e7)..
[2016-05-03T15:43:43.624Z] INFO  [3262]  : Command is applicable to this instance (i-3f9799e7)..
[2016-05-03T15:43:43.624Z] DEBUG [3262]  : Checking if the received command stage is valid..
[2016-05-03T15:43:43.624Z] INFO  [3262]  : No stage_num in command. Valid stage..
[2016-05-03T15:43:43.624Z] INFO  [3262]  : Received command CMD-AppDeploy: {"execution_data":"{\"leader_election\":\"true\"}","instance_ids":["i-3f9799e7"],"data":"manifest_1462290220556","command_name":"CMD-AppDeploy","api_version":"1.0","resource_name":"AWSEBAutoScalingGroup","request_id":"ca18149a-1145-11e6-917a-13aa1949f4eb","command_timeout":"600"}
[2016-05-03T15:43:43.624Z] INFO  [3262]  : Command processor should execute command.
[2016-05-03T15:43:43.624Z] DEBUG [3262]  : Storing current stage..
[2016-05-03T15:43:43.624Z] DEBUG [3262]  : Stage_num does not exist. Not saving null stage. Returning..
[2016-05-03T15:43:43.624Z] DEBUG [3262]  : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2016-05-03T15:43:43.624Z] DEBUG [3262]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2016-05-03T15:43:43.624Z] DEBUG [3262]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2016-05-03T15:43:43.625Z] INFO  [3262]  : Found enabled addons: ["logpublish"].
[2016-05-03T15:43:43.626Z] INFO  [3262]  : Updating Command definition of addon logpublish.
[2016-05-03T15:43:43.626Z] DEBUG [3262]  : Refreshing metadata...
[2016-05-03T15:43:43.875Z] DEBUG [3262]  : Refreshed environment metadata.
[2016-05-03T15:43:43.875Z] DEBUG [3262]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2016-05-03T15:43:43.876Z] DEBUG [3262]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2016-05-03T15:43:43.876Z] INFO  [3262]  : Found enabled addons: ["logpublish"].
[2016-05-03T15:43:43.877Z] INFO  [3262]  : Updating Command definition of addon logpublish.
[2016-05-03T15:43:43.877Z] DEBUG [3262]  : Retrieving metadata for key: AWS::CloudFormation::Init||Infra-WriteApplication2||files..
[2016-05-03T15:43:43.877Z] DEBUG [3262]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||ManifestFileS3Key..
[2016-05-03T15:43:43.967Z] INFO  [3262]  : Loading manifest from bucket 'elasticbeanstalk-us-west-2-480703450538' using computed S3 key 'resources/environments/e-5rmcvp96pe/_runtime/versions/manifest_1462290220556'.
[2016-05-03T15:43:44.178Z] INFO  [3262]  : Updated manifest cache: deployment ID 2 and serial 2.
[2016-05-03T15:43:44.178Z] DEBUG [3262]  : Loaded definition of Command CMD-AppDeploy.
[2016-05-03T15:43:44.179Z] INFO  [3262]  : Executing Application update
[2016-05-03T15:43:44.179Z] INFO  [3262]  : Executing command: CMD-AppDeploy...
[2016-05-03T15:43:44.179Z] INFO  [3262]  : Executing command CMD-AppDeploy activities...
[2016-05-03T15:43:44.179Z] DEBUG [3262]  : Setting environment variables..
[2016-05-03T15:43:44.179Z] INFO  [3262]  : Running AddonsBefore for command CMD-AppDeploy...
[2016-05-03T15:43:44.179Z] DEBUG [3262]  : Running stages of Command CMD-AppDeploy from stage 0 to stage 1...
[2016-05-03T15:43:44.179Z] INFO  [3262]  : Running stage 0 of command CMD-AppDeploy...
[2016-05-03T15:43:44.179Z] INFO  [3262]  : Running leader election...
[2016-05-03T15:43:44.427Z] INFO  [3262]  : Instance is Leader.
[2016-05-03T15:43:44.427Z] DEBUG [3262]  : Loaded 6 actions for stage 0.
[2016-05-03T15:43:44.427Z] INFO  [3262]  : Running 1 of 6 actions: InfraWriteConfig...
[2016-05-03T15:43:44.430Z] INFO  [3262]  : Running 2 of 6 actions: DownloadSourceBundle...
[2016-05-03T15:43:50.220Z] INFO  [3262]  : Running 3 of 6 actions: EbExtensionPreBuild...
[2016-05-03T15:43:53.769Z] INFO  [3262]  : Running 4 of 6 actions: AppDeployPreHook...
[2016-05-03T15:44:44.996Z] INFO  [3262]  : Running 5 of 6 actions: EbExtensionPostBuild...
[2016-05-03T15:44:45.487Z] INFO  [3262]  : Running 6 of 6 actions: InfraCleanEbextension...
[2016-05-03T15:44:45.537Z] INFO  [3262]  : Running stage 1 of command CMD-AppDeploy...
[2016-05-03T15:44:45.537Z] DEBUG [3262]  : Loaded 2 actions for stage 1.
[2016-05-03T15:44:45.537Z] INFO  [3262]  : Running 1 of 2 actions: AppDeployEnactHook...
[2016-05-03T15:57:57.937Z] INFO  [3262]  : Running 2 of 2 actions: AppDeployPostHook...
[2016-05-03T15:57:57.954Z] INFO  [3262]  : Running AddonsAfter for command CMD-AppDeploy...
[2016-05-03T15:57:58.789Z] INFO  [3262]  : Command CMD-AppDeploy succeeded!
[2016-05-03T15:57:58.789Z] INFO  [3262]  : Command processor returning results: 
{"status":"SUCCESS","api_version":"1.0","results":[{"status":"SUCCESS","msg":"","returncode":0,"events":[]}]}
[2016-05-03T16:01:16.717Z] DEBUG [5116]  : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2016-05-03T16:01:16.718Z] DEBUG [5116]  : Checking if the command processor should execute...
[2016-05-03T16:01:16.721Z] DEBUG [5116]  : Checking whether the command is applicable to instance (i-3f9799e7)..
[2016-05-03T16:01:16.721Z] INFO  [5116]  : Command is applicable to this instance (i-3f9799e7)..
[2016-05-03T16:01:16.721Z] DEBUG [5116]  : Checking if the received command stage is valid..
[2016-05-03T16:01:16.721Z] INFO  [5116]  : No stage_num in command. Valid stage..
[2016-05-03T16:01:16.721Z] INFO  [5116]  : Received command CMD-TailLogs: {"execution_data":"{\"aws_access_key_id\":\"ASIAIWLAGZVTPWB52MJA\",\"signature\":\"t5Z6+mbCqyJ8q5MWLyxy3ej0UNY=\",\"security_token\":\"FQoDYXdzEEkaDG0VYuGveqsxWN9CbCLYAq2jeX\\\/cCrZT8XMZrc9Sqx0tXesuSy\\\/bDpClDZ+Ewpg0HQebca1pnu3uET6n3GQVxfecs\\\/MaJwhKap++G76Vn+UF590l95n3lSKDnHaEgz7N8Tb9DhUguHguYG9+GrsrwIY6MC94m2SDPcKhmK2\\\/GXOYfIOSfOO3mfOFNOq9dEFpo5JmpE+B2WSkPqs80wA2\\\/XttTEyfZzmfBRNBfJR+xUb11hhVKbr45xw11S4bb4iLbWOGqTQkLC3lkMPE0r7sawXwneO0zVnnUfZ7Zk8A+VnNiTIfRy686Ikc3eTJpKdTwJX+sxf73o6V+zoiAWnvTQ4STRnVoo33SuK1i39u508M0tiNGZMRGXT9Vx0Px5SXnQM77lPgahMFsTCL4TL5zNpcUACnbqKyOsBeDHP+X4PS7yDS\\\/3RbzB\\\/qNkRcACcyPY46xGZl3b9jfeToXRyu839znFZ7ANnqKLLNobkF\",\"policy\":\"eyJleHBpcmF0aW9uIjoiMjAxNi0wNS0wM1QxNjozMToxNC4yODNaIiwiY29uZGl0aW9ucyI6W1sic3RhcnRzLXdpdGgiLCIkeC1hbXotbWV0YS10aW1lX3N0YW1wIiwiIl0sWyJzdGFydHMtd2l0aCIsIiR4LWFtei1tZXRhLXB1Ymxpc2hfbWVjaGFuaXNtIiwiIl0sWyJzdGFydHMtd2l0aCIsIiRrZXkiLCJyZXNvdXJjZXNcL2Vudmlyb25tZW50c1wvbG9nc1wvIl0sWyJzdGFydHMtd2l0aCIsIiR4LWFtei1tZXRhLWJhdGNoX2lkIiwiIl0sWyJzdGFydHMtd2l0aCIsIiR4LWFtei1tZXRhLWZpbGVfbmFtZSIsIiJdLFsic3RhcnRzLXdpdGgiLCIkeC1hbXotc2VjdXJpdHktdG9rZW4iLCIiXSxbInN0YXJ0cy13aXRoIiwiJENvbnRlbnQtVHlwZSIsIiJdLFsiZXEiLCIkYnVja2V0IiwiZWxhc3RpY2JlYW5zdGFsay11cy13ZXN0LTItNDgwNzAzNDUwNTM4Il0sWyJlcSIsIiRhY2wiLCJwcml2YXRlIl1dfQ==\"}","instance_ids":["i-3f9799e7"],"data":"42f811e1-1148-11e6-9820-f562aa5e0b83","command_name":"CMD-TailLogs","api_version":"1.0","resource_name":"AWSEBAutoScalingGroup","request_id":"42f811e1-1148-11e6-9820-f562aa5e0b83","command_timeout":"600"}
[2016-05-03T16:01:16.721Z] INFO  [5116]  : Command processor should execute command.
[2016-05-03T16:01:16.721Z] DEBUG [5116]  : Storing current stage..
[2016-05-03T16:01:16.721Z] DEBUG [5116]  : Stage_num does not exist. Not saving null stage. Returning..
[2016-05-03T16:01:16.721Z] DEBUG [5116]  : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2016-05-03T16:01:16.721Z] DEBUG [5116]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2016-05-03T16:01:16.723Z] DEBUG [5116]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2016-05-03T16:01:16.723Z] INFO  [5116]  : Found enabled addons: ["logpublish"].
[2016-05-03T16:01:16.756Z] INFO  [5116]  : Updating Command definition of addon logpublish.
[2016-05-03T16:01:16.757Z] DEBUG [5116]  : Loaded definition of Command CMD-TailLogs.
[2016-05-03T16:01:16.757Z] INFO  [5116]  : Executing CMD-TailLogs
[2016-05-03T16:01:16.757Z] INFO  [5116]  : Executing command: CMD-TailLogs...
[2016-05-03T16:01:16.757Z] INFO  [5116]  : Executing command CMD-TailLogs activities...
[2016-05-03T16:01:16.757Z] DEBUG [5116]  : Setting environment variables..
[2016-05-03T16:01:16.758Z] INFO  [5116]  : Running AddonsBefore for command CMD-TailLogs...
[2016-05-03T16:01:16.758Z] DEBUG [5116]  : Running stages of Command CMD-TailLogs from stage 0 to stage 0...
[2016-05-03T16:01:16.758Z] INFO  [5116]  : Running stage 0 of command CMD-TailLogs...
[2016-05-03T16:01:16.758Z] DEBUG [5116]  : Loaded 1 actions for stage 0.
[2016-05-03T16:01:16.758Z] INFO  [5116]  : Running 1 of 1 actions: TailLogs...

2 个答案:

答案 0 :(得分:0)

您的应用是否将HTTP重定向到HTTPS? 如果是,那可能会有所帮助。

https://forums.aws.amazon.com/thread.jspa?threadID=220100

答案 1 :(得分:0)

当我遇到此错误时,this帮助我找到了解决方法。

总结一下,在WSGIProcessGroup行之后添加WSGIApplicationGroup %{GLOBAL}指令。

要获得更详细的说明,请转到here