summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorKonstantin Shalygin <k0ste@k0ste.ru>2024-06-17 14:37:51 +0300
committerGitHub <noreply@github.com>2024-06-17 07:37:51 -0400
commitde9acbb435e3b238d3da8f80ef270718533027d5 (patch)
treed4945f03e495e71af6010da504889d87896a788d /system
parentc09373fe617540d09ae58a15f580e4903f720f34 (diff)
systemd: start `netdata` after network is online (#17906)
systemd: start netdata after network is online Added network-online.target conditions, because currently netdata can start before all IP for bind is avail ``` Jun 15 19:42:03 netdata.example.com netdata[496]: LISTENER: IPv4 bind() on ip '192.168.250.1' port 19999, socktype 1 failed. Jun 15 19:42:03 netdata.example.com netdata[496]: LISTENER: Cannot bind to ip '192.168.250.1', port 19999 ``` P.S.: `wants` is a weak (not hard) dependency
Diffstat (limited to 'system')
-rw-r--r--system/systemd/netdata.service.in3
-rw-r--r--system/systemd/netdata.service.v235.in3
2 files changed, 4 insertions, 2 deletions
diff --git a/system/systemd/netdata.service.in b/system/systemd/netdata.service.in
index 7d15dad776..3ea1f9d8e9 100644
--- a/system/systemd/netdata.service.in
+++ b/system/systemd/netdata.service.in
@@ -3,7 +3,8 @@
Description=Real time performance monitoring
# append here other services you want netdata to wait for them to start
-After=network.target
+After=network.target network-online.target nss-lookup.target
+Wants=network-online.target nss-lookup.target
[Service]
LogNamespace=netdata
diff --git a/system/systemd/netdata.service.v235.in b/system/systemd/netdata.service.v235.in
index 06f03b2699..e2878407ba 100644
--- a/system/systemd/netdata.service.v235.in
+++ b/system/systemd/netdata.service.v235.in
@@ -3,7 +3,8 @@
Description=Real time performance monitoring
# append here other services you want netdata to wait for them to start
-After=network.target
+After=network.target network-online.target nss-lookup.target
+Wants=network-online.target nss-lookup.target
[Service]
LogNamespace=netdata