1834665 Members
3158 Online
110069 Solutions
New Discussion

Re: system time

 
Sajjad Sahir
Honored Contributor

system time

Dear All

unfortunately I changed system time in my first server now it is not synchronisig time with second one.Without rebooting how I can manage this issue?

data1# date
Wed Apr 30 15:05:54 WAT 2008
data2# date
Wed Apr 30 15:25:22 WAT 2008

data2# ntpdate data1
30 Apr 15:26:35 ntpdate[2532]: the NTP socket is in use, exiting

any idea
23 REPLIES 23
OFC_EDM
Respected Contributor

Re: system time

can you post the output of ntpq -p?
The Devil is in the detail.
OFC_EDM
Respected Contributor

Re: system time

Did you stop the ntp (xntpd) daemon before running ntpdate?
The Devil is in the detail.
Jeeshan
Honored Contributor

Re: system time

Hi Sajjad

Did you enable NTP daemon in /etc/rc.config.d/netdaemons?

what is your ntp.conf file content?
a warrior never quits
siva baskaran
Regular Advisor

Re: system time

Hi Sajjad Sahir,

if want to sync time each other you can use this command to sync time each other
/usr/sbin/ntpdate -b (ip of another server)

regards
Siva
Sajjad Sahir
Honored Contributor

Re: system time

data1# ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
*LOCAL(1) LOCAL(1) 10 l 5 64 377 0.00 0.000 10.01

dear team
netdaemons and all these config.are ok
I already mentioned it is running ntp already configuration daemon and every things are ok i changed my system time from my first server unfortunately
then any command i can use to synchronise the second server time with first one

also see i used systemm clock to configure.
if u have any other solutions please let me know
thanks and regards
sajjad
Sajjad Sahir
Honored Contributor

Re: system time

which ip u mean siva system ip or ip defined in u ntp configuration file
i told already
data2# ntpdate data1
30 Apr 15:26:35 ntpdate[2532]: the NTP socket is in use, exiting
i am getting this error while i am using
ntpdate command
Jeeshan
Honored Contributor

Re: system time

Hi again Sajjad

I understand what u configured is ok from your side. but sometimes the configuration may cause the problem.

yould you please post here what exactly you have changed in your ntp.conf file?
a warrior never quits
Sajjad Sahir
Honored Contributor

Re: system time

Dear Ahsan Ustad
I didn't made any change in my /etc/ntp.conf file ok!!!!!!!!!!!!!

what i did
used date -u then changed system time
only in my server thats all
don't go about againg /etc/ntp.conf file let is stay there

sajjad
Jeeshan
Honored Contributor

Re: system time

without ntp how could you synchronize your date in your network?

>>data2# ntpdate data1
30 Apr 15:26:35 ntpdate[2532]: the NTP socket is in use, exiting


this command will only applicable when there is a ntp server and synchonize its time to other server.

are you confused abt the time server or UTC time?

UTC is different thing. its aonly synchronize your server with UTC time.
a warrior never quits
Sajjad Sahir
Honored Contributor

Re: system time

dear

Ahsan

u read my previous thread

pleaseeeeeeeeeeeeeee

i told u ntp server and client is already configured and it was running fine up to
today morning i changed only time from data1- my ntp server
okkkkkkkkkkkkkkkkkkkkkkk
data2 is my ntp client okkkkkkkkkkkkkkkkk
sajjad
Jeeshan
Honored Contributor

Re: system time

Coooool Sajjad

If you manually changed the NTP server then your ntp daemon has been terminated.

Check that your xntpd daemon is running in both server.

#ps -ef|grep xntpd (check both servers)

then try the command


# ntpq -p
a warrior never quits
Sajjad Sahir
Honored Contributor

Re: system time

my ntp server

society1# ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
*LOCAL(1) LOCAL(1) 10 l 20 64 377 0.00 0.000 10.01

__________________________________________-
my ntp client

society2# ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
*society1 LOCAL(1) 11 u 39 64 177 0.20 -0.052 125.20




Jeeshan
Honored Contributor

Re: system time

so, if the problem still exist?


BTW, do you only get answers without points?
a warrior never quits
Sajjad Sahir
Honored Contributor

Re: system time


dear Ahsan

I didn't understan what do u mean by points

sajjad
Sajjad Sahir
Honored Contributor

Re: system time


Dear Ahsan

BTW, do you only get answers without points?

i didn't understand this?

sajjad
Jeeshan
Honored Contributor

Re: system time

That means you didn't assign any points in your recent threads.

If your date problem solved or not?
a warrior never quits
Sajjad Sahir
Honored Contributor

Re: system time

Dear Ahsan

how i can assign the poitns only up to now i am getting what i have done before
ntpq and ntpdate and daemon running all these i have done after that i put it question there
still i am facing problem
u are talking about /etc/ntp.conf file in my first thread on wards i told i configured these two servers for synchronisation today morning just i have done on running ntp server date -u then value but not yet it is not synchronisitn my client with server

prblem is still remaining!!!!!!!!!!!!!
because we didn'ttttttt any thing

thanks one more dear

sajjad



James R. Ferguson
Acclaimed Contributor

Re: system time

Hi:

The 'xntpd' daemon will NOT synchronize your server's time if it differs from that of a source by more than about 900 seconds. This prevents insane corrections.

You must set your server's time to be very close to the correct time first.

You can use 'date' to perform the adjustment. If you are setting time backwards, you should stop critical processes like databases first, You should also stop and restart the 'cron' daemon under these circumstances. Moving your server time forward is rarely a problem to time-sensitive processes.

Regards!

...JRF...
Sajjad Sahir
Honored Contributor

Re: system time

dear James
it is already near to time in server side

society1# date
Wed Apr 30 14:45:50 WAT 2008

society2# cron -s
society2# ! cron is already running Wed Apr 30 15:06:40 WAT 2008
! ******* CRON ABORTED ******** Wed Apr 30 15:06:40 WAT 2008

society2# ps -eaf | grep cron
ety2# ps -eaf | grep cron
root 1540 1 0 19:23:43 ? 0:00 /usr/sbin/cron

it is not stoping cron daemon

sajjad
Sajjad Sahir
Honored Contributor

Re: system time

Dear James

I have to kill the process?

becaues i can't stop the cron also
I already adjusted server time, my issue is now client has to sysnchronise the time only
the last 6 monhts it was running fine
today morning i changed time from server
by using date this only i have done in my server side
now i am surviving to synchronisation with the client

thanks once more

sajjad
Sajjad Sahir
Honored Contributor

Re: system time

society1# date
Wed Apr 30 15:14:12 WAT 2008

society2# date
Wed Apr 30 15:14:25 WAT 2008

see server client is the difference betweeen seconds on sync.

sajjad
Sajjad Sahir
Honored Contributor

Re: system time

Dear James

see while i am closing cron daemon i am getting such an error, but u see in my case i think no need to stop the cron daemon becuase there is no database in my server it is a new one.


sajjad
Sajjad Sahir
Honored Contributor

Re: system time



Dear James

The synchronisatin time difference was less than one minute that why prblem came.
I made changes in my ntp cleint 2 hours different and ntp server near to the correct time then add ntp client through sam
now its ok any how for u cron information actully it was not in mind if my system is database server but in future i can rember cron role.
thnaks once more

sajjad