amazon-web-services – 将环境变量添加到NodeJS Elastic Beanstalk的错误
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了amazon-web-services – 将环境变量添加到NodeJS Elastic Beanstalk的错误,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2066字,纯文字阅读大概需要3分钟。
内容图文
我的配置一直持续到昨天.我添加了nginx NodeJS https redirect extension from AWS.现在,当我尝试通过Elastic Beanstalk配置添加新的环境变量时,我收到此错误:
[Instance: i-0364b59cca36774a0] Command failed on instance. Return code: 137 Output: + rm -f /etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf + service nginx stop Stopping nginx: /sbin/service: line 66: 27395 Killed env -i PATH="$PATH" TERM="$TERM" "${SERVICEDIR}/${SERVICE}" ${OPTIONS}. Hook /opt/elasticbeanstalk/hooks/configdeploy/post/99_kill_default_nginx.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
当我查看eb-activity.log时,我看到了这个错误:
[2018-02-18T17:24:58.762Z] INFO [13848] - [Configuration update 1.0.61@112/ConfigDeployStage1/ConfigDeployPostHook/99_kill_default_nginx.sh] : Starting activity...
[2018-02-18T17:24:58.939Z] INFO [13848] - [Configuration update 1.0.61@112/ConfigDeployStage1/ConfigDeployPostHook/99_kill_default_nginx.sh] : Activity execution failed, because: + rm -f /etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf
+ service nginx stop
Stopping nginx: /sbin/service: line 66: 14258 Killed env -i PATH="$PATH" TERM="$TERM" "${SERVICEDIR}/${SERVICE}" ${OPTIONS} (ElasticBeanstalk::ExternalInvocationError)
caused by: + rm -f /etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf
+ service nginx stop
Stopping nginx: /sbin/service: line 66: 14258 Killed env -i PATH="$PATH" TERM="$TERM" "${SERVICEDIR}/${SERVICE}" ${OPTIONS} (Executor::NonZeroExitStatus)
我究竟做错了什么?最近发生了什么变化,因为几个月前我改变了一个环境变量就行了.
解决方法:
我也有这个问题,亚马逊承认文档中的错误.这是一个可以在.ebextensions配置文件中使用的重启脚本.
/opt/elasticbeanstalk/hooks/configdeploy/post/99_kill_default_nginx.sh:
mode: "000755"
owner: root
group: root
content: |
#!/bin/bash -xe
rm -f /etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf
status=`/sbin/status nginx`
if [[ $status = *"start/running"* ]]; then
echo "stopping nginx..."
stop nginx
echo "starting nginx..."
start nginx
else
echo "nginx is not running... starting it..."
start nginx
fi
内容总结
以上是互联网集市为您收集整理的amazon-web-services – 将环境变量添加到NodeJS Elastic Beanstalk的错误全部内容,希望文章能够帮你解决amazon-web-services – 将环境变量添加到NodeJS Elastic Beanstalk的错误所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。