docker / machine

Machine management for a container-centric world
https://docs.docker.com/machine/
Apache License 2.0
6.63k stars 1.96k forks source link

invalid memory address with `docker-machine ls` #4217

Open wallnerryan opened 7 years ago

wallnerryan commented 7 years ago

This was working recently, gettings invald memory address now. The 401 seems false as I can use the openstack CLI just fine with current creds.

➜   ✗ docker-machine --debug ls
Docker Machine Version:  0.12.0, build 45c69ad
Found binary path at /usr/local/bin/docker-machine
Launching plugin server for driver openstack
Plugin server listening at address 127.0.0.1:55009
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
timeout set to 10s
(jenkins-docker-slave) Calling .GetURL
(jenkins-docker-slave) DBG | Get status for OpenStack instance... map[MachineId:b60941d1-58d0-4301-97d9-3ea8788834d3]
(jenkins-docker-slave) DBG | Authenticating... map[AuthUrl:https://cloud.business.com:5000/v3/ Insecure:false DomainName:athenahealth CaCert: DomainID: Username:fakeusername TenantName: TenantID:e9a2869893734aab8061c0ebb10e0876]
(jenkins-docker-slave) Calling .GetState
(jenkins-docker-slave) DBG | Get status for OpenStack instance... map[MachineId:b60941d1-58d0-4301-97d9-3ea8788834d3]
(jenkins-docker-slave) DBG | panic: runtime error: invalid memory address or nil pointer dereference
(jenkins-docker-slave) DBG | [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x178f7de]
(jenkins-docker-slave) DBG |
(jenkins-docker-slave) DBG | goroutine 48 [running]:
(jenkins-docker-slave) DBG | github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack.NewComputeV2(0xc42025e000, 0x1fd18e1, 0x7, 0x0, 0x0, 0x0, 0x0, 0x1fd0a41, 0x6, 0xc420528000, ...)
(jenkins-docker-slave) DBG |    /go/src/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/client.go:213 +0x9e
(jenkins-docker-slave) DBG | github.com/docker/machine/drivers/openstack.(*GenericClient).InitComputeClient(0xc420136f40, 0xc420212000, 0x0, 0x0)
(jenkins-docker-slave) DBG |    /go/src/github.com/docker/machine/drivers/openstack/client.go:485 +0xf8
(jenkins-docker-slave) DBG | github.com/docker/machine/drivers/openstack.(*Driver).initCompute(0xc420212000, 0x2, 0x2)
(jenkins-docker-slave) DBG |    /go/src/github.com/docker/machine/drivers/openstack/openstack.go:627 +0x77
(jenkins-docker-slave) DBG | github.com/docker/machine/drivers/openstack.(*Driver).GetState(0xc420212000, 0x0, 0x0, 0x0)
(jenkins-docker-slave) DBG |    /go/src/github.com/docker/machine/drivers/openstack/openstack.go:353 +0x1b1
(jenkins-docker-slave) DBG | github.com/docker/machine/libmachine/drivers/rpc.(*RPCServerDriver).GetState(0xc420136f60, 0x295be48, 0xc42052c0a0, 0x0, 0x0)
(jenkins-docker-slave) DBG |    /go/src/github.com/docker/machine/libmachine/drivers/rpc/server_driver.go:191 +0x33
(jenkins-docker-slave) DBG | reflect.Value.call(0xc42001d140, 0xc42000c3b0, 0x13, 0x1fce290, 0x4, 0xc420049f20, 0x3, 0x3, 0x0, 0x0, ...)
(jenkins-docker-slave) DBG |    /usr/local/go/src/reflect/value.go:434 +0x91f
(jenkins-docker-slave) DBG | reflect.Value.Call(0xc42001d140, 0xc42000c3b0, 0x13, 0xc4204bbf20, 0x3, 0x3, 0x0, 0x0, 0x0)
(jenkins-docker-slave) DBG |    /usr/local/go/src/reflect/value.go:302 +0xa4
(jenkins-docker-slave) DBG | net/rpc.(*service).call(0xc420113f00, 0xc420112280, 0xc42011a080, 0xc420097e80, 0xc42011e040, 0x1c64200, 0x295be48, 0x16, 0x1d025e0, 0xc42052c0a0, ...)
(jenkins-docker-slave) DBG |    /usr/local/go/src/net/rpc/server.go:387 +0x144
(jenkins-docker-slave) DBG | created by net/rpc.(*Server).ServeCodec
(jenkins-docker-slave) DBG |    /usr/local/go/src/net/rpc/server.go:481 +0x404
(jenkins-docker-slave) Calling .DriverName
Error attempting call to get driver name: connection is shut down
NAME                   ACTIVE   DRIVER   STATE   URL   SWARM   DOCKER    ERRORS
jenkins-docker-slave   -                 Error                 Unknown   Expected HTTP response code [201 202] when accessing [POST https://cloud.business.com:5000/v3/auth/tokens], but got 401 instead
{"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}
Making call to close driver server
(jenkins-docker-slave) Calling .Close
Failed to make call to close driver server: connection is shut down
Making call to close connection to plugin binary
shin- commented 7 years ago

Please upgrade to machine 0.12.2 and let us know if the issue persists.

danedb commented 7 years ago

I have similar issues. working recently with docker-machine 0.12.0 tried to upgrade to 0.12.2 to no avail

$ docker-machine -D ls Docker Machine Version: 0.12.2, build 9371605 Found binary path at /usr/local/bin/docker-machine Launching plugin server for driver openstack Plugin server listening at address 127.0.0.1:43209 () Calling .GetVersion Using API Version 1 () Calling .SetConfigRaw () Calling .GetMachineName timeout set to 10s (babel) Calling .GetURL (babel) DBG | Get status for OpenStack instance... map[MachineId:5828b4eb-c621-483b-94a8-3a3d23e37037] (babel) DBG | Authenticating... map[DomainID: DomainName:tst Username:dan TenantName: TenantID:53622768ad054d7a911f8f5034a4fb6c AuthUrl:https://cloud:5000/v3 Insecure:false CaCert:] (babel) Calling .GetState (babel) DBG | Get status for OpenStack instance... map[MachineId:5828b4eb-c621-483b-94a8-3a3d23e37037] (babel) DBG | panic: runtime error: invalid memory address or nil pointer dereference (babel) DBG | [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb9e59e] (babel) DBG | (babel) DBG | goroutine 26 [running]: (babel) DBG | github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack.NewComputeV2(0xc42024a120, 0x13de39b, 0x7, 0x0, 0x0, 0x0, 0x0, 0x13dd508, 0x6, 0xc42050a000, ...) (babel) DBG | /go/src/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/client.go:213 +0x9e (babel) DBG | github.com/docker/machine/drivers/openstack.(GenericClient).InitComputeClient(0xc420174b00, 0xc4201783c0, 0x0, 0x0) (babel) DBG | /go/src/github.com/docker/machine/drivers/openstack/client.go:485 +0xf8 (babel) DBG | github.com/docker/machine/drivers/openstack.(Driver).initCompute(0xc4201783c0, 0x2, 0x2) (babel) DBG | /go/src/github.com/docker/machine/drivers/openstack/openstack.go:627 +0x77 (babel) DBG | github.com/docker/machine/drivers/openstack.(Driver).GetState(0xc4201783c0, 0x0, 0x0, 0x0) (babel) DBG | /go/src/github.com/docker/machine/drivers/openstack/openstack.go:353 +0x1b1 (babel) DBG | github.com/docker/machine/libmachine/drivers/rpc.(RPCServerDriver).GetState(0xc420174b20, 0x1d73f60, 0xc4203f2148, 0x0, 0x0) (babel) DBG | /go/src/github.com/docker/machine/libmachine/drivers/rpc/server_driver.go:191 +0x33 (babel) DBG | reflect.Value.call(0xc4200a7080, 0xc42008e398, 0x13, 0x13dad6e, 0x4, 0xc420513f20, 0x3, 0x3, 0x0, 0x0, ...) (babel) DBG | /usr/local/go/src/reflect/value.go:434 +0x91f (babel) DBG | reflect.Value.Call(0xc4200a7080, 0xc42008e398, 0x13, 0xc420471f20, 0x3, 0x3, 0x0, 0x0, 0x0) (babel) DBG | /usr/local/go/src/reflect/value.go:302 +0xa4 (babel) DBG | net/rpc.(service).call(0xc42015fc00, 0xc4200b9cc0, 0xc42000e320, 0xc4200bbe00, 0xc42000a7c0, 0x106e840, 0x1d73f60, 0x16, 0x110d340, 0xc4203f2148, ...) (babel) DBG | /usr/local/go/src/net/rpc/server.go:387 +0x144 (babel) DBG | created by net/rpc.(Server).ServeCodec (babel) DBG | /usr/local/go/src/net/rpc/server.go:481 +0x404 (babel) Calling .DriverName Error attempting call to get driver name: connection is shut down NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS babel - Error Unknown Expected HTTP response code [201 202] when accessing [POST https://cloud:5000/v3/auth/tokens], but got 401 instead {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}} Making call to close driver server (babel) Calling .Close Failed to make call to close driver server: connection is shut down Making call to close connection to plugin binary

Maybe it has something to do with CaCert If I create a new machine and then try docker-machine ls, CaCert is set and it works

I dont know why CaCert was no longer set on my previous machine