Red Hat Bugzilla – Bug 151394
ntpdate shows no output, even with -v flag
Last modified: 2007-11-30 17:07:17 EST
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0 Description of problem: Running ntpdate with the -v (verbose) flag, creates no output date ; ntpdate -v -u pool.ntp.org ; date Thu Mar 17 08:06:35 PST 2005 Thu Mar 17 08:06:35 PST 2005 Version-Release number of selected component (if applicable): ntp-4.2.0.a.20040617-4 How reproducible: Always Steps to Reproduce: 1. run ntpdate -v [your.clock.here] Actual Results: running ntpdate from strace shows that is actually working, but running it from the shell shows nothing Expected Results: you should see ntpdate -u pool.ntp.org 17 Mar 08:09:58 ntpdate[29184]: adjust time server 207.145.113.116 offset 0.002957 sec Additional info:
Reproduced here. [root@trousers ~]# ntpdate -v -u ntp.internode.on.net [root@trousers ~]# service ntpd start silently fails too.
ditto. I don't see any output either.
Same here. I also can't seem to get ntpd to synchronize to the server. I imagine it's the same problem.
FWIW, the output problem is caused by selinux policy. Reassigning...
Fixed in U1 policy. Pre release available in ftp://people.redhat.com/dwalsh/SELinux/RHEL4/u1
Ignore the ntpd comment. I had a configuration error <sigh>.
I still see the error (or rather; see nothing): [root@monhost2 files]# rpm -q selinux-policy-targeted selinux-policy-targeted-1.17.30-2.88 [root@monhost2 files]# ll -Z /usr/sbin/ntpdate -rwxr-xr-x root root system_u:object_r:ntpdate_exec_t /usr/sbin/ntpdate [root@monhost2 files]# /usr/sbin/ntpdate -v [root@monhost2 files]# strace /usr/sbin/ntpdate -v # SNIP getpid() = 23202 write(1, " 3 Sep 13:39:39 ntpdate[23202]: "..., 89) = 89 time(NULL) = 1125751179 write(2, " 3 Sep 13:39:39 ", 16) = 16 write(2, "ntpdate[23202]: no servers can b"..., 48) = 48 munmap(0xb7fff000, 4096) = 0 exit_group(1) = ? [root@monhost2 files]# ll -Z /proc/self/fd lrwx------ root root 0 -> /dev/pts/0 lrwx------ root root 1 -> /dev/pts/0 lrwx------ root root 2 -> /dev/pts/0 lr-x------ root root 3 -> /proc/23319/fd [root@monhost2 files]# ll -Z /dev/pts/0 crw--w---- nsg tty root:object_r:devpts_t /dev/pts/0
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2005-645.html