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

**URL:** <https://discourse.haproxy.org/t/unable-to-bind-to-two-digit-and-three-digit-port-in-my-local-macbook-pro/2444>\
**Category:** Help!\
**Created:** [May 2, 2018, 3:40pm UTC](https://discourse.haproxy.org/t/unable-to-bind-to-two-digit-and-three-digit-port-in-my-local-macbook-pro/2444 "2018-05-02T15:40:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bharathkumar](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@bharathkumar](https://discourse.haproxy.org/u/bharathkumar)\
**Post date:** [May 2, 2018, 3:40pm UTC](https://discourse.haproxy.org/t/unable-to-bind-to-two-digit-and-three-digit-port-in-my-local-macbook-pro/2444/1 "2018-05-02T15:40:39Z")

</div>

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:**

global  
defaults  
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](http://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](http://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 [0.0.0.0:81]  
[ALERT] 121/170804 (2148) : Starting proxy kibana: cannot bind socket [0.0.0.0:84]

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [May 2, 2018, 6:07pm UTC](https://discourse.haproxy.org/t/unable-to-bind-to-two-digit-and-three-digit-port-in-my-local-macbook-pro/2444/2 "2018-05-02T18:07:57Z")

</div>

You need to start haproxy with root privileges.

---

<div class="post-metadata">

**Author:** ![bharathkumar](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@bharathkumar](https://discourse.haproxy.org/u/bharathkumar)\
**Post date:** [May 3, 2018, 7:48am UTC](https://discourse.haproxy.org/t/unable-to-bind-to-two-digit-and-three-digit-port-in-my-local-macbook-pro/2444/3 "2018-05-03T07:48:46Z")

</div>

@lukastribus wow thank you it worked like a charm 🙂
