title: HAProxy not forwarding requests to backend server
body: <p>I have HAProxy (v1.5.8) as a load balancer with keepalived (v1.2.2) to maintain high availability. I also have several Jetty servers on a different machine on the local network as backend server with a webapp. </p>
  
  <p>The problem I have is: I can access to the web app through it IP (z.z.z.z in the code below), but when I try to access by the VIP(y.y.y.y in the code below) I get a connection refused error. I dont have any iptables rule set (Debian 7).</p>
  
  <p>My haproxy.cfg file is this one:</p>
  
  <pre><code>global
      log 127.0.0.1 local0
      log 127.0.0.1 local1 notice
      chroot /var/lib/haproxy
      #stats socket /run/haproxy/admin.sock mode 660 level admin
      #stats timeout 30s
      maxconn 4096
      user haproxy
      group haproxy
  
  defaults
      log     global
      mode    http
      option  httplog
      option  dontlognull
      retries 3
      option redispatch
      maxconn 2000
      timeout connect 5000
      timeout client  50000
      timeout server  50000
      errorfile 400 /etc/haproxy/errors/400.http
      errorfile 403 /etc/haproxy/errors/403.http
      errorfile 408 /etc/haproxy/errors/408.http
      errorfile 500 /etc/haproxy/errors/500.http
      errorfile 502 /etc/haproxy/errors/502.http
      errorfile 503 /etc/haproxy/errors/503.http
      errorfile 504 /etc/haproxy/errors/504.http
  
  listen stats x.x.x.x:9000
      mode http
      balance
      option httplog
      timeout client 5000
      timeout connect 4000
      timeout server 30000
      stats uri /haproxy_stats
      stats realm HAProxy/Statistics
      stats auth user:passwd
      stats admin if TRUE
  
  listen webfarm y.y.y.y:8080
     mode http
     stats enable
     stats auth someuser:somepassword
     balance roundrobin
     cookie JSESSIONID prefix
     option httpclose
     option forwardfor
     option httpchk HEAD /check.txt HTTP/1.0
      server webA z.z.z.z:9400 check
  </code></pre>
  
  <p>In the keepalived conf file I have defined the VIP I will use (Is the same one defined in the haproxy.cfg :</p>
  
  <pre><code> virtual_ipaddress {
              y.y.y.y
   }
  </code></pre>
  
  <p>In the stats web I get the next results:</p>
  
  <p><a href="http://i.stack.imgur.com/dnXDZ.jpg" rel="nofollow">HAProxy Stats</a></p>
  
  <p>After this, I believe that haproxy cannot get to the backends as they are displayed as frontend servers. I am missing something in the conf files?</p>
  
  <p>Thank you</p>