Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no reply received in time, skipping initial time setting #44

Open
ilyaevseev opened this issue Sep 18, 2017 · 2 comments
Open

no reply received in time, skipping initial time setting #44

ilyaevseev opened this issue Sep 18, 2017 · 2 comments

Comments

@ilyaevseev
Copy link

ilyaevseev commented Sep 18, 2017

Openntpd is started as service under CentOS 7.x after network-online.target is reached.

It seems that DNS resolving is actually not working at this moment, so "ExecStartPre=/bin/ping -qw1c5 time.google.com" returns "Name or service not known".

Openntpd not tries to re-resolve servername and re-send queries. Instead this, it simply waits 15 seconds and reports "no reply received in time, skipping initial time setting". Is it a bug or a feature?

My current workaround:

# /etc/systemd/system/openntpd.service.d/WaitResolverAlive.conf
[Service]
ExecStartPre=/bin/sh -c 'for N in 1 2 3 4 5; do /bin/ping -q -w1 -c3 time.google.com && break; sleep 1; done'
@tofurky
Copy link

tofurky commented Feb 13, 2019

the following fixed things for me on ubuntu 18.10:

# systemctl edit openntpd.service

[Unit]
After=network-online.target nss-lookup.target
Wants=network-online.target

@tofurky
Copy link

tofurky commented Nov 17, 2019

started running into issues with this in ubuntu 19.10 (could be coincidental). anyways, enabling ifupdown-wait-online.service, along with adding the after/wants network-online.target to the openntpd service override, seems to fix things. this of course only matters if you're using ifupdown instead of something like systemd-networkd or networkmanager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants