1

nginx.service failed to start at boot because eth0:0 is not yet configured : nginx is IP-based configured.

I have enabled systemd-networkd-wait-online.service and added it in the unit wait section but it does not seem to be enough.

eth0:0 is configured at boot like the rest of the local network.

What do I need to do to make this work?

8
  • Post your nginx.service file. Commented Apr 6, 2018 at 17:29
  • 1
    And, what do you mean by eth0:0? That looks like an obsolete interface alias, which you should never see on a Linux system from the last decade or so. Commented Apr 6, 2018 at 18:29
  • 1
    I have never used systemd-networkd-wait-online.service nor systemd-networkd.service, but when I have a service that has an issue like this i use After=network-online.target in the service unit. Commented Apr 6, 2018 at 23:20
  • @GracefulRestart that was it ! Thanks. I found systemd-networkd-wait-online in the docs but I must have misunderstood its use. After=network-online.target works just fine : put it as an answer I will approve it. :)
    – John Doe
    Commented Apr 7, 2018 at 10:04
  • @Michael Hampton eth0:0 is a virtual interface.
    – John Doe
    Commented Apr 7, 2018 at 10:06

2 Answers 2

2

I believe the systemd-networkd-wait-online.service unit requires that your network is managed by systemd-networkd.service and I do not remember that being setup in any of the recent distributions I use.

As per my comment, anytime I had a service running under systemd that tries to start before the network is ready, I just need to add After=network-online.target in the service unit to make sure the service waits until the network is ready.

0

Tell the nginx vHost to listen on the specific IP. Nginx doesn’t care about the interface, after all you listen on IP and of course ports. As long as your alias is set up and the IP is routed correctly then nginx can listen on it.

I hope that helps.

tl;dr nginx doesn’t care, it just wants to know which IP

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .