View previous topic :: View next topic |
Author |
Message |
Verdazil n00b
Joined: 14 Feb 2019 Posts: 47 Location: One small country ...
|
Posted: Sat Mar 16, 2019 7:33 pm Post subject: [solved] ntp-client does not start at boot time |
|
|
After system boot I can successfully run manually: Code: | # rc-service ntp-client start
* Setting clock via the NTP client 'ntpdate' ... [ ok ] |
But if I add the service to runlevel default, an error occurs at boot time and servive does not start.
How to fix this problem? _________________ GA-Z170X-UD3 / i7-6700K / DDR4 32GB / Radeon RX 570 / TL-WDN4800 / Samsung SSD 850 EVO 250 Gb + WD Green WDC 2 Tb / BenQ BL2711U + LG TV 42LF650V
Last edited by Verdazil on Sun Mar 17, 2019 5:10 am; edited 1 time in total |
|
Back to top |
|
|
freke Veteran
Joined: 23 Jan 2003 Posts: 1029 Location: Somewhere in Denmark
|
Posted: Sat Mar 16, 2019 7:58 pm Post subject: |
|
|
Is dns up/working when ntp-client is run during startup?
You might need:in /etc/conf.d/ntp-client |
|
Back to top |
|
|
Verdazil n00b
Joined: 14 Feb 2019 Posts: 47 Location: One small country ...
|
Posted: Sat Mar 16, 2019 8:17 pm Post subject: |
|
|
freke wrote: | Is dns up/working when ntp-client is run during startup? You might need:in /etc/conf.d/ntp-client |
Yes, this setting initially is set to _________________ GA-Z170X-UD3 / i7-6700K / DDR4 32GB / Radeon RX 570 / TL-WDN4800 / Samsung SSD 850 EVO 250 Gb + WD Green WDC 2 Tb / BenQ BL2711U + LG TV 42LF650V |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54577 Location: 56N 3W
|
Posted: Sat Mar 16, 2019 8:31 pm Post subject: |
|
|
Verdazil,
Please post the exact error message. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Verdazil n00b
Joined: 14 Feb 2019 Posts: 47 Location: One small country ...
|
Posted: Sat Mar 16, 2019 8:43 pm Post subject: |
|
|
Log file: /var/log/syslog
Code: | 16.03.2019 22:19 ivybridge-pc /etc/init.d/ntp-client[4359] ERROR: ntp-client failed to start |
_________________ GA-Z170X-UD3 / i7-6700K / DDR4 32GB / Radeon RX 570 / TL-WDN4800 / Samsung SSD 850 EVO 250 Gb + WD Green WDC 2 Tb / BenQ BL2711U + LG TV 42LF650V |
|
Back to top |
|
|
freke Veteran
Joined: 23 Jan 2003 Posts: 1029 Location: Somewhere in Denmark
|
Posted: Sat Mar 16, 2019 8:46 pm Post subject: |
|
|
You can try looking in /var/log/rc.log too (might need to enable rc-logging in /etc/rc.conf) and/or add -v to NTPOPTS in /etc/conf.d/ntp-client (dunno what -v really adds to logging) |
|
Back to top |
|
|
Verdazil n00b
Joined: 14 Feb 2019 Posts: 47 Location: One small country ...
|
Posted: Sat Mar 16, 2019 8:58 pm Post subject: |
|
|
Log file: /var/log/syslog
Code: | 16.03.2019 22:49 ivybridge-pc ntpdate[4381] name server cannot be used: Temporary failure in name resolution (-3)
16.03.2019 22:49 ivybridge-pc /etc/init.d/ntp-client[4361] ERROR: ntp-client failed to start |
Log file: /var/log/rc.log:
Code: | 16.03.2019 22:53 * Setting clock via the NTP client 'ntpdate' ...
16.03.2019 22:53 * ERROR: ntp-client failed to start |
_________________ GA-Z170X-UD3 / i7-6700K / DDR4 32GB / Radeon RX 570 / TL-WDN4800 / Samsung SSD 850 EVO 250 Gb + WD Green WDC 2 Tb / BenQ BL2711U + LG TV 42LF650V |
|
Back to top |
|
|
freke Veteran
Joined: 23 Jan 2003 Posts: 1029 Location: Somewhere in Denmark
|
Posted: Sat Mar 16, 2019 9:09 pm Post subject: |
|
|
What happens if you set a numeric ip-address for a ntp-server instead of server-names in /etc/conf.d/ntp-client ?
Just to rule out dns-problems at booting. |
|
Back to top |
|
|
Verdazil n00b
Joined: 14 Feb 2019 Posts: 47 Location: One small country ...
|
Posted: Sat Mar 16, 2019 9:25 pm Post subject: |
|
|
I set in /etc/conf.d/ntp-client
Code: | NTPCLIENT_OPTS="-s -v -b -u \
0.172.26.136.19 1.172.26.136.19 \
2.172.26.136.19 3.172.26.136.19" |
Nothing changed. _________________ GA-Z170X-UD3 / i7-6700K / DDR4 32GB / Radeon RX 570 / TL-WDN4800 / Samsung SSD 850 EVO 250 Gb + WD Green WDC 2 Tb / BenQ BL2711U + LG TV 42LF650V |
|
Back to top |
|
|
freke Veteran
Joined: 23 Jan 2003 Posts: 1029 Location: Somewhere in Denmark
|
Posted: Sat Mar 16, 2019 9:31 pm Post subject: |
|
|
It should just be: Code: | NTPCLIENT_OPTS="-s -v -b -u \
172.26.136.19" | Given that 172.26.136.19 is a ntp-server on your lan?
0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org resolves to 4 different servers. |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3940 Location: Hamburg
|
Posted: Sat Mar 16, 2019 9:46 pm Post subject: Re: ntp-client does not start at boot time |
|
|
Verdazil wrote: | After system boot I can successfully run manually: Code: | # rc-service ntp-client start
* Setting clock via the NTP client 'ntpdate' ... [ ok ] |
But if I add the service to runlevel default, an error occurs at boot time and servive does not start.
How to fix this problem? |
Code: | rc-update add net-online
| might help you |
|
Back to top |
|
|
The Main Man Veteran
Joined: 27 Nov 2014 Posts: 1171 Location: /run/user/1000
|
Posted: Sat Mar 16, 2019 11:10 pm Post subject: |
|
|
I use chrony, you can try it, it works fine.
Nothing special needs to be done :
Code: | # emerge chrony
# rc-update add chronyd default |
and that's it.
https://wiki.gentoo.org/wiki/Chrony |
|
Back to top |
|
|
Verdazil n00b
Joined: 14 Feb 2019 Posts: 47 Location: One small country ...
|
Posted: Sun Mar 17, 2019 5:09 am Post subject: |
|
|
toralf wrote: | Code: | rc-update add net-online | might help you |
Nothing changed.
kajzer wrote: | I use chrony, you can try it, it works fine.
Nothing special needs to be done :
Code: | # emerge chrony
# rc-update add chronyd default |
|
Yes, this option works, all thanks. _________________ GA-Z170X-UD3 / i7-6700K / DDR4 32GB / Radeon RX 570 / TL-WDN4800 / Samsung SSD 850 EVO 250 Gb + WD Green WDC 2 Tb / BenQ BL2711U + LG TV 42LF650V |
|
Back to top |
|
|
|