docker-flow / docker-flow-proxy

Docker Flow Proxy
https://docker-flow.github.io/docker-flow-proxy/
MIT License
317 stars 189 forks source link

Reload: runtime error: invalid memory address or nil pointer dereference #99

Closed gbhrdt closed 3 years ago

gbhrdt commented 5 years ago

Hi guys, we regularly receive the following panic after reloading the configuration.


2019/06/04 16:07:35 Reloading the proxy

2019/06/04 16:07:35 Validating configuration

[WARNING] 154/160735 (8624) : config : log format ignored for frontend 'services' since it has no log address.

Configuration file is valid

The configuration file is valid, but there still may be a misconfiguration somewhere that will give unexpected results, please verify: 

stdout:

Configuration file is valid

stderr:

[WARNING] 154/160735 (8624) : config : log format ignored for frontend 'services' since it has no log address.

2019/06/04 16:07:36 http: panic serving 10.0.0.8:53252: runtime error: invalid memory address or nil pointer dereference

goroutine 1202087 [running]:

net/http.(*conn).serve.func1(0xc0020c8c80)

    /usr/local/go/src/net/http/server.go:1746 +0xd0

panic(0x8e8640, 0xd82170)

    /usr/local/go/src/runtime/panic.go:513 +0x1b9

github.com/docker-flow/docker-flow-proxy/proxy.glob..func4(0x984bc4, 0x15, 0x0)

    /src/proxy/util.go:90 +0x58

github.com/docker-flow/docker-flow-proxy/proxy.HaProxy.Reload(0x8f442d, 0x9, 0x8f40fa, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

    /src/proxy/ha_proxy.go:212 +0x2bd

github.com/docker-flow/docker-flow-proxy/actions.(*reload).Execute(0xc0031ff3b8, 0x1, 0x0, 0x5)

    /src/actions/reload.go:23 +0x46

github.com/docker-flow/docker-flow-proxy/actions.(*Reconfigure).Execute(0xc000258780, 0x1, 0xc000022214, 0xb)

    /src/actions/reconfigure.go:78 +0x1b4

github.com/docker-flow/docker-flow-proxy/server.(*serve).ReconfigureHandler(0xc000142af0, 0xa15980, 0xc002fd81c0, 0xc001205c00)

    /src/server/server.go:117 +0x218

github.com/docker-flow/docker-flow-proxy/server.Server.ReconfigureHandler-fm(0xa15980, 0xc002fd81c0, 0xc001205c00)

    /src/server.go:72 +0x4d

net/http.HandlerFunc.ServeHTTP(0xc00027bfe0, 0xa15980, 0xc002fd81c0, 0xc001205c00)

    /usr/local/go/src/net/http/server.go:1964 +0x44

github.com/gorilla/mux.(*Router).ServeHTTP(0xc000286a10, 0xa15980, 0xc002fd81c0, 0xc001205c00)

    /go/pkg/mod/github.com/gorilla/mux@v1.6.2/mux.go:162 +0xf1

net/http.serverHandler.ServeHTTP(0xc00013ac30, 0xa15980, 0xc002fd81c0, 0xc001205000)

    /usr/local/go/src/net/http/server.go:2741 +0xab

net/http.(*conn).serve(0xc0020c8c80, 0xa16100, 0xc0015188c0)

    /usr/local/go/src/net/http/server.go:1847 +0x646

created by net/http.(*Server).Serve

    /usr/local/go/src/net/http/server.go:2851 +0x2f5
vfarcic commented 5 years ago

Unfortunately, I don't think there's anyone left maintaining this project. I believe that everyone (me included) switched to Kuberentes, partly because Swarm itself is hardly making new releases anymore and is pretty much in stasis.

gbhrdt commented 5 years ago

@vfarcic Thank you very much for the clarification. Is there any equivalent project which works with Kubernetes you can recommend? Maybe https://github.com/appscode/voyager ?

vfarcic commented 5 years ago

K8s already has it solved with Ingress. The most common implementation is nginx Ingress.

gbhrdt commented 5 years ago

K8s already has it solved with Ingress. The most common implementation is nginx Ingress.

Thank you very much, that helps me. I think I will move to k8s as well, then. We have had some issues with Docker Swarms networking as well.

mhabegger commented 5 years ago

Traefik on K8s. We’ll move there as we have networking an storage issues as well woth Swarm. https://docs.traefik.io/user-guide/kubernetes/

lle0x commented 3 years ago

Hi @gbhrdt

It looks like this issue can be closed