# Rancher Loadbalancers in initialisation state

**URL:** <https://forums.suse.com/t/rancher-loadbalancers-in-initialisation-state/6352>\
**Category:** Rancher 1.x\
**Created:** [May 10, 2017, 3:43pm UTC](https://forums.suse.com/t/rancher-loadbalancers-in-initialisation-state/6352 "2017-05-10T15:43:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Listener\_me](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/listener_me/32/5836_2.png) [@Listener\_me](https://forums.suse.com/u/Listener_me)\
**Post date:** [May 10, 2017, 3:43pm UTC](https://forums.suse.com/t/rancher-loadbalancers-in-initialisation-state/6352/1 "2017-05-10T15:43:35Z")

</div>

We have couple of applications which are behind rancher load balancer(which is sitting on seperate server). Whenever we reboot those servers, rancher load balancer containers alone getting into initialization state and it wont load anything. Its not happening for all load balancer containers and not happening all the time, but to random ones. Restarting just the loadbalancer container alone didnt fix the issue. I had to fix it by the using following ways.

1. Restarting the entire stack which is affected.
2. If above doesn’t work, stop the rancherlb first, then restart(stop/start) the target container, then start the rancherlb
3. If both doesn’t work, get into the rancherlb through commandline and do a force apply of configuration by: haproxy –f /etc/haproxy/haproxy.cfg

PS: rancher loadbalancer image is pushed into our private registry from where we are pulling it.

Do anyone knows about any possible bug in the rancher load balancer?

---

<div class="post-metadata">

**Author:** ![superseb](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/superseb/32/2424_2.png) [@superseb](https://forums.suse.com/u/superseb)\
**Post date:** [June 19, 2017, 8:41pm UTC](https://forums.suse.com/t/rancher-loadbalancers-in-initialisation-state/6352/2 "2017-06-19T20:41:39Z")

</div>

If you have any stack config to share, I would like to reproduce this behavior. Can you also tell what versions you are running? OS/Rancher/Docker?

---

<div class="post-metadata">

**Author:** ![tzrlk](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/tzrlk/32/2533_2.png) [@tzrlk](https://forums.suse.com/u/tzrlk)\
**Post date:** [June 21, 2017, 12:01am UTC](https://forums.suse.com/t/rancher-loadbalancers-in-initialisation-state/6352/3 "2017-06-21T00:01:19Z")

</div>

I’m pretty sure I had the same issue: [Failed to get lb config](http://forums.suse.com/t/failed-to-get-lb-config/6645?u=tzrlk)

No solution, sadly, just a workaround.

---

<div class="post-metadata">

**Author:** ![Listener\_me](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/listener_me/32/5836_2.png) [@Listener\_me](https://forums.suse.com/u/Listener_me)\
**Post date:** [June 21, 2017, 10:05am UTC](https://forums.suse.com/t/rancher-loadbalancers-in-initialisation-state/6352/4 "2017-06-21T10:05:48Z")

</div>

superseb, we have a single tomcat container with a loadbalancer as below

> docker-compose.yml  
> tomcat:  
> image: tomcat:7  
> environment  
> - DB\_USERNAME=admin  
> - DB\_PASSWORD=xxxxxxxx  
> tomcatlb:  
> image: rancher/lb-service-haproxy  
> ports:  
> - 8080

> rancher-compose.yml  
> tomcatlb:  
> scale: 1  
> lb\_config:  
> port\_rules:  
> - source\_port: 8080  
> target\_port: 8080  
> service: tomcat  
> health\_check:  
> port: 42  
> interval: 2000  
> unhealthy\_threshold: 3  
> healthy\_threshold: 2  
> response\_timeout: 2000

tzrlk, I feel like its more related to, in what order containers in the specific stack is getting started. Normally, loadbalancers start only after the target containers get started right? When we deploy the catalog for the first time, it started in correct order. But in subsequent stop/start, it starts in any order. So sometimes it goes to initialisation state and sometimes it doesnt. Do we need to add any more parameters like “depends\_on” to decide the order and will it work for rancher loadbalancer?
