Amazon-ecs-agent: Unexpected log line when starting the ECS agent

Created on 21 Dec 2018  路  6Comments  路  Source: aws/amazon-ecs-agent

Summary

Unexpected log line when starting the ECS agent:

2018-12-21T22:16:14Z [INFO] Unable to parse user data: invalid character '#' looking for beginning of value

Description

Launched an ECS instance and specified some (bash) user-data.

Expected Behavior

No log lines related to attempting to parse user-data

Observed Behavior

Log line related to failing to parse user-data

Environment Details

$ docker info
Containers: 1
 Running: 1
 Paused: 0
 Stopped: 0
Images: 2
Server Version: 18.06.1-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.14.77-86.82.amzn2.x86_64
Operating System: Amazon Linux 2
OSType: linux
Architecture: x86_64
CPUs: 96
Total Memory: 747.8GiB
Name: ip-172-31-11-224.us-west-2.compute.internal
ID: KPWG:OVIS:SETD:RG3A:U2LF:ZBLL:QCZR:I6EY:N4HK:NB5B:3EDR:VSN7
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Supporting Log Snippets

2018-12-21T22:16:14Z [INFO] Unable to parse user data: invalid character '#' looking for beginning of value
kinbug scopECS Agent

Most helpful comment

#!/bin/bash
echo ECS_CLUSTER=foo >> /etc/ecs/ecs.config

All 6 comments

Could you please send me the user data you used?

#!/bin/bash
echo ECS_CLUSTER=foo >> /etc/ecs/ecs.config

Merged code change to suppress the message. We will investigate within the team to handle this in different ways, overloading user data with agent config cannot be rolled back as a feature but we may handle this outside of agent. Keeping this open to track the progress.

This was fixed with PR https://github.com/aws/amazon-ecs-agent/pull/1758. Resolving.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hayajo picture hayajo  路  3Comments

dcosson picture dcosson  路  3Comments

taktakpeops picture taktakpeops  路  4Comments

cjbottaro picture cjbottaro  路  4Comments

flowirtz picture flowirtz  路  5Comments