Yum not found Aws Logs

0

Guys, we are offline because the machine configured with Elastic Beanstalk is not working as expected. After my Pipeline attempts to upload a new version of the application, I can see my eb-engine.log shows that yum did not find awslogs. See the log:


/var/log/eb-engine.log

2023/12/26 21:37:02.359165 [INFO] Running command /bin/sh -c systemctl is-active web.service 2023/12/26 21:37:02.368595 [INFO] Running command /bin/sh -c systemctl start web.service 2023/12/26 21:37:02.422881 [INFO] Executing instruction: start X-Ray 2023/12/26 21:37:02.422898 [INFO] start X-Ray ... 2023/12/26 21:37:02.422916 [INFO] Running command /bin/sh -c systemctl show -p PartOf xray.service 2023/12/26 21:37:02.447487 [INFO] Running command /bin/sh -c systemctl daemon-reload 2023/12/26 21:37:03.053226 [INFO] Running command /bin/sh -c systemctl reset-failed 2023/12/26 21:37:03.072443 [INFO] Running command /bin/sh -c systemctl show -p PartOf xray.service 2023/12/26 21:37:03.093712 [INFO] Running command /bin/sh -c systemctl is-active xray.service 2023/12/26 21:37:03.108808 [INFO] Running command /bin/sh -c systemctl start xray.service 2023/12/26 21:37:03.183119 [INFO] Executing instruction: start proxy with new configuration 2023/12/26 21:37:03.183158 [INFO] Running command /bin/sh -c /usr/sbin/nginx -t -c /var/proxy/staging/nginx/nginx.conf 2023/12/26 21:37:03.671899 [INFO] nginx: [warn] could not build optimal types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucket_size: 64; ignoring types_hash_bucket_size nginx: the configuration file /var/proxy/staging/nginx/nginx.conf syntax is ok nginx: configuration file /var/proxy/staging/nginx/nginx.conf test is successful

2023/12/26 21:37:03.672052 [INFO] Running command /bin/sh -c cp -rp /var/proxy/staging/nginx/* /etc/nginx 2023/12/26 21:37:03.682008 [INFO] Running command /bin/sh -c systemctl show -p PartOf nginx.service 2023/12/26 21:37:03.707773 [INFO] Running command /bin/sh -c systemctl daemon-reload 2023/12/26 21:37:04.336453 [INFO] Running command /bin/sh -c systemctl reset-failed 2023/12/26 21:37:04.358095 [INFO] Running command /bin/sh -c systemctl show -p PartOf nginx.service 2023/12/26 21:37:04.372735 [INFO] Running command /bin/sh -c systemctl is-active nginx.service 2023/12/26 21:37:04.393614 [INFO] Running command /bin/sh -c systemctl start nginx.service 2023/12/26 21:37:04.594161 [INFO] Executing instruction: configureSqsd 2023/12/26 21:37:04.594181 [INFO] This is a web server environment instance, skip configure sqsd daemon ... 2023/12/26 21:37:04.594187 [INFO] Executing instruction: startSqsd 2023/12/26 21:37:04.594191 [INFO] This is a web server environment instance, skip start sqsd daemon ... 2023/12/26 21:37:04.594196 [INFO] Executing instruction: Track pids in healthd 2023/12/26 21:37:04.594201 [INFO] This is an enhanced health env... 2023/12/26 21:37:04.594215 [INFO] Running command /bin/sh -c systemctl show -p ConsistsOf aws-eb.target | cut -d= -f2 2023/12/26 21:37:04.610984 [INFO] amazon-cloudwatch-agent.service nginx.service xray.service cfn-hup.service healthd.service

2023/12/26 21:37:04.611018 [INFO] Running command /bin/sh -c systemctl show -p ConsistsOf eb-app.target | cut -d= -f2 2023/12/26 21:37:04.633464 [INFO] web.service

2023/12/26 21:37:04.633805 [INFO] Executing instruction: RunAppDeployPostDeployHooks 2023/12/26 21:37:04.633855 [INFO] Executing platform hooks in .platform/hooks/postdeploy/ 2023/12/26 21:37:04.633872 [INFO] The dir .platform/hooks/postdeploy/ does not exist 2023/12/26 21:37:04.633878 [INFO] Finished running scripts in /var/app/current/.platform/hooks/postdeploy 2023/12/26 21:37:04.633885 [INFO] Executing cleanup logic 2023/12/26 21:37:04.634041 [INFO] CommandService Response: {"status":"SUCCESS","api_version":"1.0","results":[{"status":"SUCCESS","msg":"Engine execution has succeeded.","returncode":0,"events":[{"msg":"Instance deployment completed successfully.","timestamp":1703626624633,"severity":"INFO"}]}]}

2023/12/26 21:37:04.634307 [INFO] Platform Engine finished execution on command: app-deploy

2023/12/26 21:38:48.722449 [INFO] Starting... 2023/12/26 21:38:48.722495 [INFO] Starting EBPlatform-PlatformEngine 2023/12/26 21:38:48.722520 [INFO] reading event message file 2023/12/26 21:38:48.722695 [INFO] Engine received EB command cfn-hup-exec

2023/12/26 21:38:48.831528 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-east-1:912396340658:stack/awseb-e-fem4sitepg-stack/5db0ef50-a436-11ee-87c6-12818ea7b59f -r AWSEBAutoScalingGroup --region us-east-1 2023/12/26 21:38:49.200676 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-east-1:912396340658:stack/awseb-e-fem4sitepg-stack/5db0ef50-a436-11ee-87c6-12818ea7b59f -r AWSEBBeanstalkMetadata --region us-east-1 2023/12/26 21:38:49.555762 [INFO] checking whether command app-deploy is applicable to this instance... 2023/12/26 21:38:49.555778 [INFO] this command is applicable to the instance, thus instance should execute command 2023/12/26 21:38:49.555782 [INFO] Engine command: (app-deploy)

2023/12/26 21:38:49.555789 [INFO] Downloading EB Application... 2023/12/26 21:38:49.555793 [INFO] Region: us-east-1 2023/12/26 21:38:49.555796 [INFO] envID: e-fem4sitepg 2023/12/26 21:38:49.555804 [INFO] envBucket: elasticbeanstalk-us-east-1-912396340658 2023/12/26 21:38:49.555808 [INFO] Using manifest file name from command request 2023/12/26 21:38:49.555816 [INFO] Manifest name is : manifest_1703626706398 2023/12/26 21:38:49.555820 [INFO] Download app version manifest 2023/12/26 21:38:49.555967 [INFO] Downloading: bucket: elasticbeanstalk-us-east-1-912396340658, object: /resources/environments/e-fem4sitepg/_runtime/versions/manifest_1703626706398 2023/12/26 21:38:49.598742 [INFO] Download successful162bytes downloaded 2023/12/26 21:38:49.598927 [INFO] Trying to read and parse version manifest... 2023/12/26 21:38:49.599037 [INFO] Downloading: bucket: elasticbeanstalk-us-east-1-912396340658, object: /resources/environments/e-fem4sitepg/_runtime/_versions/loans-api-prod/code-pipeline-1703626699266-BuildArtifact-5ab728b5-5a91-4438-bb02-14da04ebfbe8 2023/12/26 21:38:49.630371 [INFO] Download successful740090bytes downloaded 2023/12/26 21:38:49.630657 [INFO] Executing instruction: ElectLeader 2023/12/26 21:38:49.630664 [INFO] Running leader election for instance i-08397b0aa188ae153... 2023/12/26 21:38:49.630668 [INFO] Calling the cfn-elect-cmd-leader to elect the command leader. 2023/12/26 21:38:49.630682 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-elect-cmd-leader --stack arn:aws:cloudformation:us-east-1:912396340658:stack/awseb-e-fem4sitepg-stack/5db0ef50-a436-11ee-87c6-12818ea7b59f --command-name ElasticBeanstalkCommand-AWSEBAutoScalingGroup --invocation-id 2c2bb83c-e529-4a4b-aa5d-5ba027df451a --listener-id i-08397b0aa188ae153 --region us-east-1 2023/12/26 21:38:49.982840 [INFO] Instance is Leader. 2023/12/26 21:38:49.982881 [INFO] Executing instruction: stopSqsd 2023/12/26 21:38:49.982911 [INFO] This is a web server environment instance, skip stop sqsd daemon ... 2023/12/26 21:38:49.982916 [INFO] Executing instruction: PreBuildEbExtension 2023/12/26 21:38:49.982921 [INFO] Starting executing the config set Infra-EmbeddedPreBuild. 2023/12/26 21:38:49.982940 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-init -s arn:aws:cloudformation:us-east-1:912396340658:stack/awseb-e-fem4sitepg-stack/5db0ef50-a436-11ee-87c6-12818ea7b59f -r AWSEBAutoScalingGroup --region us-east-1 --configsets Infra-EmbeddedPreBuild 2023/12/26 21:39:02.306135 [INFO] Error occurred during build: Yum does not have awslogs available for installation

2023/12/26 21:39:02.306211 [ERROR] An error occurred during execution of command [app-deploy] - [PreBuildEbExtension]. Stop running the command. Error: EbExtension build failed. Please refer to /var/log/cfn-init.log for more details.

2023/12/26 21:39:02.306217 [INFO] Executing cleanup logic 2023/12/26 21:39:02.306330 [INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"Engine execution has encountered an error.","returncode":1,"events":[{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.","timestamp":1703626742306,"severity":"ERROR"}]}]}

2023/12/26 21:39:02.306635 [INFO] Platform Engine finished execution on command: app-deploy

2023/12/26 21:40:21.725669 [INFO] Starting... 2023/12/26 21:40:21.725715 [INFO] Starting EBPlatform-PlatformEngine 2023/12/26 21:40:21.725741 [INFO] reading event message file 2023/12/26 21:40:21.725916 [INFO] Engine received EB command cfn-hup-exec

2023/12/26 21:40:21.818340 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-east-1:912396340658:stack/awseb-e-fem4sitepg-stack/5db0ef50-a436-11ee-87c6-12818ea7b59f -r AWSEBAutoScalingGroup --region us-east-1 2023/12/26 21:40:22.185178 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-east-1:912396340658:stack/awseb-e-fem4sitepg-stack/5db0ef50-a436-11ee-87c6-12818ea7b59f -r AWSEBBeanstalkMetadata --region us-east-1 2023/12/26 21:40:22.558278 [INFO] checking whether command tail-log is applicable to this instance... 2023/12/26 21:40:22.558294 [INFO] this command is applicable to the instance, thus instance should execute command 2023/12/26 21:40:22.558298 [INFO] Engine command: (tail-log)

2023/12/26 21:40:22.558358 [INFO] Executing instruction: GetTailLogs 2023/12/26 21:40:22.558363 [INFO] Tail Logs... 2023/12/26 21:40:22.558974 [INFO] Running command /bin/sh -c tail -n 100 /var/log/eb-engine.log

Paulo
asked 4 months ago399 views
1 Answer
0

Hello.

What OS are you using with ElasticBeanstalk?
If you are using Amazon Linux 2023, awslogs is not included, so I expect that you will get an error.
https://docs.aws.amazon.com/linux/al2023/release-notes/all-packages-AL2023.3.html

profile picture
EXPERT
answered 4 months ago
profile pictureAWS
EXPERT
reviewed 4 months ago
  • I'm using the default image that Elastic Beanstalk created. It seems that I can't choose another one.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions