Problem starting xntpd daemon on the server

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
ebi168Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wesly_chenCommented:
Hi,

> driftfile /var/ntp/ntp.drift

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

Wesly
0
ebi168Author Commented:
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
jlevieCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

ebi168Author Commented:
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
ebi168Author Commented:
What is a local master?
0
jlevieCommented:
> So why 127.0.0.1 instead 127.127.1.0

Because that IP is bound to the lo interface.
0
ebi168Author Commented:
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
jlevieCommented:
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
yuzhCommented:
>>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
ebi168Author Commented:
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
yuzhCommented:
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
ebi168Author Commented:
Yuzh: thanks for all the links.

Does anyone know what is my problem with xntpd?

0
wesly_chenCommented:
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
ebi168Author Commented:
How would firewall, /etc/hosts file and ifconfig -a matter?
0
wesly_chenCommented:
/etc/hosts and "ifconfig -a" is getting some information to understand your network configuration.

Firewall on the host may block the ntpq.

Wesly
0
ebi168Author Commented:
/>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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.