View previous topic :: View next topic |
Author |
Message |
bhoagland n00b
Joined: 01 Apr 2004 Posts: 15 Location: State College, PA, USA
|
Posted: Sun Oct 31, 2004 7:04 am Post subject: ntpdate not working |
|
|
When I try to run ntpdate to sync the clock I get the following:
Code: |
root@oceanus brad # ntpdate time.nist.gov
Looking for host time.nist.gov and service ntp
Error : Servname not supported for ai_socktype
31 Oct 01:59:39 ntpdate[32318]: can't find host time.nist.gov
31 Oct 01:59:39 ntpdate[32318]: no servers can be used, exiting
|
This only recently started happening. It used to work fine. In fact, it works fine on the other two Gentoo boxes I have running right now. I can't think of anything I have changed that would affect this. I tried reemerging ntp but that didn't help either. |
|
Back to top |
|
|
BobCamp n00b
Joined: 04 Sep 2004 Posts: 12 Location: Redding CT USA
|
Posted: Mon Nov 01, 2004 1:55 am Post subject: |
|
|
Stupid questions you probably already have checked:
1) can you ping time.nist.gov from the box with the problem?
2) do you have the same problem with other ntp servers?
3) are you runing anything like iptables that might block ntp? |
|
Back to top |
|
|
bhoagland n00b
Joined: 01 Apr 2004 Posts: 15 Location: State College, PA, USA
|
Posted: Mon Nov 01, 2004 3:42 am Post subject: |
|
|
1. Yes I can ping time.nist.gov
2. Yes it happens with other ntp servers I try
3. No I am not running iptables or anything else on the box. I haven't changed anything like that since it was working before |
|
Back to top |
|
|
D $hady n00b
Joined: 20 Jul 2004 Posts: 3 Location: /home/USA/NH
|
Posted: Mon Nov 01, 2004 4:30 am Post subject: |
|
|
I found a few other posts on Google with the same error messges.
Make sure you have the following line in /etc/services:
I tried commenting this out on my machine and it caused the error you're describing.
Cheers,
Dave |
|
Back to top |
|
|
bhoagland n00b
Joined: 01 Apr 2004 Posts: 15 Location: State College, PA, USA
|
Posted: Mon Nov 01, 2004 6:13 am Post subject: |
|
|
That was the problem. Since you mentioned /etc/services I now remember something strange going on when etc-update tried to update that file. It was completely blank so I guess etc-update choked.
Copied the services file from another box and now it works fine.
Thanks for the help! |
|
Back to top |
|
|
Karl_R Tux's lil' helper
Joined: 21 Mar 2004 Posts: 118 Location: Sydney
|
Posted: Mon Jun 27, 2005 10:11 am Post subject: |
|
|
Aye, thanks for the tip. I had exactly the same issue.
Any idea why /etc/services is now blank?
was it a security fix? ie turn them all off by default?
Anyway thanks, I'm going to search for /etc/service problems now |
|
Back to top |
|
|
|