# Starting frontend GLOBAL: cannot bind socket \[127.0.0.1:14567\]

**URL:** <https://discuss.elastic.co/t/starting-frontend-global-cannot-bind-socket-127-0-0-1-14567/116715>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [January 23, 2018, 4:56pm UTC](https://discuss.elastic.co/t/starting-frontend-global-cannot-bind-socket-127-0-0-1-14567/116715 "2018-01-23T16:56:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [January 23, 2018, 4:56pm UTC](https://discuss.elastic.co/t/starting-frontend-global-cannot-bind-socket-127-0-0-1-14567/116715/1 "2018-01-23T16:56:28Z")

</div>

I'm trying to follow [HAProxy module | Metricbeat Reference [6.1] | Elastic](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-haproxy.html), specifically part:

> place this statement under the global or default section of the haproxy config:  
> stats socket 127.0.0.1:14567

I've tried placing above statement into `global` or `default`, followed by restart of `haproxy.service`, however I haproxy.service fails to run with following message:

`Jan 23 11:50:17 X.X.X haproxy-systemd-wrapper[12212]: [ALERT] 022/115017 (12213) : Starting frontend GLOBAL: cannot bind socket [127.0.0.1:14567]`

software stack:

```
# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.4 (Maipo)
# rpm -q metricbeat
metricbeat-6.1.2-1.x86_64
# rpm -q haproxy
haproxy-1.5.18-6.el7.x86_64
# 

```

Please advise.

---

<div class="post-metadata">

**Author:** ![tudor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tudor/32/3753_2.png) [@tudor](https://discuss.elastic.co/u/tudor)\
**Post date:** [January 23, 2018, 8:41pm UTC](https://discuss.elastic.co/t/starting-frontend-global-cannot-bind-socket-127-0-0-1-14567/116715/2 "2018-01-23T20:41:29Z")

</div>

It sounds like netstat cannot bind on that port. Perhaps the port is used by another process? You can check with `netstat -apn`.

---

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [January 23, 2018, 9:07pm UTC](https://discuss.elastic.co/t/starting-frontend-global-cannot-bind-socket-127-0-0-1-14567/116715/3 "2018-01-23T21:07:08Z")

</div>

@tudor, haha, I should have include that to begin with, however since error did not say port is already in use, I thought this would not come up, I was wrong...

```
# netstat -apn | grep 14567
#

```

let me also include my interface as well, just in case if someone will think it's missing:

```
# ip addr show lo 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
#
```

---

<div class="post-metadata">

**Author:** ![tudor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tudor/32/3753_2.png) [@tudor](https://discuss.elastic.co/u/tudor)\
**Post date:** [January 24, 2018, 10:00am UTC](https://discuss.elastic.co/t/starting-frontend-global-cannot-bind-socket-127-0-0-1-14567/116715/4 "2018-01-24T10:00:37Z")

</div>

Hmm, not sure what is wrong. What version of HAproxy do you have?

---

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [January 24, 2018, 9:44pm UTC](https://discuss.elastic.co/t/starting-frontend-global-cannot-bind-socket-127-0-0-1-14567/116715/5 "2018-01-24T21:44:43Z")

</div>

@tudor

```
# haproxy -v
HA-Proxy version 1.5.18 2016/05/10
Copyright 2000-2016 Willy Tarreau <willy@haproxy.org>

#
```

---

<div class="post-metadata">

**Author:** ![tudor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tudor/32/3753_2.png) [@tudor](https://discuss.elastic.co/u/tudor)\
**Post date:** [January 25, 2018, 1:18pm UTC](https://discuss.elastic.co/t/starting-frontend-global-cannot-bind-socket-127-0-0-1-14567/116715/6 "2018-01-25T13:18:34Z")

</div>

We've tested the module with haproxy 1.6, and the [haproxy changelog](https://www.haproxy.org/download/1.6/src/CHANGELOG) seems to indicate that the `stats socket` command is new in 1.6, see the line `- MINOR: cli: new stats socket command: show servers state`.

It might be that 1.5 just needs a different configuration in haproxy, but I'm not sure.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 22, 2018, 1:21pm UTC](https://discuss.elastic.co/t/starting-frontend-global-cannot-bind-socket-127-0-0-1-14567/116715/7 "2018-02-22T13:21:15Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
