Comments (4)
I was working on the same issue today. Apparently, the issue is recent ruby modules are requiring ruby >= 2.3 Even though the modules in the template are pinned at certain versions, it seems some rub modules may be allowed to link to the latest for their dependencies. For my version of the Jenkins CF template the issue was specifically with aws-eventstream v1.2.0 requiring ruby >= 2.3
Some of my notes are below. I'll give your solution a try with my template, thanks for figuring it out!
/var/log/cloud-init-output.log
Cloud-init v. 19.3-3.amzn2 running 'modules:final' at Fri, 03 Sep 2021 22:12:51 +0000. Up 32.12 seconds.
+ /opt/aws/bin/cfn-init -v --stack Jenkins --resource AgentLC --region us-east-2
Error occurred during build: Failed to install gem: aws-sdk-ec2-1.62.0 (return code 1)
+ /opt/aws/bin/cfn-signal -e 1 --stack Jenkins --resource AgentASG --region us-east-2
ValidationError: Stack arn:aws:cloudformation:us-east-2:XXX:stack/Jenkins/7daca480-efca-11ea-yyy-0aa874bc8df2 is in UPDATE_COMPLETE state and cannot be signaled
/var/log/cfn-init.log
021-09-03 21:55:59,220 [ERROR] Gem failed. Output: ERROR: Error installing aws-sdk-ec2:
aws-eventstream requires Ruby version >= 2.3.
021-09-03 21:55:59,220 [ERROR] Error encountered during build of setup: Failed to install gem: aws-sdk-ec2-1.62.0 (return code 1)
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 542, in run_config
CloudFormationCarpenter(config, self._auth_config).build(worklog)
File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 229, in build
Hangupanges['packages'][manager] = CloudFormationCarpenter._packageTools[manager]().apply(packages, self._auth_config)
sh-4.2$ ls -lapython2.7/site-packages/cfnbootstrap/lang_package_tools.py", line 111, in apply
if self._install_gem(pkg, ver):
File "/usr/lib/python2.7/site-packages/cfnbootstrap/lang_package_tools.py", line 155, in _install_gem
raise ToolError("Failed to install gem: %s-%s" % (pkg, ver), result.returncode)
ToolError: Failed to install gem: aws-sdk-ec2-1.62.0 (return code 1)
2021-09-03 21:55:59,222 [ERROR] -----------------------BUILD FAILED!------------------------
2021-09-03 21:55:59,222 [ERROR] Unhandled exception during build: Failed to install gem: aws-sdk-ec2-1.62.0 (return code 1)
Traceback (most recent call last):
File "/opt/aws/bin/cfn-init", line 171, in <module>
worklog.build(metadata, configSets)
File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 129, in build
Contractor(metadata).build(configSets, self)
File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 530, in build
self.run_config(config, worklog)
File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 542, in run_config
CloudFormationCarpenter(config, self._auth_config).build(worklog)
File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 229, in build
changes['packages'][manager] = CloudFormationCarpenter._packageTools[manager]().apply(packages, self._auth_config)
File "/usr/lib/python2.7/site-packages/cfnbootstrap/lang_package_tools.py", line 111, in apply
if self._install_gem(pkg, ver):
File "/usr/lib/python2.7/site-packages/cfnbootstrap/lang_package_tools.py", line 155, in _install_gem
raise ToolError("Failed to install gem: %s-%s" % (pkg, ver), result.returncode)
ToolError: Failed to install gem: aws-sdk-ec2-1.62.0 (return code 1)
Agents must use Ruby 2.0
root@ip-10-0-37-179 bin]# yum list available ruby
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Available Packages
ruby.x86_64
AWS Eventstream adds:
> spec.required_ruby_version = '>= 2.3'
see here:
https://github.com/aws/aws-sdk-ruby/blob/a6736ea94dc708bfea6a7099dd11d40931a527a1/gems/aws-eventstream/aws-eventstream.gemspec#L18
from aws-cf-templates.
aws/aws-sdk-ruby#2573 (comment)
from aws-cf-templates.
the fix proposed by @Elrendio worked for me
from aws-cf-templates.
Looks like they aren't ever reverting this. Wouldn't it be more future-proof to have this fixed in a more long-term manner, that is, unpinning stuff and installing a newer version of Ruby as initially proposed ?
from aws-cf-templates.
Related Issues (20)
- ECS AutoScalingGroup - CREATE_FAILED HOT 1
- Jenkins plugin dependencies not installed HOT 5
- Jenkins2-ha deployment failing: Unable to satisfy 100% MinSuccessfulInstancesPercent requirement HOT 4
- Monitoring ElastiCache redis is broken
- ElastiCache-Redis cannot UPDATE Template to use more than 1 Shard (clustermode:off -> on) HOT 2
- Updating Jenkins template HOT 2
- Static Website - Use new CloudFront Functions for URL redirects instead of Lambda@Edge HOT 1
- jenkins agents fail to start due to missing nodejs requirement HOT 3
- CloudTrail LogsStream Details HOT 3
- ECS Cluster - AutoScaling errors HOT 1
- Incorrect test and typo in test for `h_download_jenkins_plugin_manager` step HOT 1
- How to use Fargate Spot instances? HOT 2
- Add link to documentation for private ECR access from private subnet with no NAT gateway HOT 1
- jenkins2-ha-agents does not scale down if there is at least one job running HOT 1
- Documentation on UserData field EC2 template HOT 7
- Jenkins template broke because mirror is down HOT 2
- Support Graviton instance types HOT 1
- upgrade from Amazon Linux 2 to Amazon Linux 2023 HOT 2
- Aw
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-cf-templates.