Skip to content

nginx delayed start #135

Description

@alfs

At node reboot, nginx fails to start because it cannot bind 172.17.0.1:

● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2018-10-11 11:43:01 UTC; 1min 29s ago
     Docs: man:nginx(8)
  Process: 753 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

Oct 11 11:43:00 Monroe000db940d8c4 systemd[1]: Starting A high performance web server and a reverse proxy server...
Oct 11 11:43:01 Monroe000db940d8c4 nginx[753]: nginx: [emerg] bind() to 172.17.0.1:80 failed (99: Cannot assign requested address)

It's because that interface (docker0) is not available when the nginx service starts
Biteback will eventually correct this, but it causes the proxied services at port 88 (/dlb, /modems, etc) to malfunction until biteback has executed.

Suggested fix:

Change /lib/systemd/system/nginx.service

-After=network.target
+After=docker.service

@relet, if you add this to ansible I can test that it works. Not urgent, but an improvement for nodes that often reboot (i.e. vehicular mounted)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions