SRX

last person joined: 3 days ago 

Ask questions and share experiences about the SRX Series, vSRX, and cSRX.
  • 1.  /usr/bin/ntpq: write to localhost failed: No route to host

     
    Posted 11-26-2009 21:29

    I get this error when I use the 'show NTP status' command.   I'm not sure what's causing it.  I have two srxs, 1 650 and 1 240, with each being an NTP server on the other.   I get the error on the 650, but on the 240, the same command shows that the 650 is responding every 65 seconds and that the 650 is syncing to one of my other NTP servers....

     

    I have the same configuration on both the 650 and the 240, and I'm not having Any problems on the 240.

     

    Any ideas?



  • 2.  RE: /usr/bin/ntpq: write to localhost failed: No route to host

    Posted 11-27-2009 13:18

    Hi there,

    Do you have name-server(s) configured on your SRXes?

    If yes can DNS server(s) resolve A localhost and PTR 127.0.0.1?

    Also, do you have any IP address on lo0.0 interface?

    Rgds

    Alex



  • 3.  RE: /usr/bin/ntpq: write to localhost failed: No route to host

     
    Posted 11-27-2009 14:02

    No, I do not have any DNS servers defined.  isn't localhost/1.0.0.127.INADDR.ARPA resolved in /etc/hosts in the BSD subsystem?

     

    and no, i don't have an address assigned to lo0



  • 4.  RE: /usr/bin/ntpq: write to localhost failed: No route to host
    Best Answer

    Posted 11-27-2009 23:40

    Hi Theodore,

    I suggest you do this:

    1/ assign 127.0.0.1 to lo0.0

    2/ create static-host-mapping:

    set system static-host-mapping localhost inet 127.0.0.1

    Please let me know if if cures your problem.

    Rgds

    Alex



  • 5.  RE: /usr/bin/ntpq: write to localhost failed: No route to host

     
    Posted 12-11-2009 19:16

    Thanks Alex, that solved the problem (i can now run:  show ntp associations)

     

    I would really like to undstand the problem better because according to 'show ntp status', the NTP clients were able to sync to my three ntp servers, even while I could not view the associations.

     

    thanks

     



  • 6.  RE: /usr/bin/ntpq: write to localhost failed: No route to host

    Posted 12-12-2009 12:33

    Hi Theodore,

    "show ntp associations" is the same as FreeBSD  command:

     

    ntpq -c lpeers localhost

     

    More information on FreeBSD website http://www.freebsd.org/cgi/man.cgi?query=ntpq&apropos=0&sektion=0&manpath=FreeBSD+6.1-RELEASE&format=html

     

    As JUNOS box cannot resolve localhost and send a NTP mode 6 control message to self (I know it sounds weird but that's how ntpq works) that's why you got these errors.

     

    Rgds

    Alex



  • 7.  RE: /usr/bin/ntpq: write to localhost failed: No route to host

     
    Posted 12-12-2009 23:02

    OK, while that explains how it works, does it also mean that ntp has to be associated with the default routing table inet.0 ???



  • 8.  RE: /usr/bin/ntpq: write to localhost failed: No route to host

    Posted 12-13-2009 00:36

    Correct. NTP is not virtualized meaning NTP server and client IP addresses must be in inet.0/master routing-instance.