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

panic: interface conversion: interface is nil, not []interface {} #2

Open
gbisheimer opened this issue Sep 10, 2016 · 2 comments
Open

Comments

@gbisheimer
Copy link

gbisheimer commented Sep 10, 2016

This is the first time trying rancherssh. I was looking for something like this for a long time. I get this message when I run rancherssh: panic: interface conversion: interface is nil, not []interface {}

How can I fix this? Could be a config file problem? I'm using JSON format for the config file.

Thanks!

EDIT: Forgot to give more details. This is the displayed error and stack trace:

Searching for container bys
panic: interface conversion: interface is nil, not []interface {}

goroutine 1 [running]:
panic(0x802340, 0xc4203da280)
    /usr/local/go/src/runtime/panic.go:500 +0x1a1
main.(*RancherAPI).containerUrl(0xc420109ef8, 0x7ffdc474b423, 0x3, 0x1c, 0x0)
    /home/gbisheimer/src/rancherssh/src/github.com/fangli/rancherssh/main.go:189 +0x5b3
main.(*RancherAPI).GetContainerConn(0xc420109ef8, 0x7ffdc474b423, 0x3, 0x40a7ab)
    /home/gbisheimer/src/rancherssh/src/github.com/fangli/rancherssh/main.go:249 +0x122
main.main()
    /home/gbisheimer/src/rancherssh/src/github.com/fangli/rancherssh/main.go:303 +0xb2
@fangli
Copy link
Owner

fangli commented Sep 19, 2016

@gbisheimer In order to search containers in rancher, this tool need admin permissions.
Please make sure the credential in config have admin permissions, also make sure you put the corresponding API endpoint URL in config according to the user/password type you choose.

***/v1/projects/1a5864 for Environment API Keys and /v1 for Account API Keys.

@gbisheimer
Copy link
Author

Thanks for the reply. Now it found the containers and works perfectly.
One more thing. Would it be possible to also forward ports as ssh does using rancher API?

Thanks!

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

2 participants