panic: interface conversion: interface is nil, not []interface {}
gbisheimer opened this issue · 2 comments
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
@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.
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!