LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NTP server not working (https://www.linuxquestions.org/questions/linux-newbie-8/ntp-server-not-working-4175553558/)

Fusionfox 09-16-2015 07:28 AM

Quote:

Originally Posted by michaelk (Post 5421132)
I do not understand why the bad server is still is being used if you deleted it from your ntp.conf file. What are you using to edit the file?

I'm using vim to edit the file.

Is there a way to check that the ntp.conf file is actually the one being used by the ntp server?

michaelk 09-16-2015 07:47 AM

Probably not since /etc/ntp.conf is the default. You can look to see what options are explicitly used via the ps command:
ps ax | grep ntp

You can manually start ntp via the following command.
/usr/sbin/ntpd -g -c /etc/ntp.conf

To stop ntp once manually started
killall ntpd

Fusionfox 09-16-2015 08:43 AM

Quote:

Originally Posted by michaelk (Post 5421152)
Probably not since /etc/ntp.conf is the default. You can look to see what options are explicitly used via the ps command:
ps ax | grep ntp

You can manually start ntp via the following command.
/usr/sbin/ntpd -g -c /etc/ntp.conf

To stop ntp once manually started
killall ntpd

If i stop the ntp service and then start it manually using your command then run ntpq -p I finally get something new, however, it does not look like the servers I listed in the ntp.conf file:
Code:

root@h218:/home/Kaunet/KauNet2.0-Linux/patt_gen# ntpq -p
    remote          refid      st t when poll reach  delay  offset  jitter
==============================================================================
 time-a.timefreq .INIT.          16 u    -  64    0    0.000    0.000  0.000
 x.ns.gin.ntt.ne .INIT.          16 u    -  64    0    0.000    0.000  0.000
 leeloo.scurvyne .INIT.          16 u    -  64    0    0.000    0.000  0.000
 noac.co        .INIT.          16 u    -  64    0    0.000    0.000  0.000
 LOCAL(0)        .LOCL.          10 l  30  64    3    0.000    0.000  0.001

If i use the ps ax | grep ntp command i get:
Code:

root@h218:/home/Kaunet/KauNet2.0-Linux/patt_gen# ps ax | grep ntp
19493 ?        Ss    0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -c /var/lib/ntp/ntp.conf.dhcp -u 109:119
19497 pts/0    S+    0:00 grep --color=auto ntp

So it seems like the dhcp service interferes with the ntp service somehow. So after starting the service manually I am also able to synchronize other machines on LAN to my NTP server. Since I need the NTP server to have accurate time synchronization between the machines in the LAN and not to have accurate time I guess it is now working well enough for my purposes. However, I would still like to have it running properly.

But thanks a lot for helping me get this far :hattip:

michaelk 09-16-2015 09:04 AM

A pool is a collection of servers that use a round robin DNS system so in a nutshell you will not get the same servers. According to the NTP pool website there are 602 active severs in the US pool.

Looks like an old bug. Just delete the file. Have you considered trying CentOS 6.7?
https://bugs.launchpad.net/ubuntu/+s...p/+bug/1472056

Fusionfox 09-17-2015 01:22 AM

Quote:

Originally Posted by michaelk (Post 5421187)
A pool is a collection of servers that use a round robin DNS system so in a nutshell you will not get the same servers. According to the NTP pool website there are 602 active severs in the US pool.

Looks like an old bug. Just delete the file. Have you considered trying CentOS 6.7?
https://bugs.launchpad.net/ubuntu/+s...p/+bug/1472056

The setup currently used as part of a research project which finalizes in December, so right now there is no time to change OS. However, I will definitely consider it after the project ends.


All times are GMT -5. The time now is 07:42 AM.