Workaround of race condition between systemd and nginx.

Artem S. Povaluhin artem.povaluhin at gmail.com
Wed Dec 30 22:44:43 UTC 2015


Hi!

On 12/30/2015 11:40 PM, Daniel K. wrote:
> I never said it wasn't. I just wanted to express what I had pulled out
> of my hat based on reading the log you provided. That way you can see if
> I'm completely off track, and tell me, and other readers can get the
> context of the conversation more easily.
>
the context is simple.
>
>>> And that, due to using systemd, the nginx service gets started before
>>> the network-interface have been configured with the IP address shown.
>>
>> Yes. And nginx failed to start with *correct* config.
>
> Well, syntactically correct, and logically correct is not the same thing.
>
why this config is correct everywhere except systemd,

> Your config makes nginx try to bind to a non-assigned IP address, which
> fails. A logical error in your config files.
>
> You have two options to fix it.
>
>>> 1) Allow non-local binds
and we have to hack the OS
>>> 2) Configure nginx to listen to *:80
or change it,

in order to not to misconfigure systemd
because of sombody's recommendations?

wbr,
Artem



More information about the nginx-devel mailing list