Comments (7)
getting the same issue, happens right after I do a ecs-cli compose up
and then ecs-cli ps
, is there even any temporary fix in the meantime? I can't get any commands to work.
from amazon-ecs-cli.
"Temporary fix" is to ssh into the instance and remove all stopped docker containers and restart ecs
, this got it working again for me
from amazon-ecs-cli.
Seeing this as well.
from amazon-ecs-cli.
I also have this problem with the latest ecs-cli 0.3.0.
When I was running ECS on the same account I'm logging in with ecs-cli I had no problem calling ecs-cli commands. But when I'm assuming cross-account role using --profile
argument with ecs-cli configure
command and trying to run ecs-cli commands I get:
$ ecs-cli ps
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x384050]
goroutine 1 [running]:
panic(0x66ca40, 0xc8200100e0)
/usr/local/Cellar/go/1.6.2/libexec/src/runtime/panic.go:481 +0x3e6
github.com/aws/aws-sdk-go/aws/ec2metadata.(*EC2Metadata).GetMetadata(0x0, 0x8176a0, 0x19, 0x0, 0x0, 0x0, 0x0)
/private/tmp/amazon-ecs-cli-20160519-4261-1vszurp/amazon-ecs-cli-0.3.0/src/github.com/aws/amazon-ecs-cli/ecs-cli/vendor/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go:24 +0x1b0
github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds.requestCredList(0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/private/tmp/amazon-ecs-cli-20160519-4261-1vszurp/amazon-ecs-cli-0.3.0/src/github.com/aws/amazon-ecs-cli/ecs-cli/vendor/src/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go:133 +0x74
github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds.(*EC2RoleProvider).Retrieve(0xc8200f2480, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/private/tmp/amazon-ecs-cli-20160519-4261-1vszurp/amazon-ecs-cli-0.3.0/src/github.com/aws/amazon-ecs-cli/ecs-cli/vendor/src/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go:89 +0x8b
github.com/aws/aws-sdk-go/aws/credentials.(*ChainProvider).Retrieve(0xc8200f24b0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/private/tmp/amazon-ecs-cli-20160519-4261-1vszurp/amazon-ecs-cli-0.3.0/src/github.com/aws/amazon-ecs-cli/ecs-cli/vendor/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go:75 +0x122
github.com/aws/aws-sdk-go/aws/credentials.(*Credentials).Get(0xc82005a6c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/private/tmp/amazon-ecs-cli-20160519-4261-1vszurp/amazon-ecs-cli-0.3.0/src/github.com/aws/amazon-ecs-cli/ecs-cli/vendor/src/github.com/aws/aws-sdk-go/aws/credentials/credentials.go:185 +0x121
github.com/aws/amazon-ecs-cli/ecs-cli/modules/config.(*CliConfig).ToServiceConfig(0xc82002c0a8, 0x788f70, 0x0, 0x0)
/private/tmp/amazon-ecs-cli-20160519-4261-1vszurp/amazon-ecs-cli-0.3.0/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/config/config.go:68 +0x8a7
github.com/aws/amazon-ecs-cli/ecs-cli/modules/config.NewCliParams(0xc8201000f0, 0xd04be0, 0xc8200116d0, 0xd04be0, 0x0, 0x0)
/private/tmp/amazon-ecs-cli-20160519-4261-1vszurp/amazon-ecs-cli-0.3.0/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/config/params.go:63 +0x3b7
github.com/aws/amazon-ecs-cli/ecs-cli/modules/command.glob.func1(0xc8201000f0, 0xd04be0, 0xc8200116d0, 0x10, 0x0, 0x0)
/private/tmp/amazon-ecs-cli-20160519-4261-1vszurp/amazon-ecs-cli-0.3.0/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/command/cluster_app.go:174 +0x41
github.com/aws/amazon-ecs-cli/ecs-cli/modules/command.clusterPS(0xc8201000f0, 0xd04be0, 0xc8200116d0, 0xd04b30, 0xc8200b9b40, 0x0, 0x0, 0x0, 0x0, 0x0)
/private/tmp/amazon-ecs-cli-20160519-4261-1vszurp/amazon-ecs-cli-0.3.0/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/command/cluster_app.go:265 +0x7d
github.com/aws/amazon-ecs-cli/ecs-cli/modules/command.ClusterPS(0xc8201000f0)
/private/tmp/amazon-ecs-cli-20160519-4261-1vszurp/amazon-ecs-cli-0.3.0/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/command/cluster_app.go:104 +0x2ac
github.com/codegangsta/cli.Command.Run(0x788bf8, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x87e740, 0x37, 0x0, ...)
/private/tmp/amazon-ecs-cli-20160519-4261-1vszurp/amazon-ecs-cli-0.3.0/src/github.com/aws/amazon-ecs-cli/ecs-cli/vendor/src/github.com/codegangsta/cli/command.go:127 +0x1055
github.com/codegangsta/cli.(*App).Run(0xc8200ba300, 0xc82000a200, 0x2, 0x2, 0x0, 0x0)
/private/tmp/amazon-ecs-cli-20160519-4261-1vszurp/amazon-ecs-cli-0.3.0/src/github.com/aws/amazon-ecs-cli/ecs-cli/vendor/src/github.com/codegangsta/cli/app.go:159 +0xc34
main.main()
/private/tmp/amazon-ecs-cli-20160519-4261-1vszurp/amazon-ecs-cli-0.3.0/src/github.com/aws/amazon-ecs-cli/ecs-cli/main.go:45 +0xa50
from amazon-ecs-cli.
I also have the same problem.
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0xe0 pc=0xc4f6b]
goroutine 1 [running]:
github.com/aws/amazon-ecs-cli/ecs-cli/modules/compose/ecs.getContainersForTasks(0xb28648, 0xc20800bdd0, 0xc208315260, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/src/app/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/compose/ecs/entity.go:195 +0x4db
...
There are two cases that I found to reproduce this.
Precondition: A program in docker needs memory almost the memory limitation in runtime.
- Run 'ecs-cli compose ps' just after 'ecs-cli compose up' (Almost everytime)
- Run 'ecs-cli compose ps' after running process consuming enough memory (Not sure..?)
from amazon-ecs-cli.
I solved the problem to change instance and memory limitation from docker compose. Lack of memory may cause the memory corruption.
from amazon-ecs-cli.
I get this problem every time I'm trying execute docker ps
using assumed profile. But when I use my default AWS account there is no problem.
For instance configure ecs-cli to use some non-existing cluster and run ecs-cli ps
. If you're not using cross-account profile you'll get valid error message complaining about missing cluster:
$ ecs-cli ps
ERRO[0000] Error executing 'ps Cluster 'not-existing-cluster' is not active. Ensure that it exists
But if you use profile like my "cross-account-ecs-admin" profile defined in ~/.aws/config:
[default]
output = json
region = eu-west-1
[profile cross-account-ecs-admin]
role_arn = arn:aws:iam::xxxxxxxxx:role/ECSAdmin
source_profile = default
You'll end up with that panic: runtime error: invalid memory address or nil pointer dereference
from amazon-ecs-cli.
Related Issues (20)
- Feat. Request: Allow environment variables to depend on CF intrinsic functions
- `ecs-cli local up` badly handles secrets if the docker-compose container name has dashes
- `ecs-cli local create` should docker-compose escape the env vars in entrypoint
- ECS_CONTAINER_METADATA_URI is not accessible in macOS
- ecs-cli compose task failing with "Fargate only supports network mode ‘awsvpc’"
- Question: can I override the location of config and credential files?
- Support OSX Arm64
- EKS - Creating nodegroup
- Allow specifying container parameters (cpu, memory) using ecs params HOT 1
- global --endpoint flag is not supported
- Launch Templates vs Launch Configurations HOT 3
- Link to "Information about specific compose versions and fields supported by the ecs-cli" is broken
- when I run a task locally it does not seem to pickup environment variable containing values from parameterstore
- Create ecs-service from ecs-cli
- Problem with Task not working when creating Docker Volume driver with capital letter "Local"
- [Feature Request] depends_on option in ecs params
- Add support for readonlyrootfilesystem schema
- How to copy files into ECS container?
- unable to pull image HOT 1
- User-data script has erroneous newline breaking shebang, incompatible with Cloud-init versions on AL2023 HOT 1
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 amazon-ecs-cli.