Question
Can't bind Anchor IP on haproxy docker container
Hi! I’m trying to bind my droplet’s anchor IP address to haproxy. Here’s my haproxy.cfg file:
global
maxconn 4096
debug
defaults
log global
mode tcp
option tcplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
frontend www
bind $ANCHOR_IP:80
default_backend node-fedex
backend node-fedex
balance leastconn
server app-1 $BACKEND_IP_1:8080 check
server app-2 $BACKEND_IP_2:8080 check
I am using Docker’s official haproxy base image. And every time I run the container I get this error: Starting frontend www: cannot bind socket [10.15.0.40:80]. I can just bind the front-end with * but I just want it to bind to the anchor ip address then utilize the floating ip for high availability.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×