Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECS Cluster - AutoScaling errors #605

Closed
ghost opened this issue Dec 17, 2021 · 1 comment
Closed

ECS Cluster - AutoScaling errors #605

ghost opened this issue Dec 17, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 17, 2021

TemplateID: (ecs/cluster)
Region: (eu-central-1)

CloudFormation reports errors when creating an AutoScaling group, so it's currently not possible to create a ECS cluster with the latest version of the template.

[ERROR] Could not start service amazon-ssm-agent; return code was 1
[DEBUG] Service output: Redirecting to /bin/systemctl start amazon-ssm-agent.service
Job for amazon-ssm-agent.service canceled.
[ERROR] Error encountered during build of install: Could not start amazon-ssm-agent
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 573, in run_config
    CloudFormationCarpenter(config, self._auth_config).build(worklog)
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 284, in build
    services, changes)
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/service_tools.py", line 169, in apply
    self._start_service(service)
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/service_tools.py", line 200, in _start_service
    raise ToolError("Could not start %s" % service)
cfnbootstrap.construction_errors.ToolError: Could not start amazon-ssm-agent
[ERROR] -----------------------BUILD FAILED!------------------------
[ERROR] Unhandled exception during build: Could not start amazon-ssm-agent
Traceback (most recent call last):
  File "/opt/aws/bin/cfn-init", line 176, in <module>
    worklog.build(metadata, configSets)
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 135, in build
    Contractor(metadata).build(configSets, self)
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 561, in build
    self.run_config(config, worklog)
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 573, in run_config
    CloudFormationCarpenter(config, self._auth_config).build(worklog)
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 284, in build
    services, changes)
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/service_tools.py", line 169, in apply
    self._start_service(service)
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/service_tools.py", line 200, in _start_service
    raise ToolError("Could not start %s" % service)
cfnbootstrap.construction_errors.ToolError: Could not start amazon-ssm-agent
cloud-init[3611]: util.py[DEBUG]: Running command ['/var/lib/cloud/instance/scripts/part-001'] with allowed return codes [0] (shell=True, capture=False)
cloud-init[3611]: util.py[WARNING]: Failed running /var/lib/cloud/instance/scripts/part-001 [1]
cloud-init[3611]: util.py[DEBUG]: Failed running /var/lib/cloud/instance/scripts/part-001 [1]
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cloudinit/util.py", line 913, in runparts
    subp(prefix + [exe_path], capture=False, shell=True)
  File "/usr/lib/python2.7/site-packages/cloudinit/util.py", line 2108, in subp
    cmd=args)
ProcessExecutionError: Unexpected error while running command.
Command: ['/var/lib/cloud/instance/scripts/part-001']
Exit code: 1
Reason: -
Stdout: -
Stderr: -
cloud-init[3611]: cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
cloud-init[3611]: handlers.py[DEBUG]: finish: modules-final/config-scripts-user: FAIL: running config-scripts-user with frequency once-per-instance
cloud-init[3611]: util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python2.7/site-packages/cloudinit/config/cc_scripts_user.pyc'>) failed
cloud-init[3611]: util.py[DEBUG]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python2.7/site-packages/cloudinit/config/cc_scripts_user.pyc'>) failed
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cloudinit/stages.py", line 851, in _run_modules
    freq=freq)
  File "/usr/lib/python2.7/site-packages/cloudinit/cloud.py", line 54, in run
    return self._runners.run(name, functor, args, freq, clear_on_fail)
  File "/usr/lib/python2.7/site-packages/cloudinit/helpers.py", line 187, in run
    results = functor(*args)
  File "/usr/lib/python2.7/site-packages/cloudinit/config/cc_scripts_user.py", line 45, in handle
    util.runparts(runparts_path)
  File "/usr/lib/python2.7/site-packages/cloudinit/util.py", line 920, in runparts
    % (len(failed), len(attempted)))
RuntimeError: Runparts: 1 failures in 1 attempted commands
@michaelwittig
Copy link
Contributor

hi @el-quijote
Could you share the parameters of your ecs/cluster and vpc strack?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant