Re: Need help to reolsve haproxy issue

2017-01-23 Thread Praveen Koppula
 Sorry for the late reply, I was on unplanned leave.

What I observed in my investigation, when I commented below line it's
working as expected. Means even after reboot the machine the haproxy
service get started automatically.
#stats socket /etc/haproxy/haproxysock level admin
I'm not sure what is the significance of this line.
Can we proceed with this in our configuration or will it cause any
issues further?

NOTE : I couldn't find haproxy-wrapper under below location
/usr/sbin> ls -ltr *haproxy*
-rwxr-xr-x 1 root root  35152 Sep  3  2014 haproxy-halog
-rwxr-xr-x 1 root root 788672 Sep  3  2014 haproxy
lrwxrwxrwx 1 root root 19 Jan  9 01:47 rchaproxy -> /etc/init.d/haproxy

Thanks in advance.

On Mon, Jan 16, 2017 at 11:43 AM, Aaron West  wrote:
> I've not personally had any issues with systemd which I know doesn't mean
> there isn't any... However, on closer inspection, it gets started through a
> wrapper "haproxy-systemd-wrapper" for me :
>
> [Unit]
> Description=HAProxy Load Balancer
> After=network.target
>
> [Service]
> ExecStartPre=/usr/local/sbin/haproxy -f /etc/haproxy/haproxy.cfg -c -q
> ExecStart=/usr/local/sbin/haproxy-systemd-wrapper -f
> /etc/haproxy/haproxy.cfg -$
> ExecReload=/bin/kill -USR2 $MAINPID
> KillMode=mixed
> Restart=always
>
> [Install]
> WantedBy=multi-user.target
>
> So definitely check if you are using that wrapper or not if systemd is being
> used.
>
> Otherwise, my feeling is that for whatever reason you cannot access the
> socket previously created due to permissions... I mean I can get the same
> error trying to start HAproxy as an unprivileged user who cannot write to
> the file/directory.
>
> Aaron West
>
> Loadbalancer.org Limited
> +44 (0)330 380 1064
> www.loadbalancer.org
>
> On 16 January 2017 at 16:21, Baptiste  wrote:
>>
>> Might be a systemd dependency issue, where the socket is not created
>> before the process is started.
>>
>> Baptiste
>>
>> On Mon, Jan 16, 2017 at 4:46 PM, Aaron West 
>> wrote:
>>>
>>> Hi Praveen,
>>>
>>> Am I right in assuming it's a socket for the stats page? Also what user
>>> is starting HAproxy because maybe it doesn't have permissions to create the
>>> socket?
>>>
>>> We might need your whole config or at least the GLOBAL section...
>>>
>>> Aaron West
>>>
>>> Loadbalancer.org Limited
>>> +44 (0)330 380 1064
>>> www.loadbalancer.org
>>>
>>> On 16 January 2017 at 15:38, Praveen Koppula
>>>  wrote:

 Some content was missing. Adding again.

 When we reboot our machine (Where haproxy installed) teh haproxy going
 to be down and it's not starting after machine boot.
 When we force to start haproxy service getting below error.
 Error: Starting haproxy [ALERT] 047/083514 : Starting frontend GLOBAL:
 error when trying to preserve previous UNIX socket
 [/etc/haproxy/haproxysock] startproc: exit status of parent of
 /usr/sbin/haproxy: 1 Failed

 On Mon, Jan 16, 2017 at 10:32 AM, Praveen Koppula
  wrote:
>
> Can you please help me on this.
>
> Haproxy version is : 1.5.4-2.1
>
> Thanks in advance


>>>
>>
>



Re: Need help to reolsve haproxy issue

2017-01-16 Thread Aaron West
I've not personally had any issues with systemd which I know doesn't mean
there isn't any... However, on closer inspection, it gets started through a
wrapper "haproxy-systemd-wrapper" for me :

[Unit]
Description=HAProxy Load Balancer
After=network.target

[Service]
ExecStartPre=/usr/local/sbin/haproxy -f /etc/haproxy/haproxy.cfg -c -q
ExecStart=/usr/local/sbin/haproxy-systemd-wrapper -f
/etc/haproxy/haproxy.cfg -$
ExecReload=/bin/kill -USR2 $MAINPID
KillMode=mixed
Restart=always

[Install]
WantedBy=multi-user.target

So definitely check if you are using that wrapper or not if systemd is
being used.

Otherwise, my feeling is that for whatever reason you cannot access the
socket previously created due to permissions... I mean I can get the same
error trying to start HAproxy as an unprivileged user who cannot write to
the file/directory.

Aaron West

Loadbalancer.org Limited
+44 (0)330 380 1064
www.loadbalancer.org

On 16 January 2017 at 16:21, Baptiste  wrote:

> Might be a systemd dependency issue, where the socket is not created
> before the process is started.
>
> Baptiste
>
> On Mon, Jan 16, 2017 at 4:46 PM, Aaron West 
> wrote:
>
>> Hi Praveen,
>>
>> Am I right in assuming it's a socket for the stats page? Also what user
>> is starting HAproxy because maybe it doesn't have permissions to create the
>> socket?
>>
>> We might need your whole config or at least the GLOBAL section...
>>
>> Aaron West
>>
>> Loadbalancer.org Limited
>> +44 (0)330 380 1064
>> www.loadbalancer.org
>>
>> On 16 January 2017 at 15:38, Praveen Koppula <
>> praveenkumarkopp...@gmail.com> wrote:
>>
>>> Some content was missing. Adding again.
>>>
>>> When we reboot our machine (Where haproxy installed) teh haproxy going
>>> to be down and it's not starting after machine boot.
>>> When we force to start haproxy service getting below error.
>>> Error: Starting haproxy [ALERT] 047/083514 : Starting frontend GLOBAL:
>>> error when trying to preserve previous UNIX socket
>>> [/etc/haproxy/haproxysock] startproc: exit status of parent of
>>> /usr/sbin/haproxy: 1 Failed
>>>
>>> On Mon, Jan 16, 2017 at 10:32 AM, Praveen Koppula <
>>> praveenkumarkopp...@gmail.com> wrote:
>>>
 Can you please help me on this.

 Haproxy version is : 1.5.4-2.1

 Thanks in advance

>>>
>>>
>>
>


Re: Need help to reolsve haproxy issue

2017-01-16 Thread Baptiste
Might be a systemd dependency issue, where the socket is not created before
the process is started.

Baptiste

On Mon, Jan 16, 2017 at 4:46 PM, Aaron West  wrote:

> Hi Praveen,
>
> Am I right in assuming it's a socket for the stats page? Also what user is
> starting HAproxy because maybe it doesn't have permissions to create the
> socket?
>
> We might need your whole config or at least the GLOBAL section...
>
> Aaron West
>
> Loadbalancer.org Limited
> +44 (0)330 380 1064
> www.loadbalancer.org
>
> On 16 January 2017 at 15:38, Praveen Koppula <
> praveenkumarkopp...@gmail.com> wrote:
>
>> Some content was missing. Adding again.
>>
>> When we reboot our machine (Where haproxy installed) teh haproxy going to
>> be down and it's not starting after machine boot.
>> When we force to start haproxy service getting below error.
>> Error: Starting haproxy [ALERT] 047/083514 : Starting frontend GLOBAL:
>> error when trying to preserve previous UNIX socket
>> [/etc/haproxy/haproxysock] startproc: exit status of parent of
>> /usr/sbin/haproxy: 1 Failed
>>
>> On Mon, Jan 16, 2017 at 10:32 AM, Praveen Koppula <
>> praveenkumarkopp...@gmail.com> wrote:
>>
>>> Can you please help me on this.
>>>
>>> Haproxy version is : 1.5.4-2.1
>>>
>>> Thanks in advance
>>>
>>
>>
>


Re: Need help to reolsve haproxy issue

2017-01-16 Thread Aaron West
Hi Praveen,

Am I right in assuming it's a socket for the stats page? Also what user is
starting HAproxy because maybe it doesn't have permissions to create the
socket?

We might need your whole config or at least the GLOBAL section...

Aaron West

Loadbalancer.org Limited
+44 (0)330 380 1064
www.loadbalancer.org

On 16 January 2017 at 15:38, Praveen Koppula 
wrote:

> Some content was missing. Adding again.
>
> When we reboot our machine (Where haproxy installed) teh haproxy going to
> be down and it's not starting after machine boot.
> When we force to start haproxy service getting below error.
> Error: Starting haproxy [ALERT] 047/083514 : Starting frontend GLOBAL:
> error when trying to preserve previous UNIX socket
> [/etc/haproxy/haproxysock] startproc: exit status of parent of
> /usr/sbin/haproxy: 1 Failed
>
> On Mon, Jan 16, 2017 at 10:32 AM, Praveen Koppula <
> praveenkumarkopp...@gmail.com> wrote:
>
>> Can you please help me on this.
>>
>> Haproxy version is : 1.5.4-2.1
>>
>> Thanks in advance
>>
>
>


Re: Need help to reolsve haproxy issue

2017-01-16 Thread Aaron West
There are some very knowledgeable people on this list so I'm sure someone
can help, however, what might the problem actually be?


Aaron West

Loadbalancer.org Limited
+44 (0)330 380 1064
www.loadbalancer.org

On 16 January 2017 at 15:32, Praveen Koppula 
wrote:

> Can you please help me on this.
>
> Haproxy version is : 1.5.4-2.1
>
> Thanks in advance
>


Re: Need help to reolsve haproxy issue

2017-01-16 Thread Praveen Koppula
Some content was missing. Adding again.

When we reboot our machine (Where haproxy installed) teh haproxy going to
be down and it's not starting after machine boot.
When we force to start haproxy service getting below error.
Error: Starting haproxy [ALERT] 047/083514 : Starting frontend GLOBAL:
error when trying to preserve previous UNIX socket
[/etc/haproxy/haproxysock] startproc: exit status of parent of
/usr/sbin/haproxy: 1 Failed

On Mon, Jan 16, 2017 at 10:32 AM, Praveen Koppula <
praveenkumarkopp...@gmail.com> wrote:

> Can you please help me on this.
>
> Haproxy version is : 1.5.4-2.1
>
> Thanks in advance
>


Need help to reolsve haproxy issue

2017-01-16 Thread Praveen Koppula
Can you please help me on this.

Haproxy version is : 1.5.4-2.1

Thanks in advance