LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   NTPD & "permission denied error" (https://www.linuxquestions.org/questions/linux-software-2/ntpd-and-permission-denied-error-45794/)

ghight 02-17-2003 09:16 AM

NTPD & "permission denied error"
 
I've been coming up with some silly problems lately, but my latest is with NTPd.

Here's my setup:

server molecule.ecn.purdue.edu prefer
driftfile /etc/ntp/drift
broadcastdelay 0.008

Pretty simple, eh? Well no matter what server address I enter I restart and get errors in log files:

Feb 17 09:07:35 archive ntpd[11730]: bind() fd 4, family 2, port 123, addr 0.0.0.0, in_classd=0 flags=1 fails: Address already in use
Feb 17 09:07:35 archive ntpd[11730]: bind() fd 4, family 2, port 123, addr 127.0.0.1, in_classd=0 flags=0 fails: Address already in use
Feb 17 09:07:35 archive ntpd[11730]: bind() fd 4, family 2, port 123, addr 192.168.1.248, in_classd=0 flags=1 fails: Address already in use
Feb 17 09:07:35 archive ntpd[11730]: kernel time discipline status 0040
Feb 17 09:07:35 archive ntpd[11730]: frequency initialized 0.000 from /etc/ntp/drift
Feb 17 09:07:38 archive ntpd_initres[11731]: server returns a permission denied error

Anyone have a clue because I don't? Thanks in advance

cnjohnson 02-17-2003 10:32 AM

Hard to tell from the error message whether or not it is ntp on the local box, or the server at molecule.ecn.purdue.edu that is causing the grief.

Chage the server you are trying to synch with (ntp.shorty.com is a good one) and see if you still get the error message.

Cheers--
Charles

ghight 02-17-2003 10:38 AM

Actually, molecule.ecn.purdue.edu is the 7 or 8 server I've tried. I've tried both stratum 1 and 2 servers with the same result.

We have a firewall here (not on the server), but also have another time server (Novell) which works just fine so it's not being blocked.

cnjohnson 02-17-2003 11:13 AM

I know this isn't much help, but if you have eliminated the far server(s) as the issue, then it is either the firewall or the local box (well, duh!).

Are you in a position to try a connect without the firewall in place? Are you certain that the firewall is not blocking port 123 (I know you probably are but a re-check for sanity's sake may help)?

Try running nmap (or nmapfe if you have a gui in place) on your local box and checking that some service has acquired port 123 without your knowing it (that's a stretch, but hey!).

Try running nmap against your firewall (tell your admin before trying this, some admins consider port probing "hostile.") and seeing if it is blocking port 123.

Make sure that you have an ntp user that has r/w access to the appropriate directories and files. (Well, on linux that latest versions of ntpd run as the ntp user rather than suid root, maybe yours is different.).

I guess I'll have to ponder some more on this one.

Cheers--
Charles

linuxlastslonge 02-17-2003 01:28 PM

looks like it's having touble binding to the port that NTPD operates on. you don't have another service using that port, do you?

ghight 02-17-2003 02:14 PM

Port 123 is clean. I turned off NTPd because it was filling up my log files, but netstat showed nothing listening on port 123.

cnjohnson 02-18-2003 11:05 AM

Quote:

Originally posted by ghight
Port 123 is clean. I turned off NTPd because it was filling up my log files, but netstat showed nothing listening on port 123.
Any luck, yet? Were you able to connect without the firewall in the way?

ghight 02-18-2003 11:11 AM

Sorry, we've been snowed in and everyone had to leave at 5pm. I didn't get a chance to get to it after hours.

I did check the router config though and it doesn't block port 123.

cnjohnson 02-18-2003 01:43 PM

Quote:

Originally posted by ghight
Sorry, we've been snowed in and everyone had to leave at 5pm. I didn't get a chance to get to it after hours.

I did check the router config though and it doesn't block port 123.

Make sure that you have an ntp user that has r/w access to the appropriate directories and files. (Well, on linux that latest versions of ntpd run as the ntp user rather than suid root, maybe yours is different.).

That pretty well exhausts my help, unless you have a file system that is full, or you have run out of inodes someplce, or there are permission problems.

Cheers--
Charles

ghight 02-21-2003 01:09 PM

Kind of like rebooting your computer to fix a Windows error, I got it working correctly, but I still don't know what the problem was. Originally I manually edited the conf file and it killed it, so I then loaded the redhat-config-time program and did it throught the GUI. It didn't change a thing in the conf file, but it's working now so I'm assuming I had a permission error somewhere.

Thanks for your help!

cnjohnson 02-21-2003 01:14 PM

Quote:

Originally posted by ghight
Kind of like rebooting your computer to fix a Windows error, I got it working correctly, but I still don't know what the problem was. Originally I manually edited the conf file and it killed it, so I then loaded the redhat-config-time program and did it throught the GUI. It didn't change a thing in the conf file, but it's working now so I'm assuming I had a permission error somewhere.

Thanks for your help!

I am completely mystified about what was wrong. If you ever find out, please post here!

Glad you solved it.

Cheers--
Charles


All times are GMT -5. The time now is 08:20 AM.