HAProxy community

Unable to bind to two digit and three digit port in my local macbook pro


Hi Guys,

I have some strange error coming from my haproxy.cfg not sure what happened with my mac…i scanned all the ports nothing is listening…

only four digit bind ports only working inside my haproxy.cfg file, no two digit and three digit ports are working…I don’t know what happened could you please any one help me to solve this?

here is my haproxy.cfg in my local

working haproxy.cfg:

mode http
maxconn 500
log global
option httplog
option redispatch
retries 2
timeout queue 1m
timeout connect 15s
timeout client 1m
timeout server 1m
timeout check 10s
timeout http-request 15s
timeout http-keep-alive 301s # DEVOPS-258 Suggested Setting by Akamai

listen stats
bind *:1936
http-request del-header Proxy
bind-process 1
mode http
stats enable
stats hide-version
stats realm Haproxy\ Statistics
stats uri /

listen sensu
bind *:8181 // if i use only 81 getting error , not only 81 any port between 10-1000
server sensu sensu.test.net:10101 check
listen kibana
bind *:8484 . // if i use only 84 getting error, not only 84 any port between 10-1000
server kibana kibana.test.net:10118 check

when i use any two digit or three digit bind port from 10-999 it is not working getiing below error…

[ALERT] 121/170804 (2148) : Starting proxy sensu: cannot bind socket []
[ALERT] 121/170804 (2148) : Starting proxy kibana: cannot bind socket []


You need to start haproxy with root privileges.


@lukastribus wow thank you it worked like a charm :slight_smile: