Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problem starting xntpd daemon on the server

Posted on 2004-11-01
16
Medium Priority
?
1,311 Views
Last Modified: 2013-12-27
Hi,

I have created ntp.conf for the server and client, after running xntpd start on both server and client, I only see xntpd process running on the client not the server (ps -ef | grep xntpd). Could anyone tell me what is the problem?

ntp.conf on server:

server 127.127.1.0 prefer
fudge 127.127.1.0 stratum 0

broadcast 224.0.1.1 ttl 4

enable auth monitor
driftfile /var/ntp/ntp.drift
statsdir /var/ntp/ntpstats/
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable

keys /etc/inet/ntp.keys
trustedkey 0
requestkey 0
controlkey 0

ntp.conf on the client:

server x.x.x.x
multicastclient 224.0.1.1

Thanks
0
Comment
Question by:ebi168
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 3
  • 3
  • +1
16 Comments
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12468675
Hi,

> driftfile /var/ntp/ntp.drift

Do you create "/var/ntp/ntp.drift" with "0.0" in it?

Wesly
0
 

Author Comment

by:ebi168
ID: 12468702
What is the drift file used for? I created the ntp.drift file, run: /etc/init.d/xntpd start -c /etc/inet/ntp.conf

But the process is still not up.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 1480 total points
ID: 12468716
Your config tends to suggest that you are trying to create a local master. I'd suggest using:

server 127.0.0.1 prefer
fudge 127.0.0.1 stratum 0

which is the IP assigned to the localhost interface.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:ebi168
ID: 12468785
I tried
server 127.0.0.1 prefer
fudge 127.0.0.1 stratum 0

It start working. So why 127.0.0.1 instead 127.127.1.0?

When I run ntpq, I got error on both server and client:

# ntpq
ntpq> peers
localhost: timed out, nothing received
***Request timed out

Thanks
0
 

Author Comment

by:ebi168
ID: 12468889
What is a local master?
0
 
LVL 40

Assisted Solution

by:jlevie
jlevie earned 1480 total points
ID: 12468894
> So why 127.0.0.1 instead 127.127.1.0

Because that IP is bound to the lo interface.
0
 

Author Comment

by:ebi168
ID: 12468940
Then what is a local master? With 127.0.0.1, what clock is the server sync to?

Why I am having problem using ntpq?

Thanks
0
 
LVL 40

Assisted Solution

by:jlevie
jlevie earned 1480 total points
ID: 12469286
When you bind NTP to a local IP with a stratum of 0 instead of an Internet timekeeper you are creating a local master. That's useful when you don't have a full time Internet connection but still need all of the clients to have the same time. The clock may not be correct in the absolute sense, but they'll all be the same.

On the local master what does 'peers' with the server IP set to 127.0.0.1 show now?
0
 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 280 total points
ID: 12469818
>>what clock is the server sync to?

For your local NTP master, you can get the correct time from a external host, eg, you
what your server to get the correct time from an external hosts (IP xxx.xxx.xx.x), you
can put something like the following in your crontab.

10 3,15 * * * /usr/sbin/ntpdate xxx.xxx.xx.x >/dev/null 2>&1

you local NTP clients will get time from your server.


0
 

Author Comment

by:ebi168
ID: 12474561
Jlevie:
Both server and client still show:

localhost: timed out, nothing received
***Request timed out


yuzh: But isn't it that once you ran xntpd, you can't use ntpdate any longer.

0
 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 280 total points
ID: 12479485
Sorry, I didn't think, a memory bug in my head!

But you can create a startup script to run ntpdate before the system start to run
/etc/rc2.d/S74xntpd.

The proper way to do it is to allow this NTP server to synchronize with public time server.

Add one or more servers to  ntp.conf file, your server becomes a client of the refrence Server.

Have a look at the following FAQ:

http://www.ntp.org/ntpfaq/NTP-a-faq.htm

and:
http://www.sunmanagers.org/pipermail/sunmanagers/2003-August/024460.html
http://alimunix.ddns.comp.nus.edu.sg/docs/bk04ch08s03.html

for NTP server and client setup:
http:Q_20879113.html
0
 

Author Comment

by:ebi168
ID: 12484943
Yuzh: thanks for all the links.

Does anyone know what is my problem with xntpd?

0
 
LVL 38

Assisted Solution

by:wesly_chen
wesly_chen earned 240 total points
ID: 12485472
Hi,

> ntpq> peers
> localhost: timed out, nothing received
> ***Request timed out

Do you have any firewall software (such IPF) running on your ntpd server?
Turn off the firewall first.

Also, can you provide the /etc/hosts and the output of "ifconfig -a"?

Wesly
0
 

Author Comment

by:ebi168
ID: 12487832
How would firewall, /etc/hosts file and ifconfig -a matter?
0
 
LVL 38

Assisted Solution

by:wesly_chen
wesly_chen earned 240 total points
ID: 12488006
/etc/hosts and "ifconfig -a" is getting some information to understand your network configuration.

Firewall on the host may block the ntpq.

Wesly
0
 

Author Comment

by:ebi168
ID: 12495708
/>ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
ge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet x.x.x.x netmask ff000000 broadcast 10.255.255.255
        ether 0:3:ba:b:42:e2
ge0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet y.y.y.y netmask ff000000 broadcast 10.255.255.255

x.x.x.x and y.y.y.y are the two ip address accessible to the server.

/etc/hosts are just all the ip addresses and host names pairs.

I need to research on how to find out whether the firewall is installed.

Thanks
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question