On 25/11/2014 23:07, Scheidegger, Zachary wrote:

Hello, I am successfully running HAProxy 1.4.24 on CentOS 6. I am upgrading my environment to CentOS 7 and HA-Proxy 1.5. I have configured the replacement load balancer with the same configuration. After installing and enabling the service to start on boot, I attempt to reboot and haproxy does not run on the new install. Running a systemctl status -l haproxy command gives me the following output:

-----------------------------------------------------------------------------

haproxy.service - HAProxy Load Balancer

   Loaded: loaded (/usr/lib/systemd/system/haproxy.service; enabled)

   Active: inactive (dead) since Tue 2014-11-25 14:24:06 PST; 1min 45s ago

Process: 951 ExecStart=/usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid (code=exited, status=0/SUCCESS)

Main PID: 951 (code=exited, status=0/SUCCESS)

   CGroup: /system.slice/haproxy.service

Nov 25 14:24:06 haproxy2 systemd[1]: Starting HAProxy Load Balancer...

Nov 25 14:24:06 haproxy2 systemd[1]: Started HAProxy Load Balancer.

Nov 25 14:24:06 haproxy2 haproxy-systemd-wrapper[951]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds

Nov 25 14:24:06 haproxy2 haproxy-systemd-wrapper[951]: [ALERT] 328/142406 (958) : Starting proxy stats: cannot bind socket [0.0.0.0:1936]

Nov 25 14:24:06 haproxy2 haproxy-systemd-wrapper[951]: haproxy-systemd-wrapper: exit, haproxy RC=256

-----------------------------------------------------------------------------

If I try running haproxy using the following command haproxy starts successfully, balances traffic, and supplies the stats page correctly:

[root@haproxy2 ~]# haproxy -f /etc/haproxy/haproxy.cfg

And I can see the process running:

[root@haproxy2 ~]# pgrep haproxy

2543

-----------------------------------------------------------------------------

The following is the section of the config file that sets up the stats page:

userlist UsersFor_HAProxyStatistics

        group admin users haproxy

        user haproxy insecure-password HA@VmView5

        user stats insecure-password letmein

listen stats *:1936

        mode http

        stats enable

        #stats scope http

        #stats scope www

        #stats scope static

        #stats scope static_httpclose

        #stats realm Haproxy\ Statistics

        stats uri /haproxy?stats

        #stats auth haproxy:HA@VmView5

        stats refresh 20s

        stats show-node

        stats show-legends

        acl AuthOkay_ReadOnly http_auth(UsersFor_HAProxyStatistics)

acl AuthOkay_Admin http_auth_group(UsersFor_HAProxyStatistics) admin

stats http-request auth realm HAProxy-Statistics unless AuthOkay_ReadOnly

        stats admin if AuthOkay_Admin

-----------------------------------------------------------------------------

I am not strong in Linux, but it appears that running it as root works, but running it on startup it does not. Any ideas would be helpful. Thank you!

Sincerely,

Zach Scheidegger

Hi

If you are able to run this as root, then the problem is not with haproxy, but rather the start procedure and that is where you will need to start looking.

Probably better in a Centos7 group on centos.org.

K

--


Trustpay Global Limited is an authorised Electronic Money Institution regulated by the Financial Conduct Authority registration number 900043. Company No 07427913 Registered in England and Wales with registered address 130 Wood Street, London, EC2V 6DL, United Kingdom.

For further details please visit our website at www.trustpayglobal.com.

The information in this email and any attachments are confidential and remain the property of Trustpay Global Ltd unless agreed by contract. It is intended solely for the person to whom or the entity to which it is addressed. If you are not the intended recipient you may not use, disclose, copy, distribute, print or rely on the content of this email or its attachments. If this email has been received by you in error please advise the sender and delete the email from your system. Trustpay Global Ltd does not accept any liability for any personal view expressed in this message.

Reply via email to