Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NTPd Troubles
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
thompsonmike
Apprentice
Apprentice


Joined: 19 Jan 2004
Posts: 275
Location: Bath UK

PostPosted: Tue Jun 08, 2004 5:01 am    Post subject: NTPd Troubles Reply with quote

My previously working fine NTP server is now giving me errors, not in any log file (ntp.log or the message file)

It appears to start fine, but ntpq -p gives a "Denied connection error" which is because NTPd has died almost immeadiatly after starting, and trying

Code:


/etc/init.d/ntpd stop



gives the following error

Code:

 * Stopping ntpd...
start-stop-daemon: warning: failed to kill 14692: No such process
1 pids were not killed
No process in pidfile `/var/run/ntpd.pid' found running; none killed.
 * Failed to stop ntpd   


And if I try to start the script I get a "Already running" error and have to zap the script before I can try again.

Any one got any ideas on what happend? ntp has been running for around a year with no problems, then I moved house and it has stopped!

My config file has not changed, and I have tried emerge unmerge ntp and re-emerged it, exactly the same thing....

Help Please!!!!
_________________
Thanks


Michael..
Back to top
View user's profile Send private message
smart
Guru
Guru


Joined: 19 Nov 2002
Posts: 455

PostPosted: Tue Jun 08, 2004 7:13 am    Post subject: Reply with quote

- kill any possibly running ntpd instance
- run ntpd using your normal options plus -d or -D (see man) on interactive console and watch

possibly your clock is too much off, see -g option. you could avoid that by running ntpdate against a known good ntp server before starting ntpd.
Back to top
View user's profile Send private message
thompsonmike
Apprentice
Apprentice


Joined: 19 Jan 2004
Posts: 275
Location: Bath UK

PostPosted: Tue Jun 08, 2004 7:17 am    Post subject: Reply with quote

smart wrote:
- kill any possibly running ntpd instance
- run ntpd using your normal options plus -d or -D (see man) on interactive console and watch

possibly your clock is too much off, see -g option. you could avoid that by running ntpdate against a known good ntp server before starting ntpd.


Using ps -ef | grep ntpd there are no running processes belonging to ntp

To run with the -D option do I just run it with the standard /etc/init.d/ntpd -D or do I need to change the script?

The clock is spot on. The only thing I can think of is the Time zone, it is as BST, british summer time, should I try changing it to GMT?
_________________
Thanks


Michael..
Back to top
View user's profile Send private message
smart
Guru
Guru


Joined: 19 Nov 2002
Posts: 455

PostPosted: Tue Jun 08, 2004 8:18 am    Post subject: Reply with quote

Leave the timezone to what is right for you.

Don't use the init script. The idea is to run it manually so you can see its' output right in front of you.

To make it specific, check:

cat /etc/conf.d/ntpd

gather the command line options you use from there and run ntpd with those options plus a single "-d" and see what it says.
Back to top
View user's profile Send private message
thompsonmike
Apprentice
Apprentice


Joined: 19 Jan 2004
Posts: 275
Location: Bath UK

PostPosted: Tue Jun 08, 2004 9:42 am    Post subject: Reply with quote

Heres what I get when I do that..

Code:

polaris root # ntpd -u ntp:ntp -d
ntpd 4.2.0@1.1161-r Tue Jun  8 05:53:18 BST 2004 (1)
addto_syslog: ntpd 4.2.0@1.1161-r Tue Jun  8 05:53:18 BST 2004 (1)
addto_syslog: signal_no_reset: signal 13 had flags 4000000
addto_syslog: precision = 1.000 usec
create_sockets(123)
addto_syslog: no IPv6 interfaces found
bind() fd 4, family 2, port 123, addr 0.0.0.0, flags=8
bind() fd 5, family 2, port 123, addr 127.0.0.1, flags=0
bind() fd 6, family 2, port 123, addr 192.168.1.5, flags=8
bind() fd 7, family 2, port 123, addr 192.168.1.12, flags=8
init_io: maxactivefd 7
local_clock: at 0 state 0
key_expire: at 0
peer_clear: at 0 assoc ID 35660 refid INIT
newpeer: 192.168.1.5->212.159.6.9 mode 3 vers 4 poll 6 10 flags 0x81 0x1 ttl 0 key 00000000
key_expire: at 0
peer_clear: at 0 assoc ID 35661 refid INIT
newpeer: 192.168.1.5->80.67.179.98 mode 3 vers 4 poll 6 10 flags 0x1 0x1 ttl 0 key 00000000
key_expire: at 0
peer_clear: at 0 assoc ID 35662 refid INIT
newpeer: null->2001:770:10:300::86e2:5103 mode 3 vers 4 poll 6 10 flags 0x1 0x1 ttl 0 key 00000000
report_event: system event 'event_restart' (0x01) status 'sync_alarm, sync_unspec, 1 event, event_unspec' (0xc010)
transmit: at 1 192.168.1.5->212.159.6.9 mode 3
auth_agekeys: at 1 keys 1 expired 0
timer: refresh ts 0
receive: at 1 192.168.1.5<-212.159.6.9 mode 4 code 1
key_expire: at 1
peer_clear: at 1 assoc ID 35660 refid RSTR
transmit: at 2 192.168.1.5->80.67.179.98 mode 3
transmit: at 2 192.168.1.5->212.159.6.9 mode 3
receive: at 2 192.168.1.5<-212.159.6.9 mode 4 code 1
key_expire: at 2
peer_clear: at 2 assoc ID 35660 refid RSTR
receive: at 2 192.168.1.5<-80.67.179.98 mode 4 code 1
key_expire: at 2
peer_clear: at 2 assoc ID 35661 refid RSTR
Segmentation fault


No I see the segmentation fault, how do I find out what is causing the seg fault and cure it? I am at a loss here! I know the top layers of linux, but start really digging and I am completly Lost!!!!
_________________
Thanks


Michael..
Back to top
View user's profile Send private message
smart
Guru
Guru


Joined: 19 Nov 2002
Posts: 455

PostPosted: Tue Jun 08, 2004 12:15 pm    Post subject: Reply with quote

Yes, the end is a bit short :)

Now 1 thing there is is the "-u" argument. That should be "-U" (capitalized).

Furthermore, i'm not sure if -U supports selecting group, it defaults to users primary group, so i'd go "-U ntp" nothing more. Try that.

If it still doesn't work, add another "d" to get

ntpd -U ntp -dd

and lets see what it says.
Back to top
View user's profile Send private message
thompsonmike
Apprentice
Apprentice


Joined: 19 Jan 2004
Posts: 275
Location: Bath UK

PostPosted: Wed Jun 09, 2004 12:14 am    Post subject: Reply with quote

-U is not a recognized command line argument. When I run it that is what it complains about.

Run with just the ntp as user and let the group be blank, ie ntpd -u ntp -d it still segments.
_________________
Thanks


Michael..
Back to top
View user's profile Send private message
smart
Guru
Guru


Joined: 19 Nov 2002
Posts: 455

PostPosted: Wed Jun 09, 2004 7:50 am    Post subject: Reply with quote

I will go and update my ntp, maybe than i have lowercase -u as well....
have you tried without "-u" to not drop privileges ?
what does "-dd" give. anything new with that ?
if that doesn't help i feel like there would be a binaries/compilation/libraries problem... possibly a reemerge of ntp could solve that if it's the case.
Back to top
View user's profile Send private message
thompsonmike
Apprentice
Apprentice


Joined: 19 Jan 2004
Posts: 275
Location: Bath UK

PostPosted: Wed Jun 09, 2004 1:49 pm    Post subject: Reply with quote

the DD option just gives exactly the same as a single d, I tried to re-emerge the NTP and it still does it. I unemerged and re-emerged with no joy.

Lets try without dropping the priviledges. (Running as root)

Same, segmentation fault.

Oh well. :(
_________________
Thanks


Michael..
Back to top
View user's profile Send private message
thompsonmike
Apprentice
Apprentice


Joined: 19 Jan 2004
Posts: 275
Location: Bath UK

PostPosted: Wed Jun 09, 2004 1:56 pm    Post subject: Reply with quote

Just found this

https://forums.gentoo.org/viewtopic.php?t=161697

And several Bug reports

https://bugs.gentoo.org/show_bug.cgi?id=48128

So it looks like a known problem! Doh, should of checked!
_________________
Thanks


Michael..
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