Coder Social home page Coder Social logo

Comments (7)

jeremymills avatar jeremymills commented on July 17, 2024

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.

jeremymills avatar jeremymills commented on July 17, 2024

"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.

bbakersmith avatar bbakersmith commented on July 17, 2024

Seeing this as well.

from amazon-ecs-cli.

klindklind avatar klindklind commented on July 17, 2024

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.

w4-sglim avatar w4-sglim commented on July 17, 2024

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.

  1. Run 'ecs-cli compose ps' just after 'ecs-cli compose up' (Almost everytime)
  2. Run 'ecs-cli compose ps' after running process consuming enough memory (Not sure..?)

from amazon-ecs-cli.

w4-sglim avatar w4-sglim commented on July 17, 2024

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.

klindklind avatar klindklind commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.