Welcome! Log In Create A New Profile

Advanced

haproxy startup at boot too quick

Posted by Bill Waggoner 
Bill Waggoner
haproxy startup at boot too quick
May 08, 2018 02:50AM
I feel I should tap the screen and say "Is this on?" I just signed up for
the list but the haproxy+help address didn't supply much info at all. SO
I'll try this ...

I just moved my running haproxy instance over to a new Intel NUC box
running Ubuntu Server 18.04. SO much faster that the Raspberry Pi that I
was running on before. It's obviously not a "critical" system but it's
important to me ...

Anyway, when the system boots haproxy fails to start. Unfortunately I
forgot to save the systemctl status message but the impression I get is
that it's starting too soon.

What I think I narrowed it down to is in the systemd haproxy.service config
it says After=network.service rsyslog.service

I think that should be:

Requires=network-online.target
After=network-online.target rsyslog.service

I've made that change but haven't tested it yet. Seems like a logical
change to me.

I'd appreciate any comments ...

Bill Waggoner
--
Bill Waggoner
admin@greybeard.org
{Even Old Dogs can learn new tricks!}
Kevin Decherf
Re: haproxy startup at boot too quick
May 08, 2018 02:50AM
Hello,

On 8 May 2018 02:32:01 CEST, Bill Waggoner <[email protected]> wrote:

>Anyway, when the system boots haproxy fails to start. Unfortunately I
>forgot to save the systemctl status message but the impression I get is
>that it's starting too soon.

You can find all past logs of your service using `journalctl -u haproxy.service`. If journal persistence is off you'll not be able to look at logs sent before the last boot.


--
Sent from my mobile. Please excuse my brevity.
Bill Waggoner
Re: haproxy startup at boot too quick
May 08, 2018 03:00AM
On Mon, May 7, 2018 at 8:44 PM Kevin Decherf <[email protected]> wrote:

> Hello,
>
> On 8 May 2018 02:32:01 CEST, Bill Waggoner <[email protected]> wrote:
>
> >Anyway, when the system boots haproxy fails to start. Unfortunately I
> >forgot to save the systemctl status message but the impression I get is
> >that it's starting too soon.
>
> You can find all past logs of your service using `journalctl -u
> haproxy.service`. If journal persistence is off you'll not be able to look
> at logs sent before the last boot.
>
>
> --
> Sent from my mobile. Please excuse my brevity.
>

Thank you, that was very helpful. I am new to systemd so please forgive my
lack of knowledge.

Looking at the messages it looks like one server was failing to start. That
one happens to have a name instead of a static address in the server
definition. My guess is that DNS isn't available yet when haproxy was
starting and the retries are so quick that it didn't have time to recover.

I'll simply change that to a literal IP address as all the others are.

Thanks!

Bill Waggoner
--
Bill Waggoner
admin@greybeard.org
{Even Old Dogs can learn new tricks!}
Dave Chiluk
Re: haproxy startup at boot too quick
May 15, 2018 06:30AM
Assuming you are running an Ubuntu archive version of haproxy you should
consider opening a bug in launchpad as well.
https://launchpad.net/ubuntu/+source/haproxy/+filebug

It sounds like there's a missing dependency in the unit file against DNS or
network, but I haven't looked into it other than what you've mentioned here.

Dave.

On Mon, May 7, 2018 at 7:57 PM Bill Waggoner <[email protected]> wrote:

> On Mon, May 7, 2018 at 8:44 PM Kevin Decherf <[email protected]> wrote:
>
>> Hello,
>>
>> On 8 May 2018 02:32:01 CEST, Bill Waggoner <[email protected]> wrote:
>>
>> >Anyway, when the system boots haproxy fails to start. Unfortunately I
>> >forgot to save the systemctl status message but the impression I get is
>> >that it's starting too soon.
>>
>> You can find all past logs of your service using `journalctl -u
>> haproxy.service`. If journal persistence is off you'll not be able to look
>> at logs sent before the last boot.
>>
>>
>> --
>> Sent from my mobile. Please excuse my brevity.
>>
>
> Thank you, that was very helpful. I am new to systemd so please forgive my
> lack of knowledge.
>
> Looking at the messages it looks like one server was failing to start.
> That one happens to have a name instead of a static address in the server
> definition. My guess is that DNS isn't available yet when haproxy was
> starting and the retries are so quick that it didn't have time to recover.
>
> I'll simply change that to a literal IP address as all the others are.
>
> Thanks!
>
> Bill Waggoner
> --
> Bill Waggoner
> admin@greybeard.org
> {Even Old Dogs can learn new tricks!}
>
Sorry, only registered users may post in this forum.

Click here to login