0

This is a physical SBC machine and customer created many virtual IP (It a related to relem and vnet concept in tele communication)

Here we have created eth2 and eth3 as a signalling interface. eth2 and eth3 are treated as a vlan and bind relem eth2:6 and eth3.1238:0 to these vlan.

In our case we discard eth2 and eth3 from ntp.conf because there are multiple relem bind to eth2 and eth3 so ntp tries to create a socket for each session, and the problem was all file descriptors where exhausted. That's why we add only eth0 interface and we don't want npt to listen on any interface except eth0 so I have used the interface ignore wildcard option.

However we can see that after making changes in ntp.conf it is trying to listen on the broadcast address and failing to bind with an unexpected error.

ntpd[89217]: ./../lib/isc/unix/ifiter_ioctl.c:617: unexpected error:
ntpd[89217]: eth2:6: getting broadcast address: Cannot assign requested address
ntpd[89217]: i/o error on routing socket No buffer space available – disabling
ntpd[5410]: ./../lib/isc/unix/ifiter_ioctl.c:617: unexpected error:
ntpd[5410]: eth3.1238:0: getting broadcast address: Cannot assign requested address
ntpd[5410]: ntpd exiting on signal 15
ntpd[1508]: ntpd exiting on signal 15

ntp.conf

fudge 127.127.1.0 stratum 10
Authentication stuff
keys /etc/ntp.keys
path for keys file
trustedkey 1
define trusted keys
requestkey 1
server 172.23.5.8 iburst
server 172.23.5.9 iburst
restrict 172.23.5.8
restrict 172.23.5.9
key (7) for accessing server variables
controlkey 15 # key (6) for accessing server variables
extra lines to fix issue about NTP Daemon
interface listen eth0
interface ignore wildcard

ip a sh

256: eth3.897@eth3: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether 00:1e:67:53:e0:b2 brd ff:ff:ff:ff:ff:ff
inet 169.254.66.8/18 brd 169.254.127.255 scope global eth3.897:0
inet6 fe80::21e:67ff:fe53:e0b2/64 scope link nodad
valid_lft forever preferred_lft forever
257: eth3.951@eth3: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether 00:1e:67:53:e0:b2 brd ff:ff:ff:ff:ff:ff
inet 169.254.66.118/18 brd 169.254.127.255 scope global eth3.951:0
inet6 fe80::21e:67ff:fe53:e0b2/64 scope link nodad
valid_lft forever preferred_lft forever
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
inet6 ::1/128 scope host nodad

Can any body tell me how to fix this error?

user3788685
  • 2,943
  • 5
  • 26
  • 45
Sumit Gemini
  • 1,836
  • 1
  • 15
  • 19

1 Answers1

1

I've been unable to reproduce your issue but I suspect there are a few things at play;

Somewhere you may have an IP address config issue on one of your interfaces (which is why you get the bind error) I do also wonder if you have more than one config file on your system as your earlier question text showed a valid output from ntpq -pcrv which meant it was running when you did that test.

In an earlier edit of your question you showed a valid output from ntpq -pcrv which indicated that ntp was already running. You may have more than one version installed, or trying to run more than once instance - you should also check for that.

Signal 15 is SIGTERM - which means 'something' terminated it, rather then it died/crashed etc.

Below is my config file from a production box. (This is a S1 server with a directly connected reference clock but I've removed the redundant bits of config)

#YOU SHOULD ALSO ADD:
interface ignore wildcard
interface listen eth0

driftfile /var/lib/ntp/drift
leapfile "/etc/ntp/leap-seconds.3676752000"

restrict default kod nomodify
restrict -6 default kod nomodify
restrict 127.0.0.1
restrict -6 ::1

server server1
server server2
server server3
server server4
server server5

#REQUIRES MCAST SETUP/CONFIG
broadcast 224.0.1.1 key 6
manycastserver 239.255.254.254

includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
trustedkey 6

Replace serverX with your own upstream servers - you want a minimum of 3, ideally 5 servers for robust ntp operation.

Restart ntp and wait a while - then run ntpq -pcrv and check the output. Below is mine for reference;

    ntpq -pcrv
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
-server1         10.10.10.14      2 u   50   64  377   29.791    0.421   0.147
-server2         .GPS.            1 u   66   64  377    9.694    0.255   0.218
#server3          10.10.10.74     2 u   23   64  377    7.376    0.685   0.057
+server4         .PPS.            1 u    3   64  377   16.979   -0.894   0.185
-server5         .DCFa.           1 u   13   64  377    9.016    0.481   0.251
 ntp.mcast.net   .MCST.          16 u    -   64    0    0.000    0.000   0.002
 LOCAL(0)        .LOCL.          10 l    -   64    0    0.000    0.000   0.000
+SHM(0)          .GPS.            0 l    6   16  377    0.000    6.366   8.976
*SHM(1)          .PPS.            0 l   16   16  377    0.000   -0.046   0.011
associd=0 status=0415 leap_none, sync_uhf_radio, 1 event, clock_sync,
version="ntpd 4.2.6p5@1.2349-o Tue May 31 10:09:21 UTC 2016 (1)",
processor="x86_64", system="Linux/4.7.3-1.el6.elrepo.x86_64", leap=00,
stratum=1, precision=-19, rootdelay=0.000, rootdisp=1.225, refid=PPS,
reftime=dbc612ab.93ca4dbf  Thu, Nov  3 2016 19:46:51.577,
clock=dbc612bc.05f5dedc  Thu, Nov  3 2016 19:47:08.023, peer=52638, tc=4,
mintc=3, offset=-0.129, frequency=-68.142, sys_jitter=0.115, clk_jitter=0.051, clk_wander=0.012, tai=36, leapsec=201507010000,
expire=201612010000

My leap is un-armed as I've not reloaded to include the latest insertion due at the end of this year.

user3788685
  • 2,943
  • 5
  • 26
  • 45
  • thanks and let me check with your script, i'll update you soon with mine output. – Sumit Gemini Nov 04 '16 at 05:10
  • Issue is not reproducable. I'm waiting for an issue. Can you please tell me what logs we need if we get this issue in future to debug? – Sumit Gemini Nov 18 '16 at 23:19
  • I'd keep an eye on `/var/log/messages` and from time to time run `ntpq -pcrv` to check everything is ok. Hopefully you don't get any more problems. – user3788685 Nov 19 '16 at 05:16
  • thanks, actually this NTP service is running on customer machine, so how can I get ntpq -pcrv logs time to time? I don't have control on that machine. – Sumit Gemini Nov 19 '16 at 09:16
  • unless you have access to the machine then its a bit tricky. depending how good your scripting is you can make something that pulls the stats, or you could go down the RRD/MRTG route. nptd is not known for its logging to be honest. – user3788685 Nov 19 '16 at 14:54