Hi Brain,

That seems to have worked!  Thanks!    I did not know the wrapper was not
needed.  Let's see if it dies again ( hopefully not ) .

Thanks again!










On Mon, Oct 22, 2018 at 5:12 PM Gibson, Brian (IMS) <gibs...@imsweb.com>
wrote:

> Ah you don’t need haproxy-systemd-wrapper with 1.8 branch.
>
>
>
> Here is my systemd script I use, note I don’t install in the standard
> location so you will have to tweak it for your environment.
>
>
>
> [Unit]
>
> Description=HAProxy Load Balancer
>
> After=syslog.target network.target
>
>
>
> [Service]
>
> # You can point the environment variable HAPROXY_STATS_SOCKET to a stats
>
> # socket if you want seamless reloads.
>
> Type=notify
>
> Environment="HAPROXY_STATS_SOCKET=/var/run/haproxy.sock"
> "CONFIG=/usr/local/haproxy/conf/haproxy.conf"
> "PIDFILE=/var/run/haproxy-service.pid"
>
> ExecStartPre=/usr/local/haproxy/sbin/haproxy -f $CONFIG -c -q
>
> ExecStart=/usr/local/haproxy/sbin/haproxy -Ws -f $CONFIG -p $PIDFILE
>
> ExecReload=/usr/local/haproxy/sbin/haproxy -f $CONFIG -c -q -x
> $HAPROXY_STATS_SOCKET
>
> ExecReload=/bin/kill -USR2 $MAINPID
>
> KillMode=mixed
>
> Restart=always
>
>
>
> [Install]
>
> WantedBy=multi-user.target
>
>
>
> *From:* Imam Toufique [mailto:techie...@gmail.com]
> *Sent:* Monday, October 22, 2018 8:09 PM
> *To:* Gibson, Brian (IMS) <gibs...@imsweb.com>
> *Cc:* haproxy <haproxy@formilux.org>
> *Subject:* Re: HAproxy fails to start in CentOS with 'systemctl reload' ?
>
>
>
> I recompiled with the SYSTEMD option.
>
>
>
> [root@crsplabnet2 ~]# haproxy -vv
>
> HA-Proxy version 1.8.14-52e4d43 2018/09/20
>
> Copyright 2000-2018 Willy Tarreau <wi...@haproxy.org>
>
>
>
> Build options :
>
>   TARGET  = linux2628
>
>   CPU     = generic
>
>   CC      = gcc
>
>   CFLAGS  = -O2 -g -fno-strict-aliasing -Wdeclaration-after-statement
> -fwrapv -fno-strict-overflow -Wno-unused-label
>
> *  OPTIONS = USE_ZLIB=1 USE_OPENSSL=1 USE_SYSTEMD=1 USE_PCRE=1*
>
>
>
> Default settings :
>
>   maxconn = 2000, bufsize = 16384, maxrewrite = 1024, maxpollevents = 200
>
>
>
> Built with OpenSSL version : OpenSSL 1.0.2k-fips  26 Jan 2017
>
> Running on OpenSSL version : OpenSSL 1.0.2k-fips  26 Jan 2017
>
> OpenSSL library supports TLS extensions : yes
>
> OpenSSL library supports SNI : yes
>
> OpenSSL library supports : SSLv3 TLSv1.0 TLSv1.1 TLSv1.2
>
> Built with transparent proxy support using: IP_TRANSPARENT
> IPV6_TRANSPARENT IP_FREEBIND
>
> Encrypted password support via crypt(3): yes
>
> Built with multi-threading support.
>
> Built with PCRE version : 8.32 2012-11-30
>
> Running on PCRE version : 8.32 2012-11-30
>
> PCRE library supports JIT : no (USE_PCRE_JIT not set)
>
> Built with zlib version : 1.2.7
>
> Running on zlib version : 1.2.7
>
> Compression algorithms supported : identity("identity"),
> deflate("deflate"), raw-deflate("deflate"), gzip("gzip")
>
> Built with network namespace support.
>
>
>
> Available polling systems :
>
>       epoll : pref=300,  test result OK
>
>        poll : pref=200,  test result OK
>
>      select : pref=150,  test result OK
>
> Total: 3 (3 usable), will use epoll.
>
>
>
> Available filters :
>
>         [SPOE] spoe
>
>         [COMP] compression
>
>         [TRACE] trace
>
>
>
>
>
> But still no luck , I still get the error below:
>
>
>
> [root@crsplabnet2 haproxy-1.8.14]# systemctl status haproxy.service
>
> â— 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 17:06:05 PDT;
> 10s ago
>
>   Process: 7598 ExecStart=/usr/local/sbin/haproxy-systemd-wrapper -f
> /etc/haproxy/haproxy.cfg -p /run/haproxy.pid (code=exited, status=203/EXEC)
>
>   Process: 7595 ExecStartPre=/usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg
> -c -q (code=exited, status=0/SUCCESS)
>
>  Main PID: 7598 (code=exited, status=203/EXEC)
>
>
>
> Oct 22 17:06:05 crsplabnet2 systemd[1]: Unit haproxy.service entered
> failed state.
>
> Oct 22 17:06:05 crsplabnet2 systemd[1]: haproxy.service failed.
>
> Oct 22 17:06:05 crsplabnet2 systemd[1]: haproxy.service holdoff time over,
> scheduling restart.
>
> Oct 22 17:06:05 crsplabnet2 systemd[1]: start request repeated too quickly
> for haproxy.service
>
> Oct 22 17:06:05 crsplabnet2 systemd[1]: Failed to start HAProxy Load
> Balancer.
>
> Oct 22 17:06:05 crsplabnet2 systemd[1]: Unit haproxy.service entered
> failed state.
>
> Oct 22 17:06:05 crsplabnet2 systemd[1]: haproxy.service failed.
>
>
>
>
>
> This binary ( or may be script ) /usr/local/sbin/haproxy-systemd-wrapper
> is not there.
>
>
>
> --imam
>
>
>
>
>
> On Mon, Oct 22, 2018 at 4:56 PM Gibson, Brian (IMS) <gibs...@imsweb.com>
> wrote:
>
> I think you need to add USE_SYSTEMD=1 to your compile.
>
> Sent from Nine<http://www.9folders.com/>
> ________________________________
> From: Imam Toufique <techie...@gmail.com>
> Sent: Monday, October 22, 2018 7:49 PM
> To: Gibson, Brian (IMS)
> Cc: haproxy
> Subject: Re: HAproxy fails to start in CentOS with 'systemctl reload' ?
>
> Thanks Brian, please see below:
>
> [root@crsplabnet2 sbin]# /usr/sbin/haproxy -vv
> HA-Proxy version 1.8.14-52e4d43 2018/09/20
> Copyright 2000-2018 Willy Tarreau <wi...@haproxy.org<mailto:
> wi...@haproxy.org>>
>
> Build options :
>   TARGET  = linux2628
>   CPU     = generic
>   CC      = gcc
>   CFLAGS  = -O2 -g -fno-strict-aliasing -Wdeclaration-after-statement
> -fwrapv -fno-strict-overflow -Wno-unused-label
>   OPTIONS = USE_ZLIB=1 USE_OPENSSL=1 USE_PCRE=1
>
> Default settings :
>   maxconn = 2000, bufsize = 16384, maxrewrite = 1024, maxpollevents = 200
>
> Built with OpenSSL version : OpenSSL 1.0.2k-fips  26 Jan 2017
> Running on OpenSSL version : OpenSSL 1.0.2k-fips  26 Jan 2017
> OpenSSL library supports TLS extensions : yes
> OpenSSL library supports SNI : yes
> OpenSSL library supports : SSLv3 TLSv1.0 TLSv1.1 TLSv1.2
> Built with transparent proxy support using: IP_TRANSPARENT
> IPV6_TRANSPARENT IP_FREEBIND
> Encrypted password support via crypt(3): yes
> Built with multi-threading support.
> Built with PCRE version : 8.32 2012-11-30
> Running on PCRE version : 8.32 2012-11-30
> PCRE library supports JIT : no (USE_PCRE_JIT not set)
> Built with zlib version : 1.2.7
> Running on zlib version : 1.2.7
> Compression algorithms supported : identity("identity"),
> deflate("deflate"), raw-deflate("deflate"), gzip("gzip")
> Built with network namespace support.
>
> Available polling systems :
>       epoll : pref=300,  test result OK
>        poll : pref=200,  test result OK
>      select : pref=150,  test result OK
> Total: 3 (3 usable), will use epoll.
>
> Available filters :
>         [SPOE] spoe
>         [COMP] compression
>         [TRACE] trace
>
>
>
>
> On Mon, Oct 22, 2018 at 4:47 PM Gibson, Brian (IMS) <gibs...@imsweb.com
> <mailto: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<mailto: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
>
> ________________________________
>
> 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*
>
> ------------------------------
>
> 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*

Reply via email to