Elastic Beanstalk 部署 - 验证环境服务角色的权限

时间:2021-06-03 18:27:20

标签: laravel amazon-web-services amazon-ec2 amazon-elastic-beanstalk amazon-iam

我使用 laravel 8 应用程序并尝试使用弹性 beantalk 部署它。有一天,在没有任何警告的情况下,我收到了以下错误,我似乎根本无法弄清楚。它甚至阻碍了 AWS 支持。我已经尝试了几乎所有的方法,并且我不断看到建议以确保安全部分的权限有效。

Config Settings

这些是我看到的设置,我不断在两者之间切换并添加/删除权限以尝试使其与零运气中的任何一个一起使用。我也试过克隆和重建都没有用。

目前我对服务角色有以下权限: Service Role Permissions

EC2 角色的以下内容: enter image description here

Elastic Beanstalk 上的错误: 无法检查健康状况。验证环境服务角色的权限,稍后再试。权限更改最多需要两个小时才能传播。

此处也包含日志文本:

----------------------------------------
/var/log/eb-engine.log
----------------------------------------
2021/06/03 14:08:39.967837 [INFO] Running command /bin/sh -c systemctl daemon-reload
2021/06/03 14:08:40.048241 [INFO] Running command /bin/sh -c systemctl reset-failed
2021/06/03 14:08:40.052686 [INFO] Running command /bin/sh -c systemctl is-enabled aws-eb.target
2021/06/03 14:08:40.056696 [INFO] Running command /bin/sh -c systemctl enable aws-eb.target
2021/06/03 14:08:40.136288 [INFO] Running command /bin/sh -c systemctl start aws-eb.target
2021/06/03 14:08:40.141001 [INFO] Running command /bin/sh -c systemctl enable healthd.service
2021/06/03 14:08:40.220221 [INFO] Running command /bin/sh -c systemctl show -p PartOf healthd.service
2021/06/03 14:08:40.225894 [INFO] Running command /bin/sh -c systemctl is-active healthd.service
2021/06/03 14:08:40.229958 [INFO] Running command /bin/sh -c systemctl start healthd.service
2021/06/03 14:08:40.251790 [INFO] Copying file /opt/elasticbeanstalk/config/private/healthd/healthd_logformat.conf to /var/proxy/staging/nginx/conf.d/healthd_logformat.conf
2021/06/03 14:08:40.253224 [INFO] Copying file /opt/elasticbeanstalk/config/private/healthd/healthd_nginx.conf to /var/proxy/staging/nginx/conf.d/elasticbeanstalk/healthd.conf
2021/06/03 14:08:40.255003 [INFO] Executing instruction: configure php-fpm
2021/06/03 14:08:40.260685 [INFO] Executing instruction: configure log streaming
2021/06/03 14:08:40.260695 [INFO] log streaming is not enabled
2021/06/03 14:08:40.260699 [INFO] disable log stream
2021/06/03 14:08:40.260712 [INFO] Running command /bin/sh -c systemctl show -p PartOf amazon-cloudwatch-agent.service
2021/06/03 14:08:40.270003 [INFO] Running command /bin/sh -c systemctl stop amazon-cloudwatch-agent.service
2021/06/03 14:08:40.275398 [INFO] Executing instruction: GetToggleForceRotate
2021/06/03 14:08:40.275422 [INFO] Checking if logs need forced rotation
2021/06/03 14:08:40.275441 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-east-1:539550674720:stack/awseb-e-nssafrgize-stack/a1fd7df0-9330-11eb-8d1c-0edd3867f3f1 -r AWSEBAutoScalingGroup --region us-east-1
2021/06/03 14:08:40.895708 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-east-1:539550674720:stack/awseb-e-nssafrgize-stack/a1fd7df0-9330-11eb-8d1c-0edd3867f3f1 -r AWSEBBeanstalkMetadata --region us-east-1
2021/06/03 14:08:41.486133 [INFO] Procfile not found. Generating default rsyslog config
2021/06/03 14:08:41.487637 [INFO] Running command /bin/sh -c systemctl restart rsyslog.service
2021/06/03 14:08:41.511223 [INFO] Executing instruction: PostBuildEbExtension
2021/06/03 14:08:41.511252 [INFO] Starting executing the config set Infra-EmbeddedPostBuild.
2021/06/03 14:08:41.511266 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-init -s arn:aws:cloudformation:us-east-1:539550674720:stack/awseb-e-nssafrgize-stack/a1fd7df0-9330-11eb-8d1c-0edd3867f3f1 -r AWSEBAutoScalingGroup --region us-east-1 --configsets Infra-EmbeddedPostBuild
2021/06/03 14:08:41.894764 [INFO] Finished executing the config set Infra-EmbeddedPostBuild.

2021/06/03 14:08:41.894795 [INFO] Executing instruction: CleanEbExtensions
2021/06/03 14:08:41.894818 [INFO] Cleaned ebextensions subdirectories from app staging directory.
2021/06/03 14:08:41.894836 [INFO] Executing instruction: RunAppDeployPreDeployHooks
2021/06/03 14:08:41.894846 [INFO] The dir .platform/hooks/predeploy/ does not exist in the application. Skipping this step...
2021/06/03 14:08:41.894851 [INFO] Executing instruction: stop X-Ray
2021/06/03 14:08:41.894855 [INFO] stop X-Ray ...
2021/06/03 14:08:41.894868 [INFO] Running command /bin/sh -c systemctl show -p PartOf xray.service
2021/06/03 14:08:41.902075 [WARN] stopProcess Warning: process xray is not registered 
2021/06/03 14:08:41.902095 [INFO] Running command /bin/sh -c systemctl stop xray.service
2021/06/03 14:08:41.909722 [INFO] Executing instruction: stop proxy
2021/06/03 14:08:41.909742 [INFO] Running command /bin/sh -c systemctl show -p PartOf httpd.service
2021/06/03 14:08:41.917202 [WARN] deregisterProcess Warning: process httpd is not registered, skipping...

2021/06/03 14:08:41.917224 [INFO] Running command /bin/sh -c systemctl show -p PartOf nginx.service
2021/06/03 14:08:41.923452 [WARN] deregisterProcess Warning: process nginx is not registered, skipping...

2021/06/03 14:08:41.923466 [INFO] Executing instruction: stop php-fpm
2021/06/03 14:08:41.923477 [INFO] Running command /bin/sh -c systemctl show -p PartOf php-fpm.service
2021/06/03 14:08:41.928491 [WARN] stopProcess Warning: process php-fpm is not registered 
2021/06/03 14:08:41.928520 [INFO] Running command /bin/sh -c systemctl stop php-fpm.service
2021/06/03 14:08:41.933414 [INFO] Executing instruction: FlipApplication
2021/06/03 14:08:41.933806 [INFO] create soft link from /var/app/current/ to /var/www/html
2021/06/03 14:08:41.933835 [INFO] Executing instruction: start X-Ray
2021/06/03 14:08:41.933841 [INFO] X-Ray is not enabled.
2021/06/03 14:08:41.933846 [INFO] Executing instruction: start php-fpm
2021/06/03 14:08:41.933987 [INFO] Running command /bin/sh -c systemctl show -p PartOf php-fpm.service
2021/06/03 14:08:41.942554 [INFO] Running command /bin/sh -c systemctl daemon-reload
2021/06/03 14:08:42.028789 [INFO] Running command /bin/sh -c systemctl reset-failed
2021/06/03 14:08:42.033188 [INFO] Running command /bin/sh -c systemctl show -p PartOf php-fpm.service
2021/06/03 14:08:42.038374 [INFO] Running command /bin/sh -c systemctl is-active php-fpm.service
2021/06/03 14:08:42.041918 [INFO] Running command /bin/sh -c systemctl start php-fpm.service
2021/06/03 14:08:42.172017 [INFO] Executing instruction: start proxy with new configuration
2021/06/03 14:08:42.172049 [INFO] Running command /bin/sh -c /usr/sbin/nginx -t -c /var/proxy/staging/nginx/nginx.conf
2021/06/03 14:08:42.198193 [INFO] Running command /bin/sh -c cp -rp /var/proxy/staging/nginx/* /etc/nginx
2021/06/03 14:08:42.200700 [INFO] Running command /bin/sh -c systemctl show -p PartOf nginx.service
2021/06/03 14:08:42.207540 [INFO] Running command /bin/sh -c systemctl daemon-reload
2021/06/03 14:08:42.283504 [INFO] Running command /bin/sh -c systemctl reset-failed
2021/06/03 14:08:42.287860 [INFO] Running command /bin/sh -c systemctl show -p PartOf nginx.service
2021/06/03 14:08:42.293123 [INFO] Running command /bin/sh -c systemctl is-active nginx.service
2021/06/03 14:08:42.296696 [INFO] Running command /bin/sh -c systemctl start nginx.service
2021/06/03 14:08:42.335235 [INFO] Executing instruction: configureSqsd
2021/06/03 14:08:42.335251 [INFO] This is a web server environment instance, skip configure sqsd daemon ...
2021/06/03 14:08:42.335256 [INFO] Executing instruction: startSqsd
2021/06/03 14:08:42.335260 [INFO] This is a web server environment instance, skip start sqsd daemon ...
2021/06/03 14:08:42.335264 [INFO] Executing instruction: Track pids in healthd
2021/06/03 14:08:42.335269 [INFO] This is an enhanced health env...
2021/06/03 14:08:42.335282 [INFO] Running command /bin/sh -c systemctl show -p ConsistsOf aws-eb.target | cut -d= -f2
2021/06/03 14:08:42.342372 [INFO] cfn-hup.service php-fpm.service healthd.service nginx.service

2021/06/03 14:08:42.342398 [INFO] Running command /bin/sh -c systemctl show -p ConsistsOf eb-app.target | cut -d= -f2
2021/06/03 14:08:42.347355 [INFO] 

2021/06/03 14:08:42.347479 [INFO] Executing instruction: RunAppDeployPostDeployHooks
2021/06/03 14:08:42.347492 [INFO] The dir .platform/hooks/postdeploy/ does not exist in the application. Skipping this step...
2021/06/03 14:08:42.347496 [INFO] Executing cleanup logic
2021/06/03 14:08:42.347636 [INFO] Platform Engine finished execution on command: self-startup

2021/06/03 18:20:32.502185 [INFO] Starting...
2021/06/03 18:20:32.502245 [INFO] Starting EBPlatform-PlatformEngine
2021/06/03 18:20:32.502262 [INFO] reading event message file
2021/06/03 18:20:32.502366 [INFO] no eb envtier info file found, skip loading env tier info.
2021/06/03 18:20:32.502438 [INFO] Engine received EB command cfn-hup-exec

2021/06/03 18:20:32.709872 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-east-1:539550674720:stack/awseb-e-nssafrgize-stack/a1fd7df0-9330-11eb-8d1c-0edd3867f3f1 -r AWSEBAutoScalingGroup --region us-east-1
2021/06/03 18:20:33.065405 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-east-1:539550674720:stack/awseb-e-nssafrgize-stack/a1fd7df0-9330-11eb-8d1c-0edd3867f3f1 -r AWSEBBeanstalkMetadata --region us-east-1
2021/06/03 18:20:33.410133 [INFO] checking whether command tail-log is applicable to this instance...
2021/06/03 18:20:33.410147 [INFO] this command is applicable to the instance, thus instance should execute command
2021/06/03 18:20:33.410151 [INFO] Engine command: (tail-log)

2021/06/03 18:20:33.411133 [INFO] Executing instruction: GetTailLogs
2021/06/03 18:20:33.411140 [INFO] Tail Logs...
2021/06/03 18:20:33.412111 [INFO] Running command /bin/sh -c tail -n 100 /var/log/eb-engine.log

0 个答案:

没有答案