Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

haproxy.conf.erb stats directive makes haproxy service unavailable (service down) #313

Open
NVitanovic opened this issue Dec 26, 2017 · 0 comments

Comments

@NVitanovic
Copy link
Contributor

NVitanovic commented Dec 26, 2017

When service is started/restarted this message appears on status.

root@lb1:~# service haproxy status
● haproxy.service - HAProxy Load Balancer
   Loaded: loaded (/lib/systemd/system/haproxy.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Tue 2017-12-26 06:24:08 EST; 16s ago
     Docs: man:haproxy(1)
           file:/usr/share/doc/haproxy/configuration.txt.gz
  Process: 6055 ExecStart=/usr/sbin/haproxy-systemd-wrapper -f ${CONFIG} -p /run/haproxy.pid $EXTRAOPTS (code=exited, status=0/SUCCESS)
  Process: 6051 ExecStartPre=/usr/sbin/haproxy -f ${CONFIG} -c -q (code=exited, status=0/SUCCESS)
 Main PID: 6055 (code=exited, status=0/SUCCESS)

Dec 26 06:24:08 lb1 systemd[1]: haproxy.service: Service hold-off time over, scheduling restart.
Dec 26 06:24:08 lb1 systemd[1]: Stopped HAProxy Load Balancer.
Dec 26 06:24:08 lb1 systemd[1]: haproxy.service: Start request repeated too quickly.
Dec 26 06:24:08 lb1 systemd[1]: Failed to start HAProxy Load Balancer.

More detailed error when haproxy is run in debug mode:

root@lb1:~# haproxy -f /etc/haproxy/haproxy.cfg -d
[WARNING] 359/063924 (6754) : parsing [/etc/haproxy/haproxy.cfg:91] : 'balance' ignored because frontend 'ftpcluster' has no backend capability.
[WARNING] 359/063924 (6754) : parsing [/etc/haproxy/haproxy.cfg:93] : 'stick' ignored because frontend 'ftpcluster' has no backend capability.
Available polling systems :
      epoll : pref=300,  test result OK
       poll : pref=200,  test result OK
     select : pref=150,  test result FAILED
Total: 3 (2 usable), will use epoll.
Using epoll() as the polling mechanism.
[ALERT] 359/063924 (6754) : Starting frontend GLOBAL: error when trying to preserve previous UNIX socket [/var/run/haproxy]

Solution is to remove/comment the following lines in haproxy.conf.erb:

stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
stats socket /var/run/haproxy

After that service starts without problems.

NVitanovic added a commit to NVitanovic/puppet-atomia that referenced this issue Dec 27, 2017
branislavvukelic pushed a commit that referenced this issue Dec 27, 2017
* replaced heartbeat with keepalived, added configuration files and scripts that are needed for the transition

* nscd service disabled on fsagent as per request

* fixes issue #313

* keepalived template updated with proper variable name

* removed ipalias as not needed anymore, updated acme agreement..

* added checks if services are installed in keeplalived.conf also added missing port for mail in haproxy

* enabled ssh cluster and added dependencies that were needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant