- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
在经历了很多障碍之后,我终于将我的代码上传到 AWS Beanstalk,我希望有人可以帮助我解决下一个我认为没有解决方案的障碍。
在我上传(使用'git aws.push')之后,它总是会失败。然后我查看了日志,似乎(作为菜鸟)问题是这样的:
'Target WSGI script not found or unable to stat: /opt/python/current/app/topdish'
我认为这确实是正确的,我希望它应该位于:'/opt/python/ondeck/app/topdish/wsgi.py'
我不知道如何配置它,因为我认为我已经在“.ebextensions”中的“topdish.config”中正确配置了它。
container_commands:
01_migrate:
command: "python manage.py syncdb --noinput"
leader_only: true
option_settings:
- namespace: aws:elasticbeanstalk:container:python
option_name: WSGIPath
value: topdish/wsgi.py
- option_name: DJANGO_SETTINGS_MODULE
value: topdish.settings
我在日志中看到的另一个问题是:
'[2014-11-26T23:11:00.070Z] INFO [4168] - [CMD-AppDeploy/AppDeployStage0/EbExtensionPostBuild] : Activity execution failed, because: command failed with error code 1: Error occurred during build: Command 01_migrate failed (Executor::NonZeroExitStatus)'
可能相关,也可能不相关。
相关日志:
inflating: /opt/python/ondeck/app/surveys/static/surveys/css/normalize.css
inflating: /opt/python/ondeck/app/surveys/static/surveys/css/normalize.min.css
creating: /opt/python/ondeck/app/surveys/static/surveys/img/
inflating: /opt/python/ondeck/app/surveys/static/surveys/img/star-empty.png
inflating: /opt/python/ondeck/app/surveys/static/surveys/img/star-filled.png
creating: /opt/python/ondeck/app/surveys/static/surveys/js/
inflating: /opt/python/ondeck/app/surveys/static/surveys/js/data-access-layer.js
inflating: /opt/python/ondeck/app/surveys/static/surveys/js/gklib.js
inflating: /opt/python/ondeck/app/surveys/static/surveys/js/main.js
inflating: /opt/python/ondeck/app/surveys/static/surveys/js/plugins.js
inflating: /opt/python/ondeck/app/surveys/static/surveys/js/polyfils.js
inflating: /opt/python/ondeck/app/surveys/static/surveys/js/tools.js
creating: /opt/python/ondeck/app/surveys/static/surveys/js/vendor/
inflating: /opt/python/ondeck/app/surveys/static/surveys/js/vendor/jquery-1.11.0.min.js
inflating: /opt/python/ondeck/app/surveys/static/surveys/js/vendor/modernizr-2.6.2.min.js
creating: /opt/python/ondeck/app/surveys/templates/
creating: /opt/python/ondeck/app/surveys/templates/surveys/
inflating: /opt/python/ondeck/app/surveys/templates/surveys/index.html
inflating: /opt/python/ondeck/app/surveys/templates/surveys/menu_detail.html
inflating: /opt/python/ondeck/app/surveys/templates/surveys/venue_detail.html
inflating: /opt/python/ondeck/app/surveys/tests.py
inflating: /opt/python/ondeck/app/surveys/urls.py
inflating: /opt/python/ondeck/app/surveys/views.py
creating: /opt/python/ondeck/app/templates/
creating: /opt/python/ondeck/app/templates/admin/
inflating: /opt/python/ondeck/app/templates/admin/base_site.html
creating: /opt/python/ondeck/app/topdish/
extracting: /opt/python/ondeck/app/topdish/__init__.py
inflating: /opt/python/ondeck/app/topdish/app.yaml
inflating: /opt/python/ondeck/app/topdish/settings.py
inflating: /opt/python/ondeck/app/topdish/urls.py
inflating: /opt/python/ondeck/app/topdish/wsgi.py
[2014-11-26T22:56:31.220Z] INFO [3842] - [CMD-AppDeploy/AppDeployStage0/AppDeployPreHook/03deploy.py] : Starting activity...
[2014-11-26T22:56:35.097Z] INFO [3842] - [CMD-AppDeploy/AppDeployStage0/AppDeployPreHook/03deploy.py] : Completed activity. Result:
New python executable in /opt/python/run/venv/bin/python26
Not overwriting existing python script /opt/python/run/venv/bin/python (you must use /opt/python/run/venv/bin/python26)
Installing setuptools, pip...done.
--use-mirrors has been deprecated and will be removed in the future. Explicit uses of --index-url and/or --extra-index-url is suggested.
Requirement already satisfied (use --upgrade to upgrade): Django==1.7.1 in /opt/python/run/venv/lib/python2.6/site-packages (from -r /opt/python/ondeck/app/requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): django-uuidfield==0.5.0 in /opt/python/run/venv/lib/python2.6/site-packages (from -r /opt/python/ondeck/app/requirements.txt (line 2))
Requirement already satisfied (use --upgrade to upgrade): djangorestframework==2.4.4 in /opt/python/run/venv/lib/python2.6/site-packages (from -r /opt/python/ondeck/app/requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): mysql-python==1.2.5 in /opt/python/run/venv/lib/python2.6/site-packages (from -r /opt/python/ondeck/app/requirements.txt (line 4))
Cleaning up...
[2014-11-26T22:56:35.097Z] INFO [3842] - [CMD-AppDeploy/AppDeployStage0/AppDeployPreHook/04configen.py] : Starting activity...
[2014-11-26T22:56:37.788Z] INFO [3842] - [CMD-AppDeploy/AppDeployStage0/AppDeployPreHook/04configen.py] : Completed activity.
[2014-11-26T22:56:37.788Z] INFO [3842] - [CMD-AppDeploy/AppDeployStage0/AppDeployPreHook] : Completed activity. Result:
Successfully execute directory: /opt/elasticbeanstalk/hooks/appdeploy/pre.
[2014-11-26T22:56:37.789Z] INFO [3842] - [CMD-AppDeploy/AppDeployStage0/EbExtensionPostBuild] : Starting activity...
[2014-11-26T22:56:40.111Z] INFO [3842] - [CMD-AppDeploy/AppDeployStage0/EbExtensionPostBuild] : Activity execution failed, because: command failed with error code 1: Error occurred during build: Command 01_migrate failed (Executor::NonZeroExitStatus)
at /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/executor-1.0/lib/executor/exec.rb:81:in `sh'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/executor-1.0/lib/executor/exec.rb:24:in `sh'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/cfn-wrapper.rb:51:in `call_cfn_script'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/cfn-wrapper.rb:28:in `run_config_sets'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/infrahooks/infra-embeddedpostbuild.rb:20:in `execute!'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/executable.rb:56:in `instance_eval'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/executable.rb:56:in `execute!'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/command.rb:213:in `block (3 levels) in exec_stage'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:169:in `call'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:169:in `exec'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:126:in `timeout_exec'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:110:in `block in create'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:109:in `instance_eval'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:109:in `create'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/command.rb:209:in `block (2 levels) in exec_stage'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/command.rb:207:in `each'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/command.rb:207:in `each_with_index'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/command.rb:207:in `block in exec_stage'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:169:in `call'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:169:in `exec'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:126:in `timeout_exec'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:110:in `block in create'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:109:in `instance_eval'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:109:in `create'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/command.rb:204:in `exec_stage'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/command.rb:158:in `execute!'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/command.rb:68:in `run'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/command-processor.rb:64:in `block (2 levels) in execute!'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:169:in `call'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:169:in `exec'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:126:in `timeout_exec'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:110:in `block in create'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:109:in `instance_eval'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:109:in `create'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/command-processor.rb:62:in `block in execute!'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/command-processor.rb:106:in `execute_command'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/command-processor.rb:60:in `execute!'
from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/bin/command-processor:46:in `<top (required)>'
from /opt/elasticbeanstalk/lib/ruby/bin/command-processor:23:in `load'
from /opt/elasticbeanstalk/lib/ruby/bin/command-processor:23:in `<main>'
[2014-11-26T22:56:40.112Z] INFO [3842] - [CMD-AppDeploy/AppDeployStage0/EbExtensionPostBuild] : Activity failed.
[2014-11-26T22:56:40.112Z] INFO [3842] - [CMD-AppDeploy/AppDeployStage0] : Activity failed.
[2014-11-26T22:56:40.112Z] INFO [3842] - [CMD-AppDeploy] : Completed activity. Result:
Command CMD-AppDeploy failed.
(...)
[Wed Nov 26 22:21:56.819829 2014] [:error] [pid 2320] [client 127.0.0.1:59071] Target WSGI script not found or unable to stat: /opt/python/current/app/topdish
[Wed Nov 26 22:38:28.545144 2014] [:error] [pid 2321] [client 62.45.238.167:54585] Target WSGI script not found or unable to stat: /opt/python/current/app/topdish
[Wed Nov 26 22:38:32.716143 2014] [:error] [pid 2321] [client 62.45.238.167:54585] Target WSGI script not found or unable to stat: /opt/python/current/app/topdish
[Wed Nov 26 22:38:35.218074 2014] [:error] [pid 2321] [client 62.45.238.167:54585] Target WSGI script not found or unable to stat: /opt/python/current/app/topdish
[Wed Nov 26 22:38:39.976764 2014] [:error] [pid 2321] [client 62.45.238.167:54585] Target WSGI script not found or unable to stat: /opt/python/current/app/topdish
最佳答案
我认为 'Target WSGI script not found or unable to stat:/opt/python/current/app/topdish'
错误消息是因为您的 container_commands
不成功;只有在成功完成所有 container_commands
之后,部署 Hook 才会将应用程序从 /ondeck
复制到 /current
。
作为测试,尝试在您的 01_migrate
容器命令的 leader_only: true
之后的新行中添加 ignoreErrors: true
。您的应用程序应该部署,但 syncdb 当然不会运行。
container_commands:
01_migrate:
command: "python manage.py syncdb --noinput"
leader_only: true
ignoreErrors: true
然后尝试输入 python 和 manage.py 的完整路径,没有 ignoreErrors
:
container_commands:
01_migrate:
command: "/opt/python/run/venv/bin/python /opt/python/ondeck/app/manage.py syncdb --noinput"
leader_only: true
或者可能:
container_commands:
01_migrate:
command: "/opt/python/run/venv/bin/python26 /opt/python/ondeck/app/manage.py syncdb --noinput"
leader_only: true
关于python - 无法在 Elastic Beanstalk 上部署 Django 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27160587/
我正在尝试将我的应用程序上载到Elastic Beanstalk,但是在节点预gyp安装--fallback-to-build上,npm安装失败。我尝试了各种版本的节点,但无济于事。似乎正在尝试获取一
设置 Elastic Beanstalk 的配置时,我没有获得解决方案堆栈的任何选项。 以下是有问题的行: `Select a solution stack. Available solution s
我正在尝试自定义 beanstalk 的默认 AMI,但每次我都会在一段随机时间后服务器重新启动。我什至没有改变任何东西,但没有任何效果。 我尝试过以下方法: 找到运行beanstalk的实例,创建A
我正在尝试使用sudo pip install awsebcli在新的Ubuntu 14.04(在Windows的Linux子系统上)上安装Elastic Beanstalk CLI(awsebcli
Amazon Beanstalk 是否会自动防止(分布式)拒绝服务攻击?如果没有,最方便的方法是什么? 最佳答案 我相信它会 New – AWS Shield AWS Shield is a new
每当我在 Elastic Beanstalk 中创建新环境时,我都会手动配置自定义 AMI ID、SNS 通知等,但我想自动完成,即,将设置(自定义 AMI ID、SNS、 key 对等)保存到一个配
我已使用以下方法连接到 Elastic Beanstalk: eb ssh XXXXXX --profile=xx 现在我想将一个文件复制到我的本地机器上,我该怎么做? 最佳答案 找出与 scp 一起
对于典型的 Java Web 应用程序,使用 Elastic Beanstalk 相对于手动创建 EC2 实例、设置 tomcat 服务器和部署等有哪些优势?负载平衡、监控和自动缩放是唯一的优势吗?
我有一个运行 PHP 的弹性 beanstalk 环境。在我的项目中,我有一个 .ebextensions 文件夹和一个名为“15-memorymonitor.config”的文件,其中包含以下内容;
我有 “更新”:Dockerrun.aws.json 中的“真” 当我更新 ECR 中的图像时,它应该自动更新 EC2 iontance 中的图像和容器。 但是当我在推送新图像后通过 ssh 进入实例
我有一个定义 Elastic Beanstalk 应用程序的 CloudFormation 模板。 我想扩展这个应用程序,即我希望端口 80 上的监听器重定向到 HTTPS。 AWS::Elastic
我在使用自定义 .ebextensions 文件部署 EB 实例时遇到问题。这是该文件中的相关部分: container_commands: 01_migrate: command: 'p
我已经使用带负载均衡器的 Elastic Beanstalk 创建了一个环境,并在各自的配置中分配了所有健康检查值 我也为ELB设置了应用健康检查url 但是当我检查自动缩放组配置时,健康检查类型是
我正在尝试部署我的 角申请通过GitHub Actions到 Elastic Beanstalk 。我正在使用这个 GitHub actions用于部署到 ELB。 我的问题是,部署失败,因为 ELB
我已阅读有关 Deploying Versions with Zero Downtime 的 AWS 文档,又名 CNAME 交换。 如 yegor256在 this answer 中有解释: The
我有一个弹性 beanstalk 设置,但无法访问环境中列出的 url,而如果我指向负载均衡器的 url,我可以访问它。 有什么建议吗? 最佳答案 将 LoadBalancer 安全组附加到实例。对我
我正在使用 AWS Elastic beanstalk 并希望为不同的环境配置不同的 ENV 变量。我发现的唯一方法是使用 ebextensions,但如果我将同一个数据包部署到多个环境,则无法覆盖在
我有一个应用程序,其中包含 nodejs 和 php 代码。 nodejs 用于运行应用程序所需的几个脚本。我如何使用 aws Elastic beanstalk 部署此类应用程序? 最佳答案 有两种
我今天遇到一个关于 Amazon Elastick BeanStalk 的奇怪问题:对于我的实例,我无法上传应用程序: XXX@-Vostro-2520:~/git_projects/ProjectB
我不断收到以下消息。但是在我的 nginx 日志中没有任何内容表明返回的请求状态为 5xx。此外,应用程序似乎按预期工作。我可能会得到这些的任何指示? 留言: Environment health h
我是一名优秀的程序员,十分优秀!