在更新实例时,我使用EB命令行工具。我将实例推到我的CodeCommit git,然后使用eb deploy命令部署我的代码。几乎每次我这样做时,我的环境状态都会随着运行错误Following services are not running: proxy.的实例而改变为降级/严重--它将根据我的自动缩放策略(与健康相关联)旋转更多的实例,有时在2-3个新实例之后,我会得到一个"OK“的实例。
我的环境配置为64bit Amazon Linux 2016.09 v2.2.0 running PHP 7.0。它是自动负载平衡和自动缩放的平均网卡。它在任何可用区域运行t1.microl,软件配置如下:日志发布: On;允许URL fopen: On;显示错误: Off;文档根: /http/;最大执行时间: 60;内存限制:256 m;Zlib输出压缩: Off;
是什么导致的?
发布于 2016-12-11 11:17:19
入住您的/opt/elasticbeanstalk/hooks/appdeploy/post/01_monitor_httpd_pid.sh。请注意,01_monitor_httpd_pid.sh可能有不同的名称。
在这里,如果没有将apache/httpd转换为nginx,则需要更改代理检查,如下所示:
#!/bin/bash
set -xe
/opt/elasticbeanstalk/bin/healthd-track-pidfile --proxy nginx如果您正在使用apache/httpd,这意味着您的apache运行时实例或进程有问题。确保pid文件应该在哪里进行健康检查。
发布于 2019-01-25 03:59:09
我们可以将.ebextensions目录中的文件设置为以下所示。当您看到错误Following services are not running: proxy.时
.eb扩展名/01_fix_proxy.config内容:
"/opt/elasticbeanstalk/hooks/appdeploy/post/01_monitor_httpd_pid.sh":
mode: "000755"
owner: root
group: root
content: |
#!/bin/bash
set -xe
/opt/elasticbeanstalk/bin/healthd-track-pidfile --proxy nginxhttps://serverfault.com/questions/817578
复制相似问题