Bug 210100 - ntpd: Synchronizing with time server: Error : Servname not supported for ai_socktype
ntpd: Synchronizing with time server: Error : Servname not supported for ai_s...
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: ntp (Show other bugs)
4.4
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Miroslav Lichvar
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-09 20:25 EDT by Kurt Heine
Modified: 2007-11-16 20:14 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-17 04:33:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
ntp conf file (2.65 KB, application/octet-stream)
2006-10-09 20:25 EDT, Kurt Heine
no flags Details
/etc/services file (20.02 KB, application/octet-stream)
2006-10-09 20:32 EDT, Kurt Heine
no flags Details

  None (edit)
Description Kurt Heine 2006-10-09 20:25:06 EDT
Description of problem:
When I start the ntp service up I get the following error message :

[root@server3 ~]# /etc/init.d/ntpd restart
Shutting down ntpd:                                        [  OK  ]
ntpd: Synchronizing with time server: Error : Servname not supported for ai_socktype
Error : Servname not supported for ai_socktype
Error : Servname not supported for ai_socktype
                                                           [FAILED]
Starting ntpd:                                             [  OK  ]


Version-Release number of selected component (if applicable):
ntp-4.2.0.a.20040617-4.EL4.1

How reproducible:
Every time

Steps to Reproduce:
1. service ntpd restart
2.
3.
  
Actual results:
ntp does not syncronise the clock to a time server but it starts 2 ntp processes
in the background.

Expected results:
A syncronises system clock and an [OK] for the service when it starts up.

Additional info:
The clock was created using the system-config-date gnome application.
Comment 1 Kurt Heine 2006-10-09 20:25:07 EDT
Created attachment 138103 [details]
ntp conf file
Comment 2 Kurt Heine 2006-10-09 20:32:21 EDT
Created attachment 138104 [details]
/etc/services file
Comment 3 Kurt Heine 2006-10-09 20:34:09 EDT
I have checked google and the problem seems to be associated with the
/etc/services file.  I added this file and check the one on the system and it
seems to contain the ntp 123/udp reference.

URL :
http://www.ducea.com/2006/09/11/error-servname-not-supported-for-ai_socktype/
Comment 4 Kurt Heine 2006-10-09 20:35:41 EDT
I seem to be able to run the ntpdate 0.au.pool.ntp.org and it works successfully
but running the service seems not to work.

[root@server3 ~]#  ntpdate 0.au.pool.ntp.org
10 Oct 11:28:42 ntpdate[8440]: step time server 203.217.30.156 offset 14.797880 sec
Comment 5 Miroslav Lichvar 2006-10-16 08:24:39 EDT
Ok, could you please send me output from "strace /usr/sbin/ntpd -n" ?
Comment 6 Kurt Heine 2006-10-16 19:33:22 EDT
Miroslav,
   here is the output of the ntpdate command running.  If I run it from the
command line it works fine but within the script it fails.

[root@server3 ~]# /etc/init.d/ntpd  start
ntpd: Synchronizing with time server: execve("/usr/sbin/ntpdate",
["/usr/sbin/ntpdate", "-U", "ntp", "-s", "-b", "0.au.pool.ntp.org"], [/* 23 vars
*/]) = 0
uname({sys="Linux", node="server3.tafeitbur.com.au", ...}) = 0
brk(0)                                  = 0x99ee000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=78348, ...}) = 0
old_mmap(NULL, 78348, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7eff000
close(3)                                = 0
open("/lib/libcap.so.1", O_RDONLY)      = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\350\352"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=11788, ...}) = 0
old_mmap(NULL, 13972, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x196000
old_mmap(0x199000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x199000
close(3)                                = 0
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\16"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1454802, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7efe000
old_mmap(NULL, 1223900, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x804000
old_mmap(0x929000, 16384, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x124000) = 0x929000
old_mmap(0x92d000, 7388, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x92d000
close(3)                                = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7efd000
mprotect(0x929000, 4096, PROT_READ)     = 0
mprotect(0x444000, 4096, PROT_READ)     = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7efd6c0, limit:1048575,
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0,
useable:1}) = 0
munmap(0xb7eff000, 78348)               = 0
brk(0)                                  = 0x99ee000
brk(0x9a0f000)                          = 0x9a0f000
socket(PF_FILE, SOCK_DGRAM, 0)          = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
connect(3, {sa_family=AF_FILE, path="/dev/log"}, 16) = -1 EPROTOTYPE (Protocol
wrong type for socket)
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
connect(3, {sa_family=AF_FILE, path="/dev/log"}, 16) = 0
open("/etc/nsswitch.conf", O_RDONLY)    = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=1623, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f12000
read(4, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1623
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0xb7f12000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=78348, ...}) = 0
old_mmap(NULL, 78348, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7eff000
close(4)                                = 0
open("/lib/libnss_files.so.2", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\33\0"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=45889, ...}) = 0
old_mmap(NULL, 41608, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) =
0xf1b000
old_mmap(0xf24000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x8000) = 0xf24000
close(4)                                = 0
munmap(0xb7eff000, 78348)               = 0
open("/etc/services", O_RDONLY)         = -1 EACCES (Permission denied)
write(2, "Error : Servname not supported f"..., 47Error : Servname not supported
for ai_socktype
) = 47
time(NULL)                              = 1161041418
open("/etc/localtime", O_RDONLY)        = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=825, ...}) = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=825, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f12000
read(4, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0"..., 4096) = 825
close(4)                                = 0
munmap(0xb7f12000, 4096)                = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=825, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=825, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=825, ...}) = 0
getpid()                                = 15319
send(3, "<27>Oct 17 10:30:18 ntpdate[1531"..., 71, MSG_NOSIGNAL) = 71
time(NULL)                              = 1161041418
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=825, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=825, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=825, ...}) = 0
send(3, "<27>Oct 17 10:30:18 ntpdate[1531"..., 68, MSG_NOSIGNAL) = -1 EPIPE
(Broken pipe)
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
connect(3, {sa_family=AF_FILE, path="/dev/log"}, 16) = 0
send(3, "<27>Oct 17 10:30:18 ntpdate[1531"..., 68, MSG_NOSIGNAL) = 68
exit_group(1)                           = ?
Process 15319 detached
                                                           [  OK  ]
Starting ntpd: 
Comment 7 Kurt Heine 2006-10-16 19:38:47 EDT
Mirooslav,
  I have turned SELinux off and now I get something different.  I noticed the
/etc/services was coming up with permission denied and so I tried without
SELinux and I get the following (see below).  Now when I turn SELinux off it
seems to automagically work.


Here are the versions of SELinux I am running :

[root@server3 ~]# rpm -q libselinux
libselinux-1.19.1-7.2
[root@server3 ~]# rpm -qa | grep polic
checkpolicy-1.17.5-1
selinux-policy-targeted-1.17.30-2.140
policycoreutils-1.18.1-4.9

Output from the ntpd service script with SELinux turned off.

[root@server3 ~]# setenforce 0
[root@server3 ~]# /etc/init.d/ntpd  restart
Shutting down ntpd:                                        [  OK  ]
ntpd: Synchronizing with time server: execve("/usr/sbin/ntpdate",
["/usr/sbin/ntpdate", "-U", "ntp", "-s", "-b", "0.au.pool.ntp.org"], [/* 23 vars
*/]) = 0
uname({sys="Linux", node="server3.tafeitbur.com.au", ...}) = 0
brk(0)                                  = 0x8cef000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=78348, ...}) = 0
old_mmap(NULL, 78348, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7efe000
close(3)                                = 0
open("/lib/libcap.so.1", O_RDONLY)      = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\350\352"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=11788, ...}) = 0
old_mmap(NULL, 13972, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x350000
old_mmap(0x353000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x353000
close(3)                                = 0
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\16"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1454802, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7efd000
old_mmap(NULL, 1223900, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x17f000
old_mmap(0x2a4000, 16384, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x124000) = 0x2a4000
old_mmap(0x2a8000, 7388, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2a8000
close(3)                                = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7efc000
mprotect(0x2a4000, 4096, PROT_READ)     = 0
mprotect(0x17d000, 4096, PROT_READ)     = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7efc6c0, limit:1048575,
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0,
useable:1}) = 0
munmap(0xb7efe000, 78348)               = 0
brk(0)                                  = 0x8cef000
brk(0x8d10000)                          = 0x8d10000
socket(PF_FILE, SOCK_DGRAM, 0)          = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
connect(3, {sa_family=AF_FILE, path="/dev/log"}, 16) = -1 EPROTOTYPE (Protocol
wrong type for socket)
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
connect(3, {sa_family=AF_FILE, path="/dev/log"}, 16) = 0
open("/etc/nsswitch.conf", O_RDONLY)    = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=1623, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f11000
read(4, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1623
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0xb7f11000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=78348, ...}) = 0
old_mmap(NULL, 78348, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7efe000
close(4)                                = 0
open("/lib/libnss_files.so.2", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\33\0"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=45889, ...}) = 0
old_mmap(NULL, 41608, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) =
0x900000
old_mmap(0x909000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x8000) = 0x909000
close(4)                                = 0
munmap(0xb7efe000, 78348)               = 0
open("/etc/services", O_RDONLY)         = 4
fcntl64(4, F_GETFD)                     = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
fstat64(4, {st_mode=S_IFREG|0777, st_size=20496, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f11000
read(4, "# /etc/services:\n# $Id: services"..., 4096) = 4096
read(4, "123/tcp\nntp\t\t123/udp\t\t\t\t# Networ"..., 4096) = 4096
close(4)                                = 0
munmap(0xb7f11000, 4096)                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 4
fcntl64(4, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT
(No such file or directory)
close(4)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 4
fcntl64(4, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT
(No such file or directory)
close(4)                                = 0
gettimeofday({1161041590, 184893}, NULL) = 0
getpid()                                = 15423
open("/etc/resolv.conf", O_RDONLY)      = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=74, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f11000
read(4, "search tafeitbur.com.au\nnameserv"..., 4096) = 74
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0xb7f11000, 4096)                = 0
open("/etc/hosts", O_RDONLY)            = 4
fcntl64(4, F_GETFD)                     = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=208, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f11000
read(4, "# Do not remove the following li"..., 4096) = 208
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0xb7f11000, 4096)                = 0
open("/etc/hosts", O_RDONLY)            = 4
fcntl64(4, F_GETFD)                     = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=208, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f11000
read(4, "# Do not remove the following li"..., 4096) = 208
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0xb7f11000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=78348, ...}) = 0
old_mmap(NULL, 78348, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7efe000
close(4)                                = 0
open("/lib/libnss_dns.so.2", O_RDONLY)  = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\r\0"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=21280, ...}) = 0
old_mmap(NULL, 20612, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) =
0x111000
old_mmap(0x115000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x3000) = 0x115000
close(4)                                = 0
open("/lib/libresolv.so.2", O_RDONLY)   = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\263"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=79488, ...}) = 0
old_mmap(NULL, 75944, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) =
0xf9e000
old_mmap(0xfad000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xf000) = 0xfad000
old_mmap(0xfaf000, 6312, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xfaf000
close(4)                                = 0
munmap(0xb7efe000, 78348)               = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("192.168.200.1")}, 28) = 0
fcntl64(4, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
gettimeofday({1161041590, 187328}, NULL) = 0
poll([{fd=4, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
send(4, "\370\264\1\0\0\1\0\0\0\0\0\0\0010\2au\4pool\3ntp\3org\0"..., 35,
MSG_NOSIGNAL) = 35
poll([{fd=4, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
ioctl(4, FIONREAD, [90])                = 0
recvfrom(4, "\370\264\201\200\0\1\0\0\0\1\0\0\0010\2au\4pool\3ntp\3"..., 1024,
0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.200.1")},
[16]) = 90
close(4)                                = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("192.168.200.1")}, 28) = 0
fcntl64(4, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
gettimeofday({1161041590, 331554}, NULL) = 0
poll([{fd=4, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
send(4, "e\213\1\0\0\1\0\0\0\0\0\0\0010\2au\4pool\3ntp\3org\tt"..., 52,
MSG_NOSIGNAL) = 52
poll([{fd=4, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
ioctl(4, FIONREAD, [93])                = 0
recvfrom(4, "e\213\205\203\0\1\0\0\0\1\0\0\0010\2au\4pool\3ntp\3org"..., 1024,
0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.200.1")},
[16]) = 93
close(4)                                = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("192.168.200.1")}, 28) = 0
fcntl64(4, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
gettimeofday({1161041590, 332418}, NULL) = 0
poll([{fd=4, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
send(4, "\365E\1\0\0\1\0\0\0\0\0\0\0010\2au\4pool\3ntp\3org\0\0"..., 35,
MSG_NOSIGNAL) = 35
poll([{fd=4, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
ioctl(4, FIONREAD, [353])               = 0
recvfrom(4, "\365E\201\200\0\1\0\5\0\5\0\5\0010\2au\4pool\3ntp\3org"..., 1024,
0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.200.1")},
[16]) = 353
close(4)                                = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(123),
sin_addr=inet_addr("203.206.171.84")}, 16) = 0
getsockname(4, {sa_family=AF_INET, sin_port=htons(32779),
sin_addr=inet_addr("192.168.200.103")}, [16]) = 0
close(4)                                = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(123),
sin_addr=inet_addr("150.101.116.228")}, 16) = 0
getsockname(4, {sa_family=AF_INET, sin_port=htons(32779),
sin_addr=inet_addr("192.168.200.103")}, [16]) = 0
close(4)                                = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(123),
sin_addr=inet_addr("203.11.119.1")}, 16) = 0
getsockname(4, {sa_family=AF_INET, sin_port=htons(32779),
sin_addr=inet_addr("192.168.200.103")}, [16]) = 0
close(4)                                = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(123),
sin_addr=inet_addr("203.24.121.35")}, 16) = 0
getsockname(4, {sa_family=AF_INET, sin_port=htons(32779),
sin_addr=inet_addr("192.168.200.103")}, [16]) = 0
close(4)                                = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(123),
sin_addr=inet_addr("203.161.95.174")}, 16) = 0
getsockname(4, {sa_family=AF_INET, sin_port=htons(32779),
sin_addr=inet_addr("192.168.200.103")}, [16]) = 0
close(4)                                = 0
open("/etc/services", O_RDONLY)         = 4
fcntl64(4, F_GETFD)                     = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
fstat64(4, {st_mode=S_IFREG|0777, st_size=20496, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f11000
read(4, "# /etc/services:\n# $Id: services"..., 4096) = 4096
read(4, "123/tcp\nntp\t\t123/udp\t\t\t\t# Networ"..., 4096) = 4096
close(4)                                = 0
munmap(0xb7f11000, 4096)                = 0
socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET6, sin6_port=htons(123), inet_pton(AF_INET6, "::",
&sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
getsockname(4, {sa_family=AF_INET6, sin6_port=htons(32779), inet_pton(AF_INET6,
"::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 0
close(4)                                = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(123),
sin_addr=inet_addr("0.0.0.0")}, 16) = 0
getsockname(4, {sa_family=AF_INET, sin_port=htons(32779),
sin_addr=inet_addr("127.0.0.1")}, [16]) = 0
close(4)                                = 0
socket(PF_INET6, SOCK_DGRAM, IPPROTO_UDP) = 4
setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(4, SOL_IPV6, IPV6_V6ONLY, [1], 4) = 0
bind(4, {sa_family=AF_INET6, sin6_port=htons(123), inet_pton(AF_INET6, "::",
&sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
fcntl64(4, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 5
setsockopt(5, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(5, {sa_family=AF_INET, sin_port=htons(123), sin_addr=inet_addr("0.0.0.0")},
16) = 0
fcntl64(5, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
rt_sigaction(SIGALRM, {0x7ba23e, [], SA_RESTORER, 0x1a6898}, {SIG_DFL}, 8) = 0
setitimer(ITIMER_REAL, {it_interval={0, 200000}, it_value={0, 100000}}, NULL) = 0
setpriority(PRIO_PROCESS, 0, -12)       = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 6
fcntl64(6, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(6, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(6, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT
(No such file or directory)
close(6)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 6
fcntl64(6, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(6, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(6, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT
(No such file or directory)
close(6)                                = 0
open("/etc/passwd", O_RDONLY)           = 6
fcntl64(6, F_GETFD)                     = 0
fcntl64(6, F_SETFD, FD_CLOEXEC)         = 0
fstat64(6, {st_mode=S_IFREG|0644, st_size=2445, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f11000
read(6, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2445
close(6)                                = 0
munmap(0xb7f11000, 4096)                = 0
prctl(0x8, 0x1, 0x2a8098, 0x8cf1288, 0x400) = 0
setgroups32(0, [])                      = 0
setresgid32(-1, 38, -1)                 = 0
setresuid32(-1, 38, -1)                 = 0
capset(0x19980330, 0, {CAP_SYS_TIME, CAP_SYS_TIME, CAP_SYS_TIME}) = 0
setregid32(38, 38)                      = 0
setreuid32(38, 38)                      = 0
getegid32()                             = 38
geteuid32()                             = 38
getgid32()                              = 38
getuid32()                              = 38
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}], 2, 60000) = -1 EINTR
(Interrupted system call)
--- SIGALRM (Alarm clock) @ 0 (0) ---
sigreturn()                             = ? (mask now [])
gettimeofday({1161041590, 436840}, NULL) = 0
sendto(5, "\343\0\4\372\0\1\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 48, 0,
{sa_family=AF_INET, sin_port=htons(123), sin_addr=inet_addr("203.206.171.84")},
16) = 48
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN, revents=POLLIN}], 2, 60000) = 1
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN, revents=POLLIN}], 2, 0) = 1
gettimeofday({1161041590, 509056}, NULL) = 0
recvfrom(5, "$\3\4\354\0\0\16g\0\0\vp\201\177(\3\310\336\223\321+\277"..., 1092,
0, {sa_family=AF_INET, sin_port=htons(123),
sin_addr=inet_addr("203.206.171.84")}, [16]) = 48
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}], 2, 0) = 0
gettimeofday({1161041590, 509258}, NULL) = 0
sendto(5, "\343\0\4\372\0\1\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 48, 0,
{sa_family=AF_INET, sin_port=htons(123), sin_addr=inet_addr("203.206.171.84")},
16) = 48
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN, revents=POLLIN}], 2, 60000) = 1
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN, revents=POLLIN}], 2, 0) = 1
gettimeofday({1161041590, 580695}, NULL) = 0
recvfrom(5, "$\3\4\354\0\0\16g\0\0\vq\201\177(\3\310\336\223\321+\277"..., 1092,
0, {sa_family=AF_INET, sin_port=htons(123),
sin_addr=inet_addr("203.206.171.84")}, [16]) = 48
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}], 2, 0) = 0
gettimeofday({1161041590, 581450}, NULL) = 0
sendto(5, "\343\0\4\372\0\1\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 48, 0,
{sa_family=AF_INET, sin_port=htons(123), sin_addr=inet_addr("203.206.171.84")},
16) = 48
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}], 2, 60000) = -1 EINTR
(Interrupted system call)
--- SIGALRM (Alarm clock) @ 0 (0) ---
sigreturn()                             = ? (mask now [])
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN, revents=POLLIN}], 2, 60000) = 1
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN, revents=POLLIN}], 2, 0) = 1
gettimeofday({1161041590, 653343}, NULL) = 0
recvfrom(5, "$\3\4\354\0\0\16g\0\0\vq\201\177(\3\310\336\223\321+\277"..., 1092,
0, {sa_family=AF_INET, sin_port=htons(123),
sin_addr=inet_addr("203.206.171.84")}, [16]) = 48
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}], 2, 0) = 0
gettimeofday({1161041590, 653551}, NULL) = 0
sendto(5, "\343\0\4\372\0\1\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 48, 0,
{sa_family=AF_INET, sin_port=htons(123), sin_addr=inet_addr("203.206.171.84")},
16) = 48
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN, revents=POLLIN}], 2, 60000) = 1
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN, revents=POLLIN}], 2, 0) = 1
gettimeofday({1161041590, 724605}, NULL) = 0
recvfrom(5, "$\3\4\354\0\0\16g\0\0\vq\201\177(\3\310\336\223\321+\277"..., 1092,
0, {sa_family=AF_INET, sin_port=htons(123),
sin_addr=inet_addr("203.206.171.84")}, [16]) = 48
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}], 2, 0) = 0
gettimeofday({1161041590, 724826}, NULL) = 0
adjtimex({modes=32769, offset=0, freq=0, maxerror=8720, esterror=16, status=1,
constant=0, precision=1, tolerance=33554432, time={1161041590, 724871}}) = 0
settimeofday({1161041558, 305444}, NULL) = 0
time(NULL)                              = 1161041558
open("/etc/localtime", O_RDONLY)        = 6
fstat64(6, {st_mode=S_IFREG|0644, st_size=825, ...}) = 0
fstat64(6, {st_mode=S_IFREG|0644, st_size=825, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f11000
read(6, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0"..., 4096) = 825
close(6)                                = 0
munmap(0xb7f11000, 4096)                = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=825, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=825, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=825, ...}) = 0
send(3, "<29>Oct 17 10:32:38 ntpdate[1542"..., 90, MSG_NOSIGNAL) = 90
exit_group(0)                           = ?
Process 15423 detached
                                                           [  OK  ]
Starting ntpd: 
Comment 8 Miroslav Lichvar 2006-10-17 04:21:00 EDT
It can be a problem with security context of the file. Try
"/sbin/restorecon -v /etc/services" and see if it makes a difference.
Comment 9 Kurt Heine 2006-10-17 04:27:03 EDT
It seems to be fixed.  I did the following as per requested :

[root@server3 ~]# restorecon -v /etc/services 
restorecon reset context /etc/services:root:object_r:file_t->system_u:object_r:etc_t
[root@server3 ~]# setenforce 1
[root@server3 ~]# getenforce
Enforcing
[root@server3 ~]# /etc/init.d/ntpd stop
Shutting down ntpd:                                        [  OK  ]
[root@server3 ~]# /etc/init.d/ntpd stop
Shutting down ntpd:                                        [FAILED]
[root@server3 ~]# /etc/init.d/ntpd start
ntpd: Synchronizing with time server:                      [  OK  ]
Starting ntpd: 
[root@server3 ~]# 

which seems to have fixed the problem.  Thanks Miroslav.
Comment 10 Miroslav Lichvar 2006-10-17 04:33:22 EDT
Ok, something modified the context of the file, closing as NOTABUG.

Note You need to log in before you can comment on or make changes to this bug.