[ntp:questions] getaddrinfo2: "192.168.0.2" invalid host address.

Aggie c.kevin.lam at gmail.com
Sat Oct 13 00:32:09 UTC 2007


Sorry for posting the whole output messages.

When I run ntpd with the debug option, I get the followings: //please
take a quick look.

If you do the search on "calling getaddrinfo(192.168.0.2,...)" from
the following log, you will see

getnetnum: calling getaddrinfo(192.168.0.2,...)
reval before = 7476272
retval = 9
getaddrinfo2: "192.168.0.2" invalid host address.

I'm very sure that 192.168.0.2 is the ip address of my host address.
But then why is it saying it's invalid host address??

It's weird getaddrinfo() is returning 9. Why??

Thanks for the help

=========================


 sp(ntpd, "-D", "5","-c","/romfs/ntp.conf")
Task spawned: id = 0x2f2ac40, name = t1
value = 49458240 = 0x2f2ac40

1 Jan 00:00:32 ntpd[49458240]: ntpd 4.2.4p4 at 1.1520 Fri Oct 12 22:40:53
GMT 2007 (1)ntpd 4.2.4p4 at 1.1520 Fri Oct 12 22:40:53 GMT 2007 (1)
1 Jan 00:00:33 ntpd[49458240]: set_process_priority: Leave priority
alone: priority_done is <2> 1 Jan 00:00:33 ntpd[49458240]: precision =
16666.666 usecc
reate_sockets(123)
1 Jan 00:00:33 ntpd[49458240]: ntp_io: estimated max descriptors: 30,
initial socket boundary: 20
1 Jan 00:00:33 ntpd[49458240]: ntp_io: selecting new socket boundary:
10
1 Jan 00:00:33 ntpd[49458240]: ntp_io: selecting new socket boundary:
0setsockopt SO_TIMESTAMP enabled on fd 6 address 0.0.0.0
bind() fd 6, family 2, port 123, addr 0.0.0.0, flags=0x89
flags for fd 6: 0xffffffff
Searching for addr 0.0.0.0 in list of addresses - NOT FOUND
Added addr 0.0.0.0 to list of addresses
1 Jan 00:00:33 ntpd[49458240]: Listening on interface #0 wildcard,
0.0.0.0#123 Disabledsetsockopt SO_TIMESTAMP enabled on fd 7
address ::bind() fd 7, family 28, port 123, addr ::, flags=0x81 flags
for fd 7: 0xffffffff Searching for addr :: in list of addresses - NOT
FOUND Added addr :: to list of addresses
1 Jan 00:00:33 ntpd[49458240]: Listening on interface #1
wildcard, ::#123 Disabledupdate_interfaces(123) address_okay: listen
Virtual: 1, IF name: lo0 address_okay: loopback - OK examining
interface #0: fd=-1, bfd=-1, name=lo0, flags=0x15, scope=0, ifindex=0,
sin=127.0.0.1, mask=255.0.0.0, Enabled: Dumping interface: 0x71bbc0
fd = -1
bfd = -1
sin = 127.0.0.1,
0002007b7f000001  0000000000000000  0000000000000000
0000000000000000
bcast = 0.0.0.0,
0000000000000000  0000000000000000  0000000000000000
0000000000000000
mask = 255.0.0.0,
0002007bff000000  0000000000000000  0000000000000000
0000000000000000
name = lo0
flags = 0x00000015
last_ttl = 0
addr_refid = 00000000
num_mcast = 0
received = 0
sent = 0
notsent = 0
ifindex = 0
scopeid = 0
peercnt = 0
phase = 1
Searching for addr 127.0.0.1 in list of addresses - NOT FOUND
create_interface(127.0.0.1#123)
setsockopt SO_TIMESTAMP enabled on fd 8 address 127.0.0.1
bind() fd 8, family 2, port 0, addr 127.0.0.1, flags=0x15
flags for fd 8: 0xffffffff
1 Jan 00:00:33 ntpd[49458240]: Listening on interface #2 lo0,
127.0.0.1#123 EnabledSearching for addr 127.0.0.1 in list of addresses
- NOT FOUND
Added addr 127.0.0.1 to list of addresses
created interface #2: fd=8, bfd=-1, name=lo0, flags=0x15, scope=0,
ifindex=0, sin=127.0.0.1, mask=255.0.0.0, Enabled:
Dumping interface: 0x721608
fd = 8
bfd = -1
sin = 127.0.0.1,
100200007f000001  0000000000000000  0000000000000000
0000000000000000
bcast = 0.0.0.0,
0000000000000000  0000000000000000  0000000000000000
0000000000000000
mask = 255.0.0.0,
0002007bff000000  0000000000000000  0000000000000000
0000000000000000
name = lo0
flags = 0x00000015
last_ttl = 0
addr_refid = 7f000001
num_mcast = 0
received = 0
sent = 0
notsent = 0
ifindex = 0
scopeid = 0
peercnt = 0
phase = 1
updating interface #2: fd=8, bfd=-1, name=lo0, flags=0x15, scope=0,
ifindex=0, sin=127.0.0.1, mask=255.0.0.0, Enabled: new - created
Dumping interface: 0x721608
fd = 8
bfd = -1
sin = 127.0.0.1,
100200007f000001  0000000000000000  0000000000000000
0000000000000000
bcast = 0.0.0.0,
0000000000000000  0000000000000000  0000000000000000
0000000000000000
mask = 255.0.0.0,
0002007bff000000  0000000000000000  0000000000000000
0000000000000000
name = lo0
flags = 0x00000015
last_ttl = 0
addr_refid = 7f000001
num_mcast = 0
received = 0
sent = 0
notsent = 0
ifindex = 0
scopeid = 0
peercnt = 0
phase = 1
address_okay: listen Virtual: 1, IF name: lo0
address_okay: loopback - OK
examining interface #0: fd=-1, bfd=-1, name=lo0, flags=0x15, scope=0,
ifindex=0, sin=::1, Enabled:
Dumping interface: 0x71bbc0
fd = -1
bfd = -1
sin = ::1,
001c007b00000000  0000000000000000  0000000000000001
0000000000000000
bcast = 0.0.0.0,
0000000000000000  0000000000000000  0000000000000000
0000000000000000
mask = ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff,
001c007b00000000  ffffffffffffffff  ffffffffffffffff
0000000000000000
name = lo0
flags = 0x00000015
last_ttl = 0
addr_refid = 00000000
num_mcast = 0
received = 0
sent = 0
notsent = 0
ifindex = 0
scopeid = 0
peercnt = 0
phase = 1
Searching for addr ::1 in list of addresses - NOT FOUND
create_interface(::1#123)
setsockopt SO_TIMESTAMP enabled on fd 9 address ::1
bind() fd 9, family 28, port 0, addr ::1, flags=0x15
flags for fd 9: 0xffffffff
 1 Jan 00:00:33 ntpd[49458240]: Listening on interface #3 lo0, ::1#123
EnabledSearching for addr ::1 in list of addresses - NOT FOUND
Added addr ::1 to list of addresses
created interface #3: fd=9, bfd=-1, name=lo0, flags=0x15, scope=0,
ifindex=0, sin=::1, Enabled:
Dumping interface: 0x7216f0
fd = 9
bfd = -1
sin = ::1,
1c1c000000000000  0000000000000000  0000000000000001
0000000000000000
bcast = 0.0.0.0,
0000000000000000  0000000000000000  0000000000000000
0000000000000000
mask = ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff,
001c007b00000000  ffffffffffffffff  ffffffffffffffff
0000000000000000
name = lo0
flags = 0x00000015
last_ttl = 0
addr_refid = cf404dc8
num_mcast = 0
received = 0
sent = 0
notsent = 0
ifindex = 0
scopeid = 0
peercnt = 0
phase = 1
updating interface #3: fd=9, bfd=-1, name=lo0, flags=0x15, scope=0,
ifindex=0, sin=::1, Enabled: new - created
Dumping interface: 0x7216f0
fd = 9
bfd = -1
sin = ::1,
1c1c000000000000  0000000000000000  0000000000000001
0000000000000000
bcast = 0.0.0.0,
0000000000000000  0000000000000000  0000000000000000
0000000000000000
mask = ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff,
001c007b00000000  ffffffffffffffff  ffffffffffffffff
0000000000000000
name = lo0
flags = 0x00000015
last_ttl = 0
addr_refid = cf404dc8
num_mcast = 0
received = 0
sent = 0
notsent = 0
ifindex = 0
scopeid = 0
peercnt = 0
phase = 1
address_okay: listen Virtual: 1, IF name: xemac0
address_okay: OK
examining interface #0: fd=-1, bfd=-1, name=xemac0, flags=0x9,
scope=0, ifindex=0, sin=192.168.0.3, bcast=192.168.0.255,,
mask=255.255.255.0, Enabled:
Dumping interface: 0x71bbc0
fd = -1
bfd = -1
sin = 192.168.0.3,
0002007bc0a80003  0000000000000000  0000000000000000
0000000000000000
bcast = 192.168.0.255,
0002007bc0a800ff  0000000000000000  0000000000000000
0000000000000000
mask = 255.255.255.0,
0002007bffffff00  0000000000000000  0000000000000000
0000000000000000
name = xemac0
flags = 0x00000009
last_ttl = 0
addr_refid = 00000000
num_mcast = 0
received = 0
sent = 0
notsent = 0
ifindex = 0
scopeid = 0
peercnt = 0
phase = 1
Searching for addr 192.168.0.3 in list of addresses - NOT FOUND
create_interface(192.168.0.3#123)
setsockopt SO_TIMESTAMP enabled on fd 10 address 192.168.0.3
bind() fd 10, family 2, port 0, addr 192.168.0.3, flags=0x9
flags for fd 10: 0xffffffff
 1 Jan 00:00:34 ntpd[49458240]: Listening on interface #4 xemac0,
192.168.0.3#123 EnabledSearching for addr 192.168.0.3 in list of
addresses - NOT FOUND
Added addr 192.168.0.3 to list of addresses
created interface #4: fd=10, bfd=-1, name=xemac0, flags=0x9, scope=0,
ifindex=0, sin=192.168.0.3, bcast=192.168.0.255,, mask=255.255.255.0,
Enabled:
Dumping interface: 0x7217d8
fd = 10
bfd = -1
sin = 192.168.0.3,
10020000c0a80003  0000000000000000  0000000000000000
0000000000000000
bcast = 192.168.0.255,
0002007bc0a800ff  0000000000000000  0000000000000000
0000000000000000
mask = 255.255.255.0,
0002007bffffff00  0000000000000000  0000000000000000
0000000000000000
name = xemac0
flags = 0x00000009
last_ttl = 0
addr_refid = c0a80003
num_mcast = 0
received = 0
sent = 0
notsent = 0
ifindex = 0
scopeid = 0
peercnt = 0
phase = 1
updating interface #4: fd=10, bfd=-1, name=xemac0, flags=0x9, scope=0,
ifindex=0, sin=192.168.0.3, bcast=192.168.0.255,, mask=255.255.255.0,
Enabled: new -
 created
Dumping interface: 0x7217d8
fd = 10
bfd = -1
sin = 192.168.0.3,
10020000c0a80003  0000000000000000  0000000000000000
0000000000000000
bcast = 192.168.0.255,
0002007bc0a800ff  0000000000000000  0000000000000000
0000000000000000
mask = 255.255.255.0,
0002007bffffff00  0000000000000000  0000000000000000
0000000000000000
name = xemac0
flags = 0x00000009
last_ttl = 0
addr_refid = c0a80003
num_mcast = 0
received = 0
sent = 0
notsent = 0
ifindex = 0
scopeid = 0
peercnt = 0
phase = 1
setting SO_REUSEADDR on lo0 at 127.0.0.1 to off
setting SO_REUSEADDR on lo0@::1 to off
setting SO_REUSEADDR on xemac0 at 192.168.0.3 to off
create_sockets: Total interfaces = 5
 1 Jan 00:00:34 ntpd[49458240]: Listening on routing socket on fd #11
for interface updatesinit_io: maxactivefd 11
local_clock: time 0 offset 0.000000 freq 0.000 state 0
getnetnum: calling getaddrinfo(192.168.0.2,...)
reval before = 7476272
retval = 9
getaddrinfo2: "192.168.0.2" invalid host address.
local_clock: time 0 offset 0.000000 freq 0.000 state 1
report_event: system event 'event_restart' (0x01) status 'sync_alarm,
sync_unspec, 1 event, event_unspec' (0xc010)
auth_agekeys: at 1 keys 0 expired 0
timer: interface update
update_interfaces(123)
address_okay: listen Virtual: 1, IF name: lo0
address_okay: loopback - OK
examining interface #0: fd=-1, bfd=-1, name=lo0, flags=0x15, scope=0,
ifindex=0, sin=127.0.0.1, mask=255.0.0.0, Enabled:
Dumping interface: 0x71bbb8
fd = -1
bfd = -1
sin = 127.0.0.1,
0002007b7f000001  0000000000000000  0000000000000000
0000000000000000
bcast = 0.0.0.0,
0000000000000000  0000000000000000  0000000000000000
0000000000000000
mask = 255.0.0.0,
0002007bff000000  0000000000000000  0000000000000000
0000000000000000
name = lo0
flags = 0x00000015
last_ttl = 0
addr_refid = 00000000
num_mcast = 0
received = 0
sent = 0
notsent = 0
ifindex = 0
scopeid = 0
peercnt = 0
phase = 0
Searching for addr 127.0.0.1 in list of addresses - FOUND
updating interface #2: fd=8, bfd=-1, name=lo0, flags=0x15, scope=0,
ifindex=0, sin=127.0.0.1, mask=255.0.0.0, Enabled: present
Dumping interface: 0x721608
fd = 8
bfd = -1
sin = 127.0.0.1,
100200007f000001  0000000000000000  0000000000000000
0000000000000000
bcast = 0.0.0.0,
0000000000000000  0000000000000000  0000000000000000
0000000000000000
mask = 255.0.0.0,
0002007bff000000  0000000000000000  0000000000000000
0000000000000000
name = lo0
flags = 0x00000015
last_ttl = 0
addr_refid = 7f000001
num_mcast = 0
received = 0
sent = 0
notsent = 0
ifindex = 0
scopeid = 0
peercnt = 0
phase = 0
address_okay: listen Virtual: 1, IF name: lo0
address_okay: loopback - OK
examining interface #0: fd=-1, bfd=-1, name=lo0, flags=0x15, scope=0,
ifindex=0, sin=::1, Enabled:
Dumping interface: 0x71bbb8
fd = -1
bfd = -1
sin = ::1,
001c007b00000000  0000000000000000  0000000000000001
0000000000000000
bcast = 0.0.0.0,
0000000000000000  0000000000000000  0000000000000000
0000000000000000
mask = ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff,
001c007b00000000  ffffffffffffffff  ffffffffffffffff
0000000000000000
name = lo0
flags = 0x00000015
last_ttl = 0
addr_refid = 00000000
num_mcast = 0
received = 0
sent = 0
notsent = 0
ifindex = 0
scopeid = 0
peercnt = 0
phase = 0
Searching for addr ::1 in list of addresses - FOUND
updating interface #3: fd=9, bfd=-1, name=lo0, flags=0x15, scope=0,
ifindex=0, sin=::1, Enabled: present
Dumping interface: 0x7216f0
fd = 9
bfd = -1
sin = ::1,
1c1c000000000000  0000000000000000  0000000000000001
0000000000000000
bcast = 0.0.0.0,
0000000000000000  0000000000000000  0000000000000000
0000000000000000
mask = ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff,
001c007b00000000  ffffffffffffffff  ffffffffffffffff
0000000000000000
name = lo0
flags = 0x00000015
last_ttl = 0
addr_refid = cf404dc8
num_mcast = 0
received = 0
sent = 0
notsent = 0
ifindex = 0
scopeid = 0
peercnt = 0
phase = 0
address_okay: listen Virtual: 1, IF name: xemac0
address_okay: OK
examining interface #0: fd=-1, bfd=-1, name=xemac0, flags=0x9,
scope=0, ifindex=0, sin=192.168.0.3, bcast=192.168.0.255,,
mask=255.255.255.0, Enabled:
Dumping interface: 0x71bbb8
fd = -1
bfd = -1
sin = 192.168.0.3,
0002007bc0a80003  0000000000000000  0000000000000000
0000000000000000
bcast = 192.168.0.255,
0002007bc0a800ff  0000000000000000  0000000000000000
0000000000000000
mask = 255.255.255.0,
0002007bffffff00  0000000000000000  0000000000000000
0000000000000000
name = xemac0
flags = 0x00000009
last_ttl = 0
addr_refid = 00000000
num_mcast = 0
received = 0
sent = 0
notsent = 0
ifindex = 0
scopeid = 0
peercnt = 0
phase = 0
Searching for addr 192.168.0.3 in list of addresses - FOUND
updating interface #4: fd=10, bfd=-1, name=xemac0, flags=0x9, scope=0,
ifindex=0, sin=192.168.0.3, bcast=192.168.0.255,, mask=255.255.255.0,
Enabled: prese
nt
Dumping interface: 0x7217d8
fd = 10
bfd = -1
sin = 192.168.0.3,
10020000c0a80003  0000000000000000  0000000000000000
0000000000000000
bcast = 192.168.0.255,
0002007bc0a800ff  0000000000000000  0000000000000000
0000000000000000
mask = 255.255.255.0,
0002007bffffff00  0000000000000000  0000000000000000
0000000000000000
name = xemac0
flags = 0x00000009
last_ttl = 0
addr_refid = c0a80003
num_mcast = 0
received = 0
sent = 0
notsent = 0
ifindex = 0
scopeid = 0
peercnt = 0
phase = 0
auth_agekeys: at 60 keys 0 expired 0




More information about the questions mailing list