docker-archive / classicswarm

Swarm Classic: a container clustering system. Not to be confused with Docker Swarm which is at https://github.com/docker/swarmkit
Apache License 2.0
5.76k stars 1.08k forks source link

Swarm Manager giving Panic Serving for every command. #1479

Closed ankitsnlq closed 8 years ago

ankitsnlq commented 8 years ago

I have done swarm Cluster setup with two nodes , everything was working fine. Even i was able to scale services but all of sudden swarm stared giving 2015/12/02 17:42:44 http: panic serving 127.0.0.1:59146: runtime error: index out of range goroutine 58 [running]:

even docker ps -a also showing that error.

Swarm version : swarm version 1.0.0 (HEAD)

Docker info showing : Containers: 40 Images: 30 Role: primary Strategy: spread Filters: health, port, dependency, affinity, constraint Nodes: 2 arun-Latitude-3550: 172.16.0.247:2375 └ Containers: 14 └ Reserved CPUs: 0 / 4 └ Reserved Memory: 0 B / 8.099 GiB └ Labels: executiondriver=native-0.2, kernelversion=3.13.0-68-generic, operatingsystem=Ubuntu 14.04.3 LTS, storagedriver=aufs swarm-node1: 172.16.0.156:2375 └ Containers: 26 └ Reserved CPUs: 0 / 1 └ Reserved Memory: 0 B / 1.019 GiB └ Labels: executiondriver=native-0.2, kernelversion=3.13.0-32-generic, operatingsystem=Ubuntu 14.04.1 LTS, storagedriver=aufs CPUs: 5 Total Memory: 9.118 GiB Name: swarm-master

But when i give command docker ps -a

2015/12/02 17:50:10 http: panic serving 127.0.0.1:59156: runtime error: index out of range goroutine 72 [running]: net/http.(_conn).serve.func1(0xc82038afd0, 0x7fdc3e29a6e0, 0xc82002a9b8) /usr/local/go/src/net/http/server.go:1287 +0xb5 github.com/docker/swarm/api.getContainersJSON(0xc8200e7880, 0x7fdc3e2a24b8, 0xc82038b080, 0xc8202d28c0) /home/raw/go/src/github.com/docker/swarm/api/handlers.go:285 +0x1adc github.com/docker/swarm/api.NewPrimary.func1(0x7fdc3e2a24b8, 0xc82038b080, 0xc8202d28c0) /home/raw/go/src/github.com/docker/swarm/api/primary.go:128 +0x300 net/http.HandlerFunc.ServeHTTP(0xc820120ce0, 0x7fdc3e2a24b8, 0xc82038b080, 0xc8202d28c0) /usr/local/go/src/net/http/server.go:1422 +0x3a github.com/gorilla/mux.(_Router).ServeHTTP(0xc82005ecd0, 0x7fdc3e2a24b8, 0xc82038b080, 0xc8202d28c0) /home/raw/go/src/github.com/docker/swarm/Godeps/_workspace/src/github.com/gorilla/mux/mux.go:98 +0x29e github.com/docker/swarm/api.(_dispatcher).ServeHTTP(0xc8200e9080, 0x7fdc3e2a24b8, 0xc82038b080, 0xc8202d28c0) /home/raw/go/src/github.com/docker/swarm/api/server.go:32 +0x9f net/http.serverHandler.ServeHTTP(0xc8202a7aa0, 0x7fdc3e2a24b8, 0xc82038b080, 0xc8202d28c0) /usr/local/go/src/net/http/server.go:1862 +0x19e net/http.(_conn).serve(0xc82038afd0) /usr/local/go/src/net/http/server.go:1361 +0xbee created by net/http.(*Server).Serve /usr/local/go/src/net/http/server.go:1910 +0x3f6 An error occurred trying to connect: Get http://0.0.0.0:4000/v1.21/containers/json?all=1: EOF

For docker-compose up -d

2015/12/02 17:50:19 http: panic serving 127.0.0.1:59157: runtime error: index out of range goroutine 73 [running]: net/http.(_conn).serve.func1(0xc82038b1e0, 0x7fdc3e29a6e0, 0xc82002aaa8) /usr/local/go/src/net/http/server.go:1287 +0xb5 github.com/docker/swarm/api.getContainersJSON(0xc8200e7880, 0x7fdc3e2a24b8, 0xc82038b290, 0xc8202d3ce0) /home/raw/go/src/github.com/docker/swarm/api/handlers.go:285 +0x1adc github.com/docker/swarm/api.NewPrimary.func1(0x7fdc3e2a24b8, 0xc82038b290, 0xc8202d3ce0) /home/raw/go/src/github.com/docker/swarm/api/primary.go:128 +0x300 net/http.HandlerFunc.ServeHTTP(0xc820120ce0, 0x7fdc3e2a24b8, 0xc82038b290, 0xc8202d3ce0) /usr/local/go/src/net/http/server.go:1422 +0x3a github.com/gorilla/mux.(_Router).ServeHTTP(0xc82005ecd0, 0x7fdc3e2a24b8, 0xc82038b290, 0xc8202d3ce0) /home/raw/go/src/github.com/docker/swarm/Godeps/_workspace/src/github.com/gorilla/mux/mux.go:98 +0x29e github.com/docker/swarm/api.(_dispatcher).ServeHTTP(0xc8200e9080, 0x7fdc3e2a24b8, 0xc82038b290, 0xc8202d3ce0) /home/raw/go/src/github.com/docker/swarm/api/server.go:32 +0x9f net/http.serverHandler.ServeHTTP(0xc8202a7aa0, 0x7fdc3e2a24b8, 0xc82038b290, 0xc8202d3ce0) /usr/local/go/src/net/http/server.go:1862 +0x19e net/http.(_conn).serve(0xc82038b1e0) /usr/local/go/src/net/http/server.go:1361 +0xbee created by net/http.(*Server).Serve /usr/local/go/src/net/http/server.go:1910 +0x3f6 ERROR: Couldn't connect to Docker daemon at http://0.0.0.0:4000 - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

Everything was working fine , it happeded all of sudden no config changes have been done.

dongluochen commented 8 years ago

@ankitsnlq This has been fixed in #1465. You can rebuild or wait for swarm 1.0.1 coming out later this week.

aluzzardi commented 8 years ago

Fixed in #1465 - you can try it out by running dockerswarm/swarm:master instead of swarm.

Please re-open if it didn't fix the issue.