[comp.protocols.time.ntp] xntpdc fails on Sun

warb@faatcrl.UUCP (Dan Warburton) (04/25/91)

I am bringing up xntpd on an isolated network containing a Sun 
SparcStation 1+ running SunOS 4.1.1. xntpd is up and running with a local
clock. When I try to use xntpdc it fails with xntpdc: ntp/udp: unknown service.

Now I have modified the /etc/services file as follows:

ntp             123/udp                         # Network Time Protocol

Beliving that ntp sould be a udp protocall. I see xntpdc doing:

 server_entry = getservbyname("ntp", "udp");


What am I missing?


-- 
+  Dan Warburton   Nas Simulation Support Facility (NSSF)                  
+                  Federal Aviation Administration Technical Center  
+                  Atlantic City International Airport, NJ 08405    //
+  609-484-4480    Mail Stop: ACN-313                      Amiga  \X/ Sun
+  warb@faatcrl.uucp  ...rutgers!faatcrl!warb   -- An Open Systems Group --

iglesias@draco.acs.uci.edu (Mike Iglesias) (04/25/91)

In article <1260@faatcrl.UUCP> warb@faatcrl.UUCP (Dan Warburton) writes:
>I am bringing up xntpd on an isolated network containing a Sun 
>SparcStation 1+ running SunOS 4.1.1. xntpd is up and running with a local
>clock. When I try to use xntpdc it fails with xntpdc: ntp/udp: unknown service.
>
>Now I have modified the /etc/services file as follows:
>ntp             123/udp                         # Network Time Protocol
>Beliving that ntp sould be a udp protocall. I see xntpdc doing:
>
> server_entry = getservbyname("ntp", "udp");

If your system is using NIS (YP), you need to change the services file
on the NIS master and remake the NIS maps (the local /etc/services is
not consulted after booting the system).  To find which system is the
NIS master, type 'ypcat ypservers'.  One of those systems is the
master.  


Mike

mdb@ESD.3Com.COM (Mark D. Baushke) (04/25/91)

> Date: 25 Apr 91 05:52:49 GMT
> From: iglesias@draco.acs.uci.edu  (Mike Iglesias)
>[...] 
> To find which system is the NIS master, type 'ypcat ypservers'.

I suspect you meant to say "type 'ypcat -k ypservers'". However,
the right way to find the master for the services.byname map is to use
the command 'ypwhich -m services.byname'.

	Enjoy!
	-- Mark
	mdb@ESD.3Com.COM

zook@sweetpea.jsc.nasa.gov (Craig A. Zook 283-4206) (04/26/91)

In article <1260@faatcrl.UUCP>, warb@faatcrl.UUCP (Dan Warburton) writes:
|> I am bringing up xntpd on an isolated network containing a Sun 
|> SparcStation 1+ running SunOS 4.1.1. xntpd is up and running with a local
|> clock. When I try to use xntpdc it fails with xntpdc: ntp/udp:
unknown service.
|> 
|> Now I have modified the /etc/services file as follows:
|> 
|> ntp             123/udp                         # Network Time
Protocol
|> 
|> Beliving that ntp sould be a udp protocall. I see xntpdc doing:
|> 
|>  server_entry = getservbyname("ntp", "udp");
|> 
|> 
|> What am I missing?
|> 
|> 
|> -- 
|> +  Dan Warburton   Nas Simulation Support Facility (NSSF)            
|> +                  Federal Aviation Administration Technical Center 
|> +                  Atlantic City International Airport, NJ 08405   
//
|> +  609-484-4480    Mail Stop: ACN-313                      Amiga  \X/
Sun
|> +  warb@faatcrl.uucp  ...rutgers!faatcrl!warb   -- An Open Systems
Group --

Two things.  First rather than modifing the ntp entry in /etc/services
you should add an additional entry identical to the first except for
udp
instead of tcp.  Second if you are running YP you will need to modify
the yp data for services and do a cd /var/yp;make services.

I assume you know about running tickadj -Asq before starting xntpd on a
sun.

--
Craig Zook   -   zook@sweetpea.jsc.nasa.gov
Systems Engineeering and Administration
McDonnell Douglas Space Systems Corp. - Engineering Services Division
(713) 283-4206