# Quick Start Guide Issue with Creating a Multi-Container Application

**URL:** <https://forums.suse.com/t/quick-start-guide-issue-with-creating-a-multi-container-application/728>\
**Category:** Rancher 1.x\
**Created:** [October 20, 2015, 7:13am UTC](https://forums.suse.com/t/quick-start-guide-issue-with-creating-a-multi-container-application/728 "2015-10-20T07:13:29Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![me2050](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@me2050](https://forums.suse.com/u/me2050)\
**Post date:** [October 20, 2015, 7:13am UTC](https://forums.suse.com/t/quick-start-guide-issue-with-creating-a-multi-container-application/728/1 "2015-10-20T07:13:29Z")

</div>

Hi, I was able to follow the quick start guide step-by-step to create a multi-container application on a console-only CentOS7 server, from where the Rancher server is launched. All services are up and running, but I can’t hit the CentOS7’s public IP to get to the loadbalancer. How can I route the traffic from the CentOS7 (public IP address) to the loadbalancer (in my case, 172.17.0.9) for the mywordpress service? I tried to put a haproxy on the CentOS7 to route the traffic to the loadbalancer, but doesn’t seem to work. Below are the yml’s retrieved from the RancherUI. Thanks in advance for any help!

docker-compose.yml

```
mywordpress:
  restart: always
  tty: true
  image: wordpress
  links:
  - database:mysql
  stdin_open: true
database:
  restart: always
  environment:
    MYSQL_ROOT_PASSWORD: pass1
  tty: true
  image: mysql
  stdin_open: true
wordpresslb:
  ports:
  - 80:80
  restart: always
  tty: true
  image: rancher/load-balancer-service
  links:
  - mywordpress:mywordpress
  stdin_open: true

```

rancher-compose.yml

```
mywordpress:
  scale: 2
database:
  scale: 1
wordpresslb:
  scale: 1
  load_balancer_config:
    name: wordpresslb config
```

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [October 23, 2015, 3:32am UTC](https://forums.suse.com/t/quick-start-guide-issue-with-creating-a-multi-container-application/728/2 "2015-10-23T03:32:08Z")

</div>

I am able to take your exact docker-compose.yml and rancher-compose.yml files and import them into my version of Rancher (v0.42.0). From there, I can take the host IP that has the load balancer and access the wordpress container.

What happens when you access the host IP? Is there an error (503) or a blank page?

---

<div class="post-metadata">

**Author:** ![me2050](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@me2050](https://forums.suse.com/u/me2050)\
**Post date:** [October 23, 2015, 7:25am UTC](https://forums.suse.com/t/quick-start-guide-issue-with-creating-a-multi-container-application/728/3 "2015-10-23T07:25:18Z")

</div>

Thanks for your reply Denise! Below is a brief description of a pseudo deployment topology. When I access [http://192.168.0.100](http://192.168.0.100), I got “This web page is not available” error with “ERR\_CONNECTION\_REFUSED” when using Google Chrome, basically, 504, can’t reach out to the LB.

```
Client - Google Chrome on Windows (192.168.0.10)
Linux VM (CentOS7, 192.168.0.100)
Rancher Host (172.17.0.9)
  wordpresslb service - lb agent(10.42.126.40)
  mywordpress service - Default_mywordpress_1(10.42.214.176), Default_mywordpress_2(10.42.161.50)
  database service - Default_Database_1(10.42.72.129)

```

Now, I did make it working by setting up a haproxy on the Linux VM (192.168.0.100) to route the traffic from 192.168.0.100 to 10.42.126.40, with the haproxy.cfg look like the following:

```
# cat haproxy.cfg
global
    log 127.0.0.1 local2

    chroot /var/lib/haproxy
    pidfile /var/run/haproxy.pid
    maxconn 4000
    user haproxy
    group haproxy
    daemon

    # turn on stats unix socket
    stats socket /var/lib/haproxy/stats

defaults
    mode http
    log global
    option httplog
    option dontlognull
    option http-server-close
    option forwardfor except 127.0.0.0/8
    option redispatch
    retries 3
    timeout http-request 10s
    timeout queue 1m
    timeout connect 10s
    timeout client 1m
    timeout server 1m
    timeout http-keep-alive 10s
    timeout check 10s
    maxconn 3000

frontend main *:80
    default_backend app

backend app
    balance roundrobin
    server app1 10.42.126.40:80 check

```

Is this the way to go, or, should it be a more elegant way without the haproxy?

Thanks again for looking into this!

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [October 26, 2015, 5:10pm UTC](https://forums.suse.com/t/quick-start-guide-issue-with-creating-a-multi-container-application/728/4 "2015-10-26T17:10:24Z")

</div>

You definitely shouldn’t have to launch with haproxy as the load balancer is already running haproxy software and should be working.

Can you look at the troubleshooting docs to check your haproxy.cfg for the load balancer?

[http://docs.rancher.com/rancher/faqs/troubleshooting/#load-balancer](http://docs.rancher.com/rancher/faqs/troubleshooting/#load-balancer)

---

<div class="post-metadata">

**Author:** ![me2050](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@me2050](https://forums.suse.com/u/me2050)\
**Post date:** [October 29, 2015, 5:53am UTC](https://forums.suse.com/t/quick-start-guide-issue-with-creating-a-multi-container-application/728/5 "2015-10-29T05:53:52Z")

</div>

@denise - The last two sections of the haproxy.cfg file for the LB (10.42.126.40) container would look something like the following:

```
frontend 1a9b7308-805a-4212-abf0-8a80bce80b58_frontend
        bind 10.42.126.40:80
        mode http

        default_backend 1a9b7308-805a-4212-abf0-8a80bce80b58_0_backend

backend 1a9b7308-805a-4212-abf0-8a80bce80b58_0_backend
        mode http
        balance roundrobin
        server 171c9673-908f-4343-b1d5-35c6eaa04e90 10.42.214.176:80
        server e6db7bf6-a9a6-4a0b-b9d6-0f9368ecb542 10.42.161.50:80

```

Once again, here’s the topology:

Client - Google Chrome on Windows (192.168.0.10)  
Linux VM (CentOS7, 192.168.0.100)  
Rancher Host (172.17.0.9)  
wordpresslb service - lb agent(10.42.126.40)  
mywordpress service - Default\_mywordpress\_1(10.42.214.176), Default\_mywordpress\_2(10.42.161.50)  
database service - Default\_Database\_1(10.42.72.129)

So, from the outter Linux VM (IP: 192.168.0.100), it doesn’t seem to have a route to the inner LB (10.42.126.40). Or, am I missing something important here?

---

<div class="post-metadata">

**Author:** ![me2050](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@me2050](https://forums.suse.com/u/me2050)\
**Post date:** [November 3, 2015, 5:06am UTC](https://forums.suse.com/t/quick-start-guide-issue-with-creating-a-multi-container-application/728/6 "2015-11-03T05:06:06Z")

</div>

Hi, @denise, do you have any thoughts based on the posted haproxy configuration retrieved from the load balancer container?

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [November 5, 2015, 7:57pm UTC](https://forums.suse.com/t/quick-start-guide-issue-with-creating-a-multi-container-application/728/7 "2015-11-05T19:57:02Z")

</div>

Re-looking at your set up, it looks like your Rancher host has picked up the docker bridge IP instead of the actual IP of the host.

Do you only have 1 host with all the containers on the host?

[http://docs.rancher.com/rancher/faqs/troubleshooting/#cross-host-communication](http://docs.rancher.com/rancher/faqs/troubleshooting/#cross-host-communication)

---

<div class="post-metadata">

**Author:** ![me2050](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@me2050](https://forums.suse.com/u/me2050)\
**Post date:** [November 6, 2015, 7:26am UTC](https://forums.suse.com/t/quick-start-guide-issue-with-creating-a-multi-container-application/728/8 "2015-11-06T07:26:35Z")

</div>

Thanks for looking into it… Correct, I only had one host with all the containers on it, and I followed the quick start guide to the teeth.

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [November 9, 2015, 7:19pm UTC](https://forums.suse.com/t/quick-start-guide-issue-with-creating-a-multi-container-application/728/9 "2015-11-09T19:19:50Z")

</div>

Can you confirm if the host has the correct IP or the docker bridge IP? You can set the IP specifically by following the docs for setting up a host on the same VM as rancher server.

[http://docs.rancher.com/rancher/rancher-ui/infrastructure/hosts/custom/#samehost](http://docs.rancher.com/rancher/rancher-ui/infrastructure/hosts/custom/#samehost)

---

<div class="post-metadata">

**Author:** ![anon95821359](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@anon95821359](https://forums.suse.com/u/anon95821359)\
**Post date:** [October 25, 2016, 11:42am UTC](https://forums.suse.com/t/quick-start-guide-issue-with-creating-a-multi-container-application/728/10 "2016-10-25T11:42:00Z")

</div>

I am having ERR\_CONNECTION\_REFUSED Problem in myc Pc
