docker-flow / docker-flow-proxy

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

docker flow proxy not started because 1 docker services could not be resolved #75

Closed dorsany closed 5 years ago

dorsany commented 5 years ago

I have an issue to start docker flow proxy because 1 docker services could not be resolved [ALERT] 283/090311 (272) : parsing [/cfg/haproxy.cfg:269] : 'server site1_apigateway' : could not resolve address 'site0_apigateway' there is a way somehow to ignore docker service in swarm mode that could not be resolved by the docker flow proxy ? so the docker flow proxy will skip this service until it will become resolved again?

After some investigation.. If I start the docker flow proxy before all the services it will start ok and when I start a service that could not be resolved it will output not resolved errors but the service will stay up. But When I start the service that could not be resolved and then I start the docker flow proxy it will crashed and restart itself every time

looks like the ha configuration update process is exit with error 1 which means that if the ha configuration was ok in the first start the service will stay active but if not it will be reatarted

any idea?

thomasjpfan commented 5 years ago

When DFP request for services from DFSL at startup, DFSL returns all the services without checking if they are running. Ideally, we would want DFSL return all services that has resolved, and later notify DFP when the other services resolves.

I am looking into possible solutions to this issue.

thomasjpfan commented 5 years ago

I have updated DFSL to address your issue. Please try dockerflow/docker-flow-swarm-listener:18.10.12-7 and see if it works for your use case.

dorsany commented 5 years ago

looks like It's working. I will try to test it some more and if there will be any issue I will update you