DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-09-18 20:42:44

puterboy
Member
Registered: 2008-09-18
Posts: 306

NTP & ntpdate not recognizing local server

From the web interface, I can synchronize with a remote ntp server (e.g., clock1.redhat.com) but not with my local ntp server running on a linux machine on 192.168.1.x  (note that I can synchronize both from Windows and from another linux machine to my local ntp server)

From the shell, when I run 'ntpdate -d clock1.redhat.com' OR 'ntpdate -d 66.187.233.4' OR 'ntpdate -d 192.168.1.x', I get errors like the following:

     18 Sep 13:34:45 ntpdate[13813]: ntpdate 4.2.4p4@1.1520 Tue Apr 15 15:57:21 UTC 2008 (1)
     Looking for host 66.187.233.4 and service ntp
     Error : Servname not supported for ai_socktype
     18 Sep 13:34:45 ntpdate[13813]: can't find host 66.187.233.4

     18 Sep 13:34:45 ntpdate[13813]: no servers can be used, exiting


SO:
1. Why can't I synchronize with my local machine using the web interface?
2. Why doesn't ntpdate seem to work at all?

Offline

 

#2 2008-09-18 20:44:46

mastervol
Member
Registered: 2008-09-06
Posts: 81

Re: NTP & ntpdate not recognizing local server

i am no linux geek, but is a daemon needed?


DNS-323     F/W: 1.06  H/W: ??  ffp: 0.5  Drives (normal mode): 1 x 1,5 TB Seagate SATA II ST31500341AS, 1 x 250 GB Western Digital SATA I

Offline

 

#3 2008-09-18 22:01:06

skydreamer
Member
From: At the Atlantic Coast
Registered: 2007-01-06
Posts: 232

Re: NTP & ntpdate not recognizing local server

I have ntpd running on the dns-323 against my local FC8 server ntpd and it works well, do not bother with ntpdate, unless you have a specific reason to.


/mnt/HD_a2/ffp/start # ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*192.168.111.254 134.226.81.3     2 u  616 1024  377   10.064   31.566   7.512
127.127.1.0     .LOCL.          10 l   17   64  377    0.000    0.000   0.008


Do not forget to configure

/ffp/etc/ntp.conf

Offline

 

#4 2008-09-18 22:06:09

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: NTP & ntpdate not recognizing local server

puterboy wrote:

Looking for host 66.187.233.4 and service ntp
     Error : Servname not supported for ai_socktype

Code:

echo "ntp 123/udp" >>/etc/services

The firmware services file is incomplete. The start script for the ntp daemon fixes this automatically, but you need to do that yourself (or add it to fun_plug.local) if you run ntpdate manually.

Offline

 

#5 2008-09-19 04:31:25

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: NTP & ntpdate not recognizing local server

That together with fixing an iptables firewall issue on my local server fixed half the problem -- i.e. ntpdate now works both with remote ntp servers and my local machine.

However, I still have the weird problem where the GUI dns-323 web version works from remot ntp servers but not from my local machine!
And this is NOT a firewall issue since the problem persists even when I shut off the firewall (and ntpdate itself works fine).

I traced this problem back to '/sbin/sntp' where running '/sbin/sntp -v 192.168.1.100' yields:

sntp options: a=1 p=0 v=1 e=0.100 E=5.000 P=30.000
    d=15 c=5 x=0 op=1 l= f= 192.168.1.100
sntp: unable to locate IP address/number
sntp: Success

Note that I have no problem pinging 192.168.1.100 or using ntpdate -d 192.168.1.100.
Also, running '/sbin/sntp -v 192.168.1.100' from another linux machine works.

So, it seems like there is something broken with sntp on the dns-323 when the address is a machine on a local net.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB