Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ntpdate error
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
li1_getoo
l33t
l33t


Joined: 20 Oct 2002
Posts: 661
Location: Queens , NY

PostPosted: Fri Jan 10, 2003 8:05 pm    Post subject: ntpdate error Reply with quote

can anyone help me fix this please
this is how my /etc/conf.d/ntpd looks

Code:
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2         
# $Header: /home/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd.confd,v 1.8 2003/01/01 01:27:45 vapier Exp $
# Comment this out if you dont want the init script to warn
# about not having ntpdate setup
NTPDATE_WARN="y"
# Command to run to set the clock initially
# if you want to use ntpd to set the clock, change this to 'ntpd'
NTPDATE_CMD="ntpd"
# Options to pass to the above command
# you might want to change 'someserver' to a valid
# hostname which you can aquire below
NTPDATE_OPTS="-b time.nist.gov"
# A list of available servers is available here:
# * http://www.eecis.udel.edu/~mills/ntp/clock1.html
# and
# * http://www.eecis.udel.edu/~mills/ntp/clock2.html


in my mind the NTPDATE_O part is not correct
thanx for ur comments
Back to top
View user's profile Send private message
ebrostig
Bodhisattva
Bodhisattva


Joined: 20 Jul 2002
Posts: 3152
Location: Orlando, Fl

PostPosted: Fri Jan 10, 2003 8:51 pm    Post subject: Reply with quote

What is your problem btw, you never told us? :)

The server info should go into /etc/ntp.conf and not in /etc/conf.d/ntpd.
Here are my files:
Code:

/etc/conf.d/ntpd:
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd.confd,v 1.8 2003/01/01 01:27:45 vapier Exp $

# Comment this out if you dont want the init script to warn
# about not having ntpdate setup
NTPDATE_WARN="y"

# Command to run to set the clock initially
# if you want to use ntpd to set the clock, change this to 'ntpd'
#NTPDATE_CMD="ntpdate"

# Options to pass to the above command
# you might want to change 'someserver' to a valid
# hostname which you can aquire below
#NTPDATE_OPTS="-b someserver"

##
# A list of available servers is available here:
# * http://www.eecis.udel.edu/~mills/ntp/clock1.html
# and
# * http://www.eecis.udel.edu/~mills/ntp/clock2.html
##

/etc/ntp.conf:
restrict default noquery notrust nomodify
restrict 127.0.0.1
restrict 138.x.x.x mask 255.255.252.0
restrict 138.x.x.x
server 138.x.x.x
driftfile /etc/ntp.drift
logfile /var/log/ntp.log


I just removed my ip's since they are internal anyway and replaced them with 'x'.

Hope this helps!

Erik
_________________
'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.'
Back to top
View user's profile Send private message
li1_getoo
l33t
l33t


Joined: 20 Oct 2002
Posts: 661
Location: Queens , NY

PostPosted: Fri Jan 10, 2003 9:27 pm    Post subject: Reply with quote

sorry

Code:
# cat /etc/conf.d/ntpd | grep ^N
NTPDATE_WARN="y"
NTPDATE_CMD="ntpd"
NTPDATE_OPTS="-b nistl-ny.glassey.com"


this is my problem i cant start it right

Code:
 /etc/init.d/ntpd start
 * Initializing clock via ntpd...
usage: ntpd [ -abdgmnqx ] [ -c config_file ] [ -e e_delay ]
                [ -f freq_file ] [ -k key_file ] [ -l log_file ]
                [ -p pid_file ] [ -r broad_delay ] [ -s statdir ]
                [ -t trust_key ] [ -v sys_var ] [ -V default_sysvar ]
                [ -P fixed_process_priority ]
 * Failed to run ntpd                                                     [ !! ]

 * Starting ntpd...                                                       [ ok ]
Back to top
View user's profile Send private message
ebrostig
Bodhisattva
Bodhisattva


Joined: 20 Jul 2002
Posts: 3152
Location: Orlando, Fl

PostPosted: Fri Jan 10, 2003 9:33 pm    Post subject: Reply with quote

See my entry? They are commented out:
#NTPDATE_CMD="ntpdate"
#NTPDATE_OPTS="-b someserver"
-b is only an option to ntpdate, not to ntpd.
You can either change NTPDATE_CMD to ntpdate or comment it out as I have.

They are defined in /etc/ntp.conf.

Tyr to change it and use my previous post as a template.

Erik
_________________
'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.'
Back to top
View user's profile Send private message
li1_getoo
l33t
l33t


Joined: 20 Oct 2002
Posts: 661
Location: Queens , NY

PostPosted: Fri Jan 10, 2003 9:40 pm    Post subject: Reply with quote

thank u
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Fri Jan 10, 2003 10:51 pm    Post subject: Reply with quote

Moved from Other Things Gentoo.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Fri Jan 10, 2003 11:04 pm    Post subject: Reply with quote

ebrostig wrote:
Code:
restrict 138.x.x.x mask 255.255.252.0
restrict 138.x.x.x
server 138.x.x.x
Could you elaborate on what each of the 138 addresses are for? IP 138 with mask is what? IP of restrict 138 is? IP of server 138 is? Are they all the same, do they point to the timeserver, or something else?

I read the documentation, but it didn't make much sense to me. I ended up putting only NTPDATESERVER=128.blah (local time server) into conf.d/ntp.conf
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
li1_getoo
l33t
l33t


Joined: 20 Oct 2002
Posts: 661
Location: Queens , NY

PostPosted: Sat Jan 11, 2003 12:00 am    Post subject: Reply with quote

k whatever changes i made stoped me from getting errors while loading my kernel , but
`how do u check to see if u get the accurate time ?`

Code:
 root # ntpdate
10 Jan 18:58:52 ntpdate[28228]: no servers can be used, exiting

i was getting this before all the changes

Code:
root # cat /etc/conf.d/ntpd | grep [=]
NTPDATE_WARN="y"
NTPDATE_CMD="ntpd"
NTPDATE="-b nistl-ny.glassey.com"
Back to top
View user's profile Send private message
ebrostig
Bodhisattva
Bodhisattva


Joined: 20 Jul 2002
Posts: 3152
Location: Orlando, Fl

PostPosted: Sat Jan 11, 2003 1:04 am    Post subject: Reply with quote

You need to specify the server used with ntpdate:
ntpdate server-name

Oh, the restrict is set to ensure I'm only using the local sub-net. You can remove them if you want to.

Erik
_________________
'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.'
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum