Also, to add to this -- I tried creating a haproxy.service file, like - /usr/lib/systemd/system/haproxy.service. and I added the contens below like this:
[Unit] Description=HAProxy Load Balancer After=network.target [Service] ExecStartPre=/usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -c -q ExecStart=/usr/local/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid ExecReload=/bin/kill -USR2 $MAINPID KillMode=mixed Restart=always [Install] WantedBy=multi-user.target after this I did a 'systemctl daemon-reload' . When I try to start haproxy now, I get this error ( see below ) : root@crsplabnet2 sbin]# systemctl status haproxy â— haproxy.service - HAProxy Load Balancer Loaded: loaded (/usr/lib/systemd/system/haproxy.service; disabled; vendor preset: disabled) Active: failed (Result: start-limit) since Mon 2018-10-22 16:49:07 PDT; 7s ago Process: 6850 ExecStart*=/usr/local/sbin/haproxy-systemd-wrapper *-f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid (code=exited, status=203/EXEC) Process: 6847 ExecStartPre=/usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -c -q (code=exited, status=0/SUCCESS) Main PID: 6850 (code=exited, status=203/EXEC) Oct 22 16:49:07 crsplabnet2 systemd[1]: Unit haproxy.service entered failed state. Oct 22 16:49:07 crsplabnet2 systemd[1]: haproxy.service failed. Oct 22 16:49:07 crsplabnet2 systemd[1]: haproxy.service holdoff time over, scheduling restart. Oct 22 16:49:07 crsplabnet2 systemd[1]: start request repeated too quickly for haproxy.service Oct 22 16:49:07 crsplabnet2 systemd[1]: Failed to start HAProxy Load Balancer. Oct 22 16:49:07 crsplabnet2 systemd[1]: Unit haproxy.service entered failed state. /usr/local/sbin/haproxy-systemd-wrapper , of . course, does not exist, hence the command fails . I am not sure how to create that wrapper. I looked into a recently downloaded haproxy rpm , I did not see one there as well . On Mon, Oct 22, 2018 at 4:47 PM Gibson, Brian (IMS) <gibs...@imsweb.com> wrote: > Can you reply with the output of haproxy -vv > > Need to know your compile options. > > Sent from Nine<http://www.9folders.com/> > ________________________________ > From: Imam Toufique <techie...@gmail.com> > Sent: Monday, October 22, 2018 7:45 PM > To: haproxy > Subject: HAproxy fails to start in CentOS with 'systemctl reload' ? > > Hi, > > I ran into this twice in last 2 days, where HAproxy fails to start in > centOS 7.5. I compiled the latest stable from source and it did not have > any startup scripts in the tarball that I downloaded. So, I broke up an > older RPM file from fedora and used it /etc/init.d/haproxy script. It > works fine for stop/start/restart , etc. -- but I noticed that systemd is > killing haproxy , mostl likely on 'reload' . > > Here is 'systemctl status haproxy' output: > > haproxy.service - SYSV: HA-Proxy is a TCP/HTTP reverse proxy which is > particularly suited for high availability environments. > Loaded: loaded (/etc/rc.d/init.d/haproxy; bad; vendor preset: disabled) > Active: failed (Result: signal) since Mon 2018-10-22 03:45:01 PDT; 6h > ago > Docs: man:systemd-sysv-generator(8) > Process: 5939 ExecStop=/etc/rc.d/init.d/haproxy stop (code=exited, > status=0/SUCCESS) > Process: 5930 ExecReload=/etc/rc.d/init.d/haproxy reload (code=exited, > status=0/SUCCESS) > Process: 5387 ExecStart=/etc/rc.d/init.d/haproxy start (code=exited, > status=0/SUCCESS) > Main PID: 5937 (code=killed, signal=KILL) > CGroup: /system.slice/haproxy.service > > Oct 21 19:14:29 crsplabnet2 haproxy[5395]: Proxy http_front started. > Oct 21 19:14:29 crsplabnet2 haproxy[5387]: Starting haproxy: [ OK ] > Oct 21 19:14:29 crsplabnet2 systemd[1]: Started SYSV: HA-Proxy is a > TCP/HTTP reverse proxy which is particularly suited for high availability > environments.. > Oct 22 03:45:01 crsplabnet2 haproxy[5936]: Proxy http_front started. > Oct 22 03:45:01 crsplabnet2 haproxy[5936]: Proxy http_front started. > Oct 22 03:45:01 crsplabnet2 systemd[1]: Reloaded SYSV: HA-Proxy is a > TCP/HTTP reverse proxy which is particularly suited for high availability > environments.. > Oct 22 03:45:01 crsplabnet2 systemd[1]: haproxy.service: main process > exited, code=killed, status=9/KILL > Oct 22 03:45:01 crsplabnet2 haproxy[5939]: Shutting down haproxy: [FAILED] > Oct 22 03:45:01 crsplabnet2 systemd[1]: Unit haproxy.service entered > failed state. > Oct 22 03:45:01 crsplabnet2 systemd[1]: haproxy.service failed. > > > Is there a different way this should be setup in centOS7.5 ? Some posts in > GGL suggests a systemd-wrapper for HAproxy, but I do not see that in source > tarball or I can't find it anywhere else. > > Any suggestion would be very helpful. > > Thanks. > > > > ________________________________ > > Information in this e-mail may be confidential. It is intended only for > the addressee(s) identified above. If you are not the addressee(s), or an > employee or agent of the addressee(s), please note that any dissemination, > distribution, or copying of this communication is strictly prohibited. If > you have received this e-mail in error, please notify the sender of the > error. > -- Regards, *Imam Toufique* *213-700-5485*